From patchwork Mon Jul 15 08:25:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 11043493 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4F5D913BD for ; Mon, 15 Jul 2019 08:25:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 30B4B20502 for ; Mon, 15 Jul 2019 08:25:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1D2E42766D; Mon, 15 Jul 2019 08:25:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 56538223A1 for ; Mon, 15 Jul 2019 08:25:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729428AbfGOIZc (ORCPT ); Mon, 15 Jul 2019 04:25:32 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:42504 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729416AbfGOIZb (ORCPT ); Mon, 15 Jul 2019 04:25:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=nlXKDiRd1qdIM5E1T9QmSHdRExTedl+3MXeOc+zQ7pU=; b=W+DO42PJazAC5UgDtD5micMGr 9X6b36cLZw+HV4dwxLkmdPepdAO4aVrPeOIOIOu0iJlhDO7gsBIOfryW/eTJNatOAsqwe0eXE/bVu /hzroqkoCFD2R76QjBneXImWPFpWhQcKs7Z7ZSqUQqWL/tthqfAx+fBBQ1mxKNMZ9FpSIyIwlFoqR EKpPegS/0gP5S9NIXr5Eu1EJvbJkOc/Mx9sMjLJqfwIDOFba69UiK6S2WjDSZ12YQiz/2m6l33A48 jxydrlRz2zZlETreO0bEPtpai7J2Gp8DxJhPHqbClj1Yr57iTDGviwuFRid35ivgT+gdz3bDpZ0Sl cAwoQTHfg==; Received: from 089144194016.atnat0003.highway.a1.net ([89.144.194.16] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hmwIc-0004Ue-Lb for fstests@vger.kernel.org; Mon, 15 Jul 2019 08:25:31 +0000 From: Christoph Hellwig To: fstests@vger.kernel.org Subject: [PATCH 1/3] common/cgroup2: better error message if cgroup2 fs is not mounted Date: Mon, 15 Jul 2019 10:25:21 +0200 Message-Id: <20190715082523.18387-1-hch@lst.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Improve the _require_cgroup2 helper to print a more useful message if the cgroup2 fs is not mounted. Signed-off-by: Christoph Hellwig --- common/cgroup2 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/cgroup2 b/common/cgroup2 index f89825e2..8833c9c8 100644 --- a/common/cgroup2 +++ b/common/cgroup2 @@ -4,9 +4,14 @@ export CGROUP2_PATH="${CGROUP2_PATH:-/sys/fs/cgroup}" _require_cgroup2() { + if [ `findmnt -d backward -n -o FSTYPE -f ${CGROUP2_PATH}` != "cgroup2" ]; then + _notrun "cgroup2 not mounted on ${CGROUP2_PATH}" + fi + if [ ! -f "${CGROUP2_PATH}/cgroup.subtree_control" ]; then _notrun "Test requires cgroup2 enabled" fi + if [[ ! $(cat ${CGROUP2_PATH}/cgroup.controllers) =~ $1 ]]; then _notrun "Cgroup2 doesn't support $1 controller $1" fi From patchwork Mon Jul 15 08:25:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 11043495 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 179CF13B1 for ; Mon, 15 Jul 2019 08:25:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 07EBA20502 for ; Mon, 15 Jul 2019 08:25:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EE98C2766D; Mon, 15 Jul 2019 08:25:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A32520502 for ; Mon, 15 Jul 2019 08:25:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729432AbfGOIZi (ORCPT ); Mon, 15 Jul 2019 04:25:38 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:42518 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729430AbfGOIZi (ORCPT ); Mon, 15 Jul 2019 04:25:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:To:From:Sender: Reply-To:Cc:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=9FTwj8LehDfEjHT88teL3kfn2/gZfY2UgxnW3PXfZp4=; b=fk86bRbIy8HAhpX8ZYOOWIvZW b/GBplpq8ZmIvs8/rw1H/0JvGIccS9ZuOsOzkP8OKBJG/4tW9QD03GP0FKLcZuVSRjdlGMIA62hCa xjLsU3FHZC5KhyeYzJNk5tUbbHYykO7enW0oKnJiI8wo/hVBE0lNYUEPCwe5l1d85XzPEkdFRF64u NPGL2b7gMU/p1fe11W65RiVrJAD+EydM6fhMqvohn7MWhQs8GApHvaF5BgRMAxx0IfuzBrgkQn5H3 d1idQ3cFHCQqa+4v6OR97bySTJSEyi5hhXFxqxYDSRggExbzKBbsP/gVuUqI5+V0dRY26kdAnEsCP QJNT5z9GQ==; Received: from 089144194016.atnat0003.highway.a1.net ([89.144.194.16] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hmwIi-0004VI-Ty for fstests@vger.kernel.org; Mon, 15 Jul 2019 08:25:37 +0000 From: Christoph Hellwig To: fstests@vger.kernel.org Subject: [PATCH 2/3] shared/011: run for all block device based file systems Date: Mon, 15 Jul 2019 10:25:22 +0200 Message-Id: <20190715082523.18387-2-hch@lst.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190715082523.18387-1-hch@lst.de> References: <20190715082523.18387-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Cgroupv2 writeback support can't be easily detected. But it is kindof expected from block based file systems and can be easily added, so just assume support and fail if it doesn't work. Signed-off-by: Christoph Hellwig --- tests/shared/011 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/shared/011 b/tests/shared/011 index a0ac375d..b4cdc5ed 100755 --- a/tests/shared/011 +++ b/tests/shared/011 @@ -39,11 +39,14 @@ rm -f $seqres.full # real QA test starts here # Modify as appropriate. -_supported_fs ext4 btrfs +_supported_fs generic _supported_os Linux _require_scratch _require_cgroup2 io +# cgroup v2 writeback is only support on block devices so far +_require_block_device $SCRATCH_DEV + smajor=$((0x`stat -L -c %t $SCRATCH_DEV`)) sminor=$((0x`stat -L -c %T $SCRATCH_DEV`)) cgdir=$CGROUP2_PATH From patchwork Mon Jul 15 08:25:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 11043497 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 91E1113BD for ; Mon, 15 Jul 2019 08:25:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 841A920502 for ; Mon, 15 Jul 2019 08:25:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7846A2766D; Mon, 15 Jul 2019 08:25:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 01C1A20502 for ; Mon, 15 Jul 2019 08:25:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729433AbfGOIZo (ORCPT ); Mon, 15 Jul 2019 04:25:44 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:42534 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729430AbfGOIZo (ORCPT ); Mon, 15 Jul 2019 04:25:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:To:From:Sender: Reply-To:Cc:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=+ksa0lUxp8mmjHyUOTS07VoUFJp8j/BKBrPcBnUyQu8=; b=oZqJrjApjG1P3EHxJE+l4VarV Jnhb7Ov8h0tp3G4h18a+b7QCvknRjghjTNibXaRMuLjCygyjkeCFOJW866uvFnIOBHtZB1lEyx45p BPH2b4BsyTRrtQ/1BPaRVJHi4RMBeryAG4bEGTF2AYvbRbZlNwKW8Vyhh4dCZY2Rko6eWpivJvGtf W3eV/Ha+88R6JZGCKtThgMxUM+Bu72EOZpPReuOXczTRKDL66aHAgqWTdFMRJS7W73UQmWiWVFFWm 922P0Ieq+R35+XwtGGzZE87x16oTWcG7jGg2UeJNBcSk8gndLF4vxAW+T+CHl8AD3Ze0pbVQW6PCc YNtv/DhSA==; Received: from 089144194016.atnat0003.highway.a1.net ([89.144.194.16] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hmwIp-0004Vs-2F for fstests@vger.kernel.org; Mon, 15 Jul 2019 08:25:44 +0000 From: Christoph Hellwig To: fstests@vger.kernel.org Subject: [PATCH 3/3] shared/011: move to generic/ Date: Mon, 15 Jul 2019 10:25:23 +0200 Message-Id: <20190715082523.18387-3-hch@lst.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190715082523.18387-1-hch@lst.de> References: <20190715082523.18387-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Now that we run the test for all block device based file systems, there is no reason to keep it out of generic. Signed-off-by: Christoph Hellwig --- tests/{shared/011 => generic/563} | 0 tests/{shared/011.out => generic/563.out} | 0 tests/generic/group | 1 + tests/shared/group | 1 - 4 files changed, 1 insertion(+), 1 deletion(-) rename tests/{shared/011 => generic/563} (100%) rename tests/{shared/011.out => generic/563.out} (100%) diff --git a/tests/shared/011 b/tests/generic/563 similarity index 100% rename from tests/shared/011 rename to tests/generic/563 diff --git a/tests/shared/011.out b/tests/generic/563.out similarity index 100% rename from tests/shared/011.out rename to tests/generic/563.out diff --git a/tests/generic/group b/tests/generic/group index 9ceaf317..284a1d93 100644 --- a/tests/generic/group +++ b/tests/generic/group @@ -565,3 +565,4 @@ 560 auto stress dedupe 561 auto stress dedupe 562 auto clone +563 auto quick diff --git a/tests/shared/group b/tests/shared/group index 6112c8dd..a8b926d8 100644 --- a/tests/shared/group +++ b/tests/shared/group @@ -4,6 +4,5 @@ # - comment line before each group is "new" description # 002 auto metadata quick log -011 auto quick 032 mkfs auto quick 298 auto trim