From patchwork Tue Sep 15 01:43:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11775207 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7340414F6 for ; Tue, 15 Sep 2020 01:43:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 596F0208DB for ; Tue, 15 Sep 2020 01:43:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="FkeLx9JU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726118AbgIOBnJ (ORCPT ); Mon, 14 Sep 2020 21:43:09 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:38634 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726085AbgIOBnG (ORCPT ); Mon, 14 Sep 2020 21:43:06 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1eWDL041930; Tue, 15 Sep 2020 01:43:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=59X6jv9hVuuBXiZZ9gfeNTe5p8xTGE5TNtYSgL9W/BE=; b=FkeLx9JU6a/DDXx7rD+n1w7izLjMR86Vbowx5Pty5HTrHWKbH2lQtpjkMqS/SrJNTBzj //8HdaL1Cl0X9MVIdQGElGnqpdhrGIs9fQW6M0OlbedJXcU+A/TlGDslhs1mWV30ap7H fao6SxKx/WwmFbw0fhkSRPEZD3xV/eywfTGhCDu6i4RkP5dNZZASKvzAsTB8XQeZi+KZ pvMsg1u1AJoWUa3G1dxM7YLA1BBTkO9R8MKshdZ8qKSmJbbyU49j+zUi7EfakgYpnXUs RqQMZCjeSSxo4I8zacp12oY8btkGbpyLslaTbCeY1EdPwkSU76Mgi1IhBHU3+5NVTiPm qA== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 33j91dbhjr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 15 Sep 2020 01:43:04 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1eeTR022040; Tue, 15 Sep 2020 01:43:04 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3030.oracle.com with ESMTP id 33h88x2u9f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Sep 2020 01:43:04 +0000 Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 08F1h34j006617; Tue, 15 Sep 2020 01:43:03 GMT Received: from localhost (/10.159.147.241) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 15 Sep 2020 01:43:03 +0000 Subject: [PATCH 01/24] xfs/331: don't run this test if fallocate isn't supported From: "Darrick J. Wong" To: darrick.wong@oracle.com, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Mon, 14 Sep 2020 18:43:00 -0700 Message-ID: <160013418077.2923511.4423324916550074038.stgit@magnolia> In-Reply-To: <160013417420.2923511.6825722200699287884.stgit@magnolia> References: <160013417420.2923511.6825722200699287884.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 spamscore=0 adultscore=0 suspectscore=0 mlxscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150011 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 impostorscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 mlxlogscore=999 clxscore=1015 adultscore=0 lowpriorityscore=0 spamscore=0 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150011 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong This test requires fallocate, so make sure that actually works before running it. Signed-off-by: Darrick J. Wong Reviewed-by: Zorro Lang Reviewed-by: Christoph Hellwig --- tests/xfs/331 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/xfs/331 b/tests/xfs/331 index b26ea155..501dd1f8 100755 --- a/tests/xfs/331 +++ b/tests/xfs/331 @@ -32,6 +32,7 @@ _supported_fs xfs _require_scratch _require_xfs_scratch_rmapbt _require_scratch_reflink +_require_xfs_io_command "falloc" _require_test_program "punch-alternating" rm -f "$seqres.full" From patchwork Tue Sep 15 01:43:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11775209 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D77AB618 for ; Tue, 15 Sep 2020 01:43:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BB488214F1 for ; Tue, 15 Sep 2020 01:43:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="DWV55jGV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726061AbgIOBnR (ORCPT ); Mon, 14 Sep 2020 21:43:17 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:44628 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726085AbgIOBnO (ORCPT ); Mon, 14 Sep 2020 21:43:14 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1e4AM130181; Tue, 15 Sep 2020 01:43:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=bWBUly2K0qKxLUN+6aY35OLs88s8LUxqAZOZ7fdG0Xg=; b=DWV55jGVAnnJ99gt31HcK9JsaJtzzGF3DATd5ZvcMYGxHinFiVNo2MV3u5atEdqQy5SF Mjc4UKx6pWBw5nLSIiHKJlYGfRuZoMrXdxTVsU8lLj3h759IFb2l6wFJ6vPhVKB+sGxu s69G1VRvaVnul/BU4Eh58NSTd4JJa+DuWS6iCwrycCM0SAoCcn50WWtAd9/Z4wKpcs4k ZOkPAPEwmH5M2SVWp0+ABo/sv0QeJ6TTfvLlVjliYbCFuTBfZgaWJ59VTP6VhDF3kz3x +wh+kEqSsqY14xYJqaBEB3x+8b0oqnEYmODeX3PtdCFUdUbXfOQbe1Ko3hwB0PzZuT6K ug== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 33gnrqsxsp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 15 Sep 2020 01:43:11 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1dmP3111657; Tue, 15 Sep 2020 01:43:11 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3020.oracle.com with ESMTP id 33hm2ycc3v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Sep 2020 01:43:11 +0000 Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 08F1hAQk004006; Tue, 15 Sep 2020 01:43:10 GMT Received: from localhost (/10.159.147.241) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 15 Sep 2020 01:43:09 +0000 Subject: [PATCH 02/24] generic/60[01]: fix test failure when setting new grace limit From: "Darrick J. Wong" To: darrick.wong@oracle.com, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Mon, 14 Sep 2020 18:43:08 -0700 Message-ID: <160013418837.2923511.12713913160160876814.stgit@magnolia> In-Reply-To: <160013417420.2923511.6825722200699287884.stgit@magnolia> References: <160013417420.2923511.6825722200699287884.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 phishscore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150011 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 mlxscore=0 bulkscore=0 suspectscore=0 clxscore=1015 mlxlogscore=999 adultscore=0 priorityscore=1501 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150011 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong The setquota command can extend a quota grace period by a certain number of seconds. The extension is provided as a number of seconds relative to right now. However, if the system clock increments the seconds count after this test assigns $now but before setquota gets called, the test will fail because $get and $set will be off by that 1 second. Allow for that. Signed-off-by: Darrick J. Wong Reviewed-by: Zorro Lang Reviewed-by: Christoph Hellwig --- tests/generic/600 | 4 +++- tests/generic/601 | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/generic/600 b/tests/generic/600 index 7ea0d6c2..42e4ee55 100755 --- a/tests/generic/600 +++ b/tests/generic/600 @@ -60,7 +60,9 @@ let set=now+100 setquota -T -u $qa_user 0 100 $SCRATCH_MNT 2>&1 | grep -v "^setquota" get=`repquota -up $SCRATCH_MNT | grep "^$qa_user" | awk '{print $NF}'` -if [ "$get" != "$set" ]; then +# Either the new expiry must match; or be one second after the set time, to +# deal with the seconds counter incrementing. +if [ "$get" != "$set" ] && [ "$get" -ne "$((set + 1))" ]; then echo "set grace to $set but got grace $get" fi diff --git a/tests/generic/601 b/tests/generic/601 index 1baa6a90..b412ee8a 100755 --- a/tests/generic/601 +++ b/tests/generic/601 @@ -71,7 +71,9 @@ $XFS_QUOTA_PROG -x -c "timer -u -i 100 $qa_user" $SCRATCH_MNT # raw ("since epoch") grace expiry get=`repquota -up $SCRATCH_MNT | grep "^$qa_user" | awk '{print $NF}'` -if [ "$get" != "$set" ]; then +# Either the new expiry must match; or be one second after the set time, to +# deal with the seconds counter incrementing. +if [ "$get" != "$set" ] && [ "$get" -ne "$((set + 1))" ]; then echo "set grace to $set but got grace $get" fi From patchwork Tue Sep 15 01:43:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11775277 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 20F2E14F6 for ; Tue, 15 Sep 2020 01:45:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 06A6521655 for ; Tue, 15 Sep 2020 01:45:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="OxfCc8Zg" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726199AbgIOBp1 (ORCPT ); Mon, 14 Sep 2020 21:45:27 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:51342 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726178AbgIOBpT (ORCPT ); Mon, 14 Sep 2020 21:45:19 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1ikxu031207; Tue, 15 Sep 2020 01:45:18 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=S0nratNUDmAVWn1HogoEh+M2+urRpGz99fmYteFZIlg=; b=OxfCc8ZghxyzFzkEiC9ugp3qiodc9cWPznWc10G1vRhSCC6ZBhavIESins72//qMBbqC QosOttqMuVvhT1apjrSFAlsVDgLm2xa6niwCAC/Erl1tOT8YNlsgXAyTI1dfUFOpHaNC 8Q2hz6IC5DUUXj9OsWd9XreyUxI5/iAfgkYew5nsUyyJVgF7np14Chpc7fmmIHalEdfu iRP36MdvZY+Y9uyXatAeigSdCtZNK+J+y1eJGqgRHN62czubaGCcKp9aYIzyqKNZEsZX Ukz1w6qXYkBWnEw3b0GyJWUadV83o6c+2dKulHcN/rGLm1gR9l443XjJr+YULInKOLUp SQ== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 33gp9m1wv2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 15 Sep 2020 01:45:18 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1dloZ111547; Tue, 15 Sep 2020 01:43:17 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3020.oracle.com with ESMTP id 33hm2yccd5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Sep 2020 01:43:17 +0000 Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 08F1hGSG004017; Tue, 15 Sep 2020 01:43:16 GMT Received: from localhost (/10.159.147.241) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 15 Sep 2020 01:43:16 +0000 Subject: [PATCH 03/24] generic/607: don't break on filesystems that don't support FSGETXATTR on dirs From: "Darrick J. Wong" To: darrick.wong@oracle.com, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Mon, 14 Sep 2020 18:43:15 -0700 Message-ID: <160013419510.2923511.4577521065964693699.stgit@magnolia> In-Reply-To: <160013417420.2923511.6825722200699287884.stgit@magnolia> References: <160013417420.2923511.6825722200699287884.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 phishscore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150011 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 adultscore=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 phishscore=0 spamscore=0 priorityscore=1501 suspectscore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150012 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong This test requires that the filesystem support calling FSGETXATTR on regular files and directories to make sure the FS_XFLAG_DAX flag works. The _require_xfs_io_command tests a regular file but doesn't check directories, so generic/607 should do that itself. Also fix some typos. Signed-off-by: Darrick J. Wong Reviewed-by: Zorro Lang --- common/rc | 10 ++++++++-- tests/generic/607 | 5 +++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/common/rc b/common/rc index aa5a7409..f78b1cfc 100644 --- a/common/rc +++ b/common/rc @@ -2162,6 +2162,12 @@ _require_xfs_io_command() local testfile=$TEST_DIR/$$.xfs_io local testio case $command in + "lsattr") + # Test xfs_io lsattr support and filesystem FS_IOC_FSSETXATTR + # support. + testio=`$XFS_IO_PROG -F -f -c "lsattr $param" $testfile 2>&1` + param_checked="$param" + ;; "chattr") if [ -z "$param" ]; then param=s @@ -3205,7 +3211,7 @@ _check_s_dax() if [ $exp_s_dax -eq 0 ]; then (( attributes & 0x2000 )) && echo "$target has unexpected S_DAX flag" else - (( attributes & 0x2000 )) || echo "$target doen't have expected S_DAX flag" + (( attributes & 0x2000 )) || echo "$target doesn't have expected S_DAX flag" fi } @@ -3217,7 +3223,7 @@ _check_xflag() if [ $exp_xflag -eq 0 ]; then _test_inode_flag dax $target && echo "$target has unexpected FS_XFLAG_DAX flag" else - _test_inode_flag dax $target || echo "$target doen't have expected FS_XFLAG_DAX flag" + _test_inode_flag dax $target || echo "$target doesn't have expected FS_XFLAG_DAX flag" fi } diff --git a/tests/generic/607 b/tests/generic/607 index b15085ea..14d2c05f 100755 --- a/tests/generic/607 +++ b/tests/generic/607 @@ -38,6 +38,11 @@ _require_scratch _require_dax_iflag _require_xfs_io_command "lsattr" "-v" +# Make sure we can call FSGETXATTR on a directory... +output="$($XFS_IO_PROG -c "lsattr -v" $TEST_DIR 2>&1)" +echo "$output" | grep -q "Inappropriate ioctl for device" && \ + _notrun "$FSTYP: FSGETXATTR not supported on directories." + # If a/ is +x, check that a's new children # inherit +x from a/. test_xflag_inheritance1() From patchwork Tue Sep 15 01:43:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11775213 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4D84B746 for ; Tue, 15 Sep 2020 01:43:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 305A6214F1 for ; Tue, 15 Sep 2020 01:43:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="HqVwQC46" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726089AbgIOBn2 (ORCPT ); Mon, 14 Sep 2020 21:43:28 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:38840 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726019AbgIOBn0 (ORCPT ); Mon, 14 Sep 2020 21:43:26 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1eQup041912; Tue, 15 Sep 2020 01:43:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=mhJ+x4AqhOb7nA9f5ck12rJoo1nOVSaXEQZWsRax6gA=; b=HqVwQC46MTXjRVPJHQdTSbZ7q+tPuX7dMXFjy0GMXarUIlsNVYZkt3h6HmckQhX65RQF 9BGbJsXlAL5QteACYfJ6QTDh/LrHxybu+pRPYuMvwCmiZojtmwMadSn2XoDcotdmzA5U ZgsG1YG+iH4xL5wRQ4OJn73B1nwmQsPcsY/qyx2FcNMqGKRn0hykv6W54xDeDA2TrqYo QIbdI9NXhR2zkNGJ+jjRbtdnWQAi1LXWUxKNxZP2GrB+y6XffEhQfdOfa4E69BLRk0iY Y/4mGjnf+1SAVuq2WjnN3aqjg1VLAXxw4Jn0xqoCqBGZTE4DlVXVHx3UDNlRzA/RRYhL kA== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2120.oracle.com with ESMTP id 33j91dbhkr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 15 Sep 2020 01:43:24 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1dslN075960; Tue, 15 Sep 2020 01:43:23 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3030.oracle.com with ESMTP id 33h7wn6gf5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Sep 2020 01:43:23 +0000 Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 08F1hMmE004026; Tue, 15 Sep 2020 01:43:22 GMT Received: from localhost (/10.159.147.241) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 15 Sep 2020 01:43:22 +0000 Subject: [PATCH 04/24] xfs: skip tests that rely on allocation behaviors of the data device From: "Darrick J. Wong" To: darrick.wong@oracle.com, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Mon, 14 Sep 2020 18:43:21 -0700 Message-ID: <160013420138.2923511.15786976146213933728.stgit@magnolia> In-Reply-To: <160013417420.2923511.6825722200699287884.stgit@magnolia> References: <160013417420.2923511.6825722200699287884.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=2 malwarescore=0 adultscore=0 bulkscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150011 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 impostorscore=0 priorityscore=1501 malwarescore=0 suspectscore=2 mlxlogscore=999 clxscore=1015 adultscore=0 lowpriorityscore=0 spamscore=0 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150011 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong A large number of xfs-specific tests rely on specific behaviors of the data device allocator, such as fragmenting free space, carefully curated inode and free space counts, or features like filestreams that only exist on the data device. These tests fail horribly if the test runner specified rtinherit=1 on the mkfs command line, so skip them all. Signed-off-by: Darrick J. Wong Reviewed-by: Zorro Lang Reviewed-by: Christoph Hellwig --- tests/xfs/171 | 1 + tests/xfs/172 | 1 + tests/xfs/173 | 1 + tests/xfs/174 | 1 + tests/xfs/205 | 1 + tests/xfs/306 | 1 + tests/xfs/318 | 1 + tests/xfs/444 | 1 + 8 files changed, 8 insertions(+) diff --git a/tests/xfs/171 b/tests/xfs/171 index 050d02ab..a0d6e3f9 100755 --- a/tests/xfs/171 +++ b/tests/xfs/171 @@ -33,6 +33,7 @@ _supported_fs xfs _supported_os Linux _require_scratch +_require_no_rtinherit _check_filestreams_support || _notrun "filestreams not available" diff --git a/tests/xfs/172 b/tests/xfs/172 index c100481c..13f1f381 100755 --- a/tests/xfs/172 +++ b/tests/xfs/172 @@ -33,6 +33,7 @@ _supported_fs xfs _supported_os Linux _require_scratch +_require_no_rtinherit _check_filestreams_support || _notrun "filestreams not available" diff --git a/tests/xfs/173 b/tests/xfs/173 index 1569146f..47e1d029 100755 --- a/tests/xfs/173 +++ b/tests/xfs/173 @@ -33,6 +33,7 @@ _supported_fs xfs _supported_os Linux _require_scratch +_require_no_rtinherit _check_filestreams_support || _notrun "filestreams not available" diff --git a/tests/xfs/174 b/tests/xfs/174 index 781a1967..348f38c3 100755 --- a/tests/xfs/174 +++ b/tests/xfs/174 @@ -33,6 +33,7 @@ _supported_fs xfs _supported_os Linux _require_scratch +_require_no_rtinherit _check_filestreams_support || _notrun "filestreams not available" diff --git a/tests/xfs/205 b/tests/xfs/205 index 645e509a..6f1c2058 100755 --- a/tests/xfs/205 +++ b/tests/xfs/205 @@ -24,6 +24,7 @@ _supported_os Linux # single AG will cause xfs_repair to fail checks. _require_scratch_nocheck +_require_no_rtinherit rm -f $seqres.full diff --git a/tests/xfs/306 b/tests/xfs/306 index edbb6076..d2a0dd7f 100755 --- a/tests/xfs/306 +++ b/tests/xfs/306 @@ -35,6 +35,7 @@ _supported_fs xfs _supported_os Linux _require_scratch_nocheck # check complains about single AG fs +_require_no_rtinherit _require_xfs_io_command "fpunch" _require_command $UUIDGEN_PROG uuidgen diff --git a/tests/xfs/318 b/tests/xfs/318 index 83b858ea..a45301e2 100755 --- a/tests/xfs/318 +++ b/tests/xfs/318 @@ -33,6 +33,7 @@ _supported_fs xfs _require_scratch _require_error_injection _require_xfs_io_error_injection "rmap_finish_one" +_require_no_rtinherit rm -f $seqres.full diff --git a/tests/xfs/444 b/tests/xfs/444 index 6ed88715..e84b2cca 100755 --- a/tests/xfs/444 +++ b/tests/xfs/444 @@ -40,6 +40,7 @@ _require_scratch _require_test_program "punch-alternating" _require_xfs_io_command "falloc" _require_xfs_db_write_array +_require_no_rtinherit # This is only a v5 filesystem problem _require_scratch_xfs_crc From patchwork Tue Sep 15 01:43:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11775217 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C62CA618 for ; Tue, 15 Sep 2020 01:43:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AACB7208DB for ; Tue, 15 Sep 2020 01:43:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="ZzbNLtEx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726091AbgIOBnd (ORCPT ); Mon, 14 Sep 2020 21:43:33 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:38890 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726019AbgIOBnc (ORCPT ); Mon, 14 Sep 2020 21:43:32 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1eK5m041876; Tue, 15 Sep 2020 01:43:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=iCKVr3xR+EaxYJthUB/1fzzj0xhz3yNO5WC9Eg40NFk=; b=ZzbNLtExg0jYwK5NdDshF3V56ZvxNqHexMCm87+u7KFnKh9wuQTTvLTDpqQIwxCpVefd PRzRydmYD/c3D7kA9GkdMZWtlrHqV2IDpvgNG9QcseHbFBa7S9mK8NuUJFzakt1juGAv T71xZcUqu9aZmbTzbSrZkiajccmRKGK9XRezDF0Shg3Z6ifJ/Y3z4uVYpGQDSWCRPsoc TLKRqvDnB5Obxbwv8C0SVY8PbNlwcHtMyi3o8HYbY1SVtz6jXAVaUG7Uv1RMITS7pKXz xii4L0eF8VJbA7PRZj+CfWb49LdSu80g5+AmskbJz/JN3Nx/dNEYXrQ405EBGvUweg8r Pw== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 33j91dbhky-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 15 Sep 2020 01:43:30 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1eeWm022047; Tue, 15 Sep 2020 01:43:30 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3030.oracle.com with ESMTP id 33h88x2uqd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Sep 2020 01:43:30 +0000 Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 08F1hTxx001018; Tue, 15 Sep 2020 01:43:29 GMT Received: from localhost (/10.159.147.241) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 15 Sep 2020 01:43:28 +0000 Subject: [PATCH 05/24] xfs/031: make sure we don't set rtinherit=1 on mkfs From: "Darrick J. Wong" To: darrick.wong@oracle.com, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Mon, 14 Sep 2020 18:43:27 -0700 Message-ID: <160013420779.2923511.9462939883966946313.stgit@magnolia> In-Reply-To: <160013417420.2923511.6825722200699287884.stgit@magnolia> References: <160013417420.2923511.6825722200699287884.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 spamscore=0 adultscore=0 suspectscore=0 mlxscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150011 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 impostorscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 mlxlogscore=999 clxscore=1015 adultscore=0 lowpriorityscore=0 spamscore=0 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150011 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong mkfs.xfs does not support setting rtinherit on the root directory /and/ pre-populating the filesystem with protofiles, so don't run this test if rtinherit is in the mkfs options. Signed-off-by: Darrick J. Wong Reviewed-by: Zorro Lang --- tests/xfs/019 | 5 +++++ tests/xfs/031 | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/tests/xfs/019 b/tests/xfs/019 index f42b62bb..aa5365e7 100755 --- a/tests/xfs/019 +++ b/tests/xfs/019 @@ -51,6 +51,11 @@ _supported_os Linux _require_scratch +# mkfs cannot create a filesystem with protofiles if realtime is enabled, so +# don't run this test if the rtinherit is anywhere in the mkfs options. +echo "$MKFS_OPTIONS" | grep -q "rtinherit" && \ + _notrun "Cannot mkfs with a protofile and -d rtinherit." + protofile=$tmp.proto tempfile=$tmp.file diff --git a/tests/xfs/031 b/tests/xfs/031 index 6403fd40..671b6727 100755 --- a/tests/xfs/031 +++ b/tests/xfs/031 @@ -81,6 +81,11 @@ _supported_os Linux _require_scratch _require_no_large_scratch_dev +# mkfs cannot create a filesystem with protofiles if realtime is enabled, so +# don't run this test if the rtinherit is anywhere in the mkfs options. +echo "$MKFS_OPTIONS" | grep -q "rtinherit" && \ + _notrun "Cannot mkfs with a protofile and -d rtinherit." + # sanity test - default + one root directory entry # Note: must do this proto/mkfs now for later inode size calcs _create_proto 0 From patchwork Tue Sep 15 01:43:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11775221 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 53C36746 for ; Tue, 15 Sep 2020 01:43:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 348CA214F1 for ; Tue, 15 Sep 2020 01:43:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="hVLYYC2v" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726123AbgIOBnk (ORCPT ); Mon, 14 Sep 2020 21:43:40 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:38948 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726019AbgIOBni (ORCPT ); Mon, 14 Sep 2020 21:43:38 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1eGWa041853; Tue, 15 Sep 2020 01:43:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=sFgvWjRam3hAYwB94wb0Ny+jW41SlWwIQJShEkkRu8I=; b=hVLYYC2vmd+T741chFBgjDNVhhEkhBt5pcXhojCiotyTwn6gQ7VQogxh7YbqpFu/L3aq bU8y5toc/unls72jEQy3EID3yWpTmY/tJNWwVqEwJ+lre7/mQYQEeljHYGYiLHDZN/et LdUjdUrIWpZSbvf8nM0LlG46RwoXNG2MsrNDY59GfmgvKZ/ausfz2Yf7ZR0qutm+iUWA m6VrZRJG9eeueNXh9ThWFPPHHj6OBlesZbq3R3G7rcgVencGqcZ0tfiPC0n6ycMOVQ+P b8JIWyiOxNR7AS+hltulGRlEp8UjBIcb8s7kFInviYja3QCOoYHS1lUAAgcDF2CyfhPy OQ== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2120.oracle.com with ESMTP id 33j91dbhm4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 15 Sep 2020 01:43:36 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1du09076090; Tue, 15 Sep 2020 01:43:36 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3030.oracle.com with ESMTP id 33h7wn6gnb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Sep 2020 01:43:35 +0000 Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 08F1hZ3t004108; Tue, 15 Sep 2020 01:43:35 GMT Received: from localhost (/10.159.147.241) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 15 Sep 2020 01:43:35 +0000 Subject: [PATCH 06/24] xfs: wrap xfs_db calls to the test device From: "Darrick J. Wong" To: darrick.wong@oracle.com, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Mon, 14 Sep 2020 18:43:34 -0700 Message-ID: <160013421410.2923511.10970678307725348190.stgit@magnolia> In-Reply-To: <160013417420.2923511.6825722200699287884.stgit@magnolia> References: <160013417420.2923511.6825722200699287884.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 adultscore=0 bulkscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150011 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 impostorscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 mlxlogscore=999 clxscore=1015 adultscore=0 lowpriorityscore=0 spamscore=0 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150011 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Create a _test_xfs_db analogue to _scratch_xfs_db so that we can encapsulate whatever strange test fs options were fed to us by the test runner. Signed-off-by: Darrick J. Wong Reviewed-by: Zorro Lang Reviewed-by: Christoph Hellwig --- common/xfs | 13 +++++++++++++ tests/xfs/003 | 14 +++++++------- tests/xfs/016 | 4 ++-- tests/xfs/045 | 2 +- 4 files changed, 23 insertions(+), 10 deletions(-) diff --git a/common/xfs b/common/xfs index d9a9784f..eab5e292 100644 --- a/common/xfs +++ b/common/xfs @@ -218,6 +218,19 @@ _scratch_xfs_db() $XFS_DB_PROG "$@" $(_scratch_xfs_db_options) } +_test_xfs_db_options() +{ + TEST_OPTIONS="" + [ "$USE_EXTERNAL" = yes -a ! -z "$TEST_LOGDEV" ] && \ + TEST_OPTIONS="-l$TEST_LOGDEV" + echo $TEST_OPTIONS $* $TEST_DEV +} + +_test_xfs_db() +{ + $XFS_DB_PROG "$@" $(_test_xfs_db_options) +} + _scratch_xfs_admin() { local options=("$SCRATCH_DEV") diff --git a/tests/xfs/003 b/tests/xfs/003 index 1ce3e5ce..736bf206 100755 --- a/tests/xfs/003 +++ b/tests/xfs/003 @@ -38,32 +38,32 @@ test_done() # real QA test starts here echo "=== TEST 1 ===" -xfs_db -r -c 'pop' -c 'type sb' $TEST_DEV +_test_xfs_db -r -c 'pop' -c 'type sb' test_done echo "=== TEST 2 ===" -xfs_db -r -c 'push sb' $TEST_DEV +_test_xfs_db -r -c 'push sb' test_done echo "=== TEST 3 ===" -xfs_db -r -c 'pop' -c 'push sb' $TEST_DEV +_test_xfs_db -r -c 'pop' -c 'push sb' test_done echo "=== TEST 4 ===" -xfs_db -r -c 'type sb' -c 'print' $TEST_DEV +_test_xfs_db -r -c 'type sb' -c 'print' test_done echo "=== TEST 5 ===" -xfs_db -r -c 'inode 128' -c 'push' -c 'type' $TEST_DEV >$tmp.out 2>&1 +_test_xfs_db -r -c 'inode 128' -c 'push' -c 'type' >$tmp.out 2>&1 test_done if ! grep -q "current type is \"inode\"" $tmp.out; then cat $tmp.out fi echo "=== TEST 6 ===" -xfs_db -r -c 'sb' -c 'a' $TEST_DEV >$tmp.out 2>&1 # don't care about output +_test_xfs_db -r -c 'sb' -c 'a' >$tmp.out 2>&1 # don't care about output test_done echo "=== TEST 7 ===" -xfs_db -r -c 'ring' $TEST_DEV +_test_xfs_db -r -c 'ring' test_done diff --git a/tests/xfs/016 b/tests/xfs/016 index 2b41127e..e1b1b6b8 100755 --- a/tests/xfs/016 +++ b/tests/xfs/016 @@ -149,7 +149,7 @@ _log_sunit() _after_log() { - xfs_db -r $1 -c "sb" -c "print" | $AWK_PROG ' + _scratch_xfs_db -r -c "sb" -c "print" | $AWK_PROG ' /logstart/ { logstart = $3 } /logblocks/ { logblocks = $3 } END { @@ -163,7 +163,7 @@ _check_corrupt() f="c6c6c6c6" echo "*** check for corruption" echo "expect $f..." >>$seqres.full - xfs_db -r -c "fsblock $2" -c "print" $1 | head | tee -a $seqres.full | \ + _scratch_xfs_db -r -c "fsblock $2" -c "print" | head | tee -a $seqres.full | \ grep -q -v "$f $f $f $f $f $f $f $f" && \ _fail "!!! block $2 corrupted!" } diff --git a/tests/xfs/045 b/tests/xfs/045 index 0c9e1b79..6a44da56 100755 --- a/tests/xfs/045 +++ b/tests/xfs/045 @@ -21,7 +21,7 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15 _get_existing_uuid() { - xfs_db -r $TEST_DEV -c "uuid" | $AWK_PROG '/^UUID/ { print $3 }' + _test_xfs_db -r -c "uuid" | $AWK_PROG '/^UUID/ { print $3 }' } # real QA test starts here From patchwork Tue Sep 15 01:43:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11775225 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 64B3F746 for ; Tue, 15 Sep 2020 01:43:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 48E86214F1 for ; Tue, 15 Sep 2020 01:43:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="agfbbtaf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726069AbgIOBnr (ORCPT ); Mon, 14 Sep 2020 21:43:47 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:50172 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726019AbgIOBnq (ORCPT ); Mon, 14 Sep 2020 21:43:46 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1cqmC012873; Tue, 15 Sep 2020 01:43:42 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=uPrGD9Rdam4KA+phRxbDX9Q9/qEY+NgM2lVJEGdNTVk=; b=agfbbtafbsJ5D1T88Px4hEMOwM0AurBdhxdd2tEFO3UVIyIuMr7CrSaCKSzZIfvlgTj9 p8J/U1VDD3nKtHLSXDEUKutswDKfY0OT59GtYzvGh9wMbn9J2UwedUC0wjtRvgRk5t9o lQcb+7EVryvAC6dZmFW8p53klc9xmgMnLcui7ScwI7iRdxryHKZhz/NnSFoVufasUcgX U93O/PWmiCBpvjtcW21X6lt1BnzPv7Fq3JP2OGdPeNgh4RS2vDyTXB0iv+kZaXXSuYEa BxDeDgj0o+m6BHgubpyNDDaF8YCOIAnECjtCipk9g51k8bXEcIoksGfT90qK6Tas9G1b 4Q== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by aserp2120.oracle.com with ESMTP id 33gp9m1wr5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 15 Sep 2020 01:43:42 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1fPqb109438; Tue, 15 Sep 2020 01:43:42 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3020.oracle.com with ESMTP id 33h8837y6e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Sep 2020 01:43:42 +0000 Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 08F1hgap001129; Tue, 15 Sep 2020 01:43:42 GMT Received: from localhost (/10.159.147.241) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 15 Sep 2020 01:43:41 +0000 Subject: [PATCH 07/24] xfs/{111,137}: replace open-coded calls to repair with _scratch_xfs_repair From: "Darrick J. Wong" To: darrick.wong@oracle.com, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Mon, 14 Sep 2020 18:43:40 -0700 Message-ID: <160013422059.2923511.8441653519485642397.stgit@magnolia> In-Reply-To: <160013417420.2923511.6825722200699287884.stgit@magnolia> References: <160013417420.2923511.6825722200699287884.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 spamscore=0 adultscore=0 suspectscore=0 phishscore=0 malwarescore=0 bulkscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150011 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 adultscore=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 phishscore=0 spamscore=0 priorityscore=1501 suspectscore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150011 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Zorro Lang Reviewed-by: Christoph Hellwig --- tests/xfs/111 | 2 +- tests/xfs/137 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/xfs/111 b/tests/xfs/111 index 0db33cb8..1f778966 100755 --- a/tests/xfs/111 +++ b/tests/xfs/111 @@ -62,7 +62,7 @@ $XFS_FSR_PROG -g $SCRATCH_MNT | _filter_scratch # Fix up intentional corruption so test can pass _scratch_unmount -$XFS_REPAIR_PROG $SCRATCH_DEV >> $seqres.full 2>&1 +_scratch_xfs_repair >> $seqres.full 2>&1 status=0 exit diff --git a/tests/xfs/137 b/tests/xfs/137 index 79106c66..c10860bb 100755 --- a/tests/xfs/137 +++ b/tests/xfs/137 @@ -64,11 +64,11 @@ else fi # verify that repair detects invalid LSNs as well -$XFS_REPAIR_PROG -n $SCRATCH_DEV >> $seqres.full 2>&1 || \ +_scratch_xfs_repair -n >> $seqres.full 2>&1 || \ echo repair failure detected # repair for real so the post-test check can verify repair fixed things up -$XFS_REPAIR_PROG $SCRATCH_DEV >> $seqres.full 2>&1 +_scratch_xfs_repair >> $seqres.full 2>&1 # success, all done status=0 From patchwork Tue Sep 15 01:43:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11775229 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E30DC746 for ; Tue, 15 Sep 2020 01:43:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BFFDD21D7A for ; Tue, 15 Sep 2020 01:43:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="fB3qR5LA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726091AbgIOBnw (ORCPT ); Mon, 14 Sep 2020 21:43:52 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:45062 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726019AbgIOBnv (ORCPT ); Mon, 14 Sep 2020 21:43:51 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1hXb6147208; Tue, 15 Sep 2020 01:43:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=q886AmJtZoeXo+Bq3YFmONGlq7gyGxxKGk22uGwNQAM=; b=fB3qR5LA6kOWm58pFKBdI2/CuhKhWUhToTYbWifuV1uAU+2gZSUolo97Sm2vOVfBqfMZ BGSzfiEqpdyWevGjVFsb46Nta71z/PaKOAYC97y3wSuYsGX7t55BYQJpi55sLmYn6UR/ t1I3egQISGd6T0dJi3VVSa4ja3ZoR5EAoG3scAd2Y0DqmFOdMD+Pru7UVQbc6Cp0CCl1 dLP5L+nZ2EsQS6MAy7+Yr4JFSKqSq3ysRmIA18NIPc2TfHNTJQ2NVuxS5kmwPkycP7Ob 6QwNPh7AgOWwzAXC5Kj8AjCtNq3rQCYOq5yr9dr6b1vxfLniIniA1jGbGfMpQOKnuZV7 lg== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2130.oracle.com with ESMTP id 33gnrqsxtw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 15 Sep 2020 01:43:49 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1dt5L076049; Tue, 15 Sep 2020 01:43:48 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3030.oracle.com with ESMTP id 33h7wn6gtv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Sep 2020 01:43:48 +0000 Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 08F1hmRb001145; Tue, 15 Sep 2020 01:43:48 GMT Received: from localhost (/10.159.147.241) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 15 Sep 2020 01:43:48 +0000 Subject: [PATCH 08/24] xfs: replace open-coded calls to xfs_logprint with helpers From: "Darrick J. Wong" To: darrick.wong@oracle.com, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Mon, 14 Sep 2020 18:43:47 -0700 Message-ID: <160013422703.2923511.4608245885181531356.stgit@magnolia> In-Reply-To: <160013417420.2923511.6825722200699287884.stgit@magnolia> References: <160013417420.2923511.6825722200699287884.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 adultscore=0 bulkscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150011 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 mlxscore=0 bulkscore=0 suspectscore=0 clxscore=1015 mlxlogscore=999 adultscore=0 priorityscore=1501 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150012 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Use the test/scratch xfs_logprint helpers. Signed-off-by: Darrick J. Wong Reviewed-by: Zorro Lang Reviewed-by: Christoph Hellwig --- tests/xfs/135 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/xfs/135 b/tests/xfs/135 index cc505980..9783cfc2 100755 --- a/tests/xfs/135 +++ b/tests/xfs/135 @@ -48,7 +48,7 @@ for i in 16 32 64 128 256; do _scratch_xfs_db -x -c "logformat -c 3 -s $lsunit" | \ tee -a $seqres.full # don't redirect error output so it causes test failure - $XFS_LOGPRINT_PROG $SCRATCH_DEV >> $seqres.full + _scratch_xfs_logprint >> $seqres.full done # success, all done From patchwork Tue Sep 15 01:43:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11775235 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BE04C14F6 for ; Tue, 15 Sep 2020 01:44:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 995FD21741 for ; Tue, 15 Sep 2020 01:44:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="M42/ZXVe" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726136AbgIOBoA (ORCPT ); Mon, 14 Sep 2020 21:44:00 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:50298 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726131AbgIOBn5 (ORCPT ); Mon, 14 Sep 2020 21:43:57 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1dDqn012963; Tue, 15 Sep 2020 01:43:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=6xY5IL+38AWttvMR6v4Y+kP2QnNJmLgxNZkUwzoCPI4=; b=M42/ZXVeCiKKhwmGwp17UOisrgjdjaAOBwC0KBBHse190FGP6FKB5YXrY6REE0Hhp4OV SPVn/4B7W1unDrwkhyvgmXMe+p5iiCqMRfNh0ZWPB/L1YAxbaN6bToglUMSi5U/seDCS Zbk6abSYTfz7w25p0ksISIyxk+fICFPTfSMker7y/LxAU874P5yQpUBZVAntwobmfQpS JCdB/wHkkZOggC98cmUH8PBtlx8nCZmN5Ci4BpW2U2EzPBnYEmqi3m0XbdcBT8Osd2zm yKcJL4evYURQw0arRuBg3q5FafGDufTdVVP+zat6IKTfwLLvmhCkl4M8UurDZcvUt0UR vg== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 33gp9m1wrn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 15 Sep 2020 01:43:56 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1dsHP076012; Tue, 15 Sep 2020 01:43:55 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3030.oracle.com with ESMTP id 33h7wn6gya-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Sep 2020 01:43:55 +0000 Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 08F1hs3Y006929; Tue, 15 Sep 2020 01:43:54 GMT Received: from localhost (/10.159.147.241) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 15 Sep 2020 01:43:54 +0000 Subject: [PATCH 09/24] xfs/070: add scratch log device options to direct repair invocation From: "Darrick J. Wong" To: darrick.wong@oracle.com, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Mon, 14 Sep 2020 18:43:53 -0700 Message-ID: <160013423329.2923511.3252823001209034556.stgit@magnolia> In-Reply-To: <160013417420.2923511.6825722200699287884.stgit@magnolia> References: <160013417420.2923511.6825722200699287884.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 adultscore=0 bulkscore=0 phishscore=0 mlxlogscore=902 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150011 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=910 adultscore=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 phishscore=0 spamscore=0 priorityscore=1501 suspectscore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150011 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Zorro Lang Reviewed-by: Christoph Hellwig --- tests/xfs/070 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/xfs/070 b/tests/xfs/070 index 5d52a830..313864b7 100755 --- a/tests/xfs/070 +++ b/tests/xfs/070 @@ -41,9 +41,11 @@ _cleanup() _xfs_repair_noscan() { # invoke repair directly so we can kill the process if need be + [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \ + log_repair_opts="-l $SCRATCH_LOGDEV" [ "$USE_EXTERNAL" = yes ] && [ -n "$SCRATCH_RTDEV" ] && \ rt_repair_opts="-r $SCRATCH_RTDEV" - $XFS_REPAIR_PROG $rt_repair_opts $SCRATCH_DEV 2>&1 | + $XFS_REPAIR_PROG $log_repair_opts $rt_repair_opts $SCRATCH_DEV 2>&1 | tee -a $seqres.full > $tmp.repair & repair_pid=$! From patchwork Tue Sep 15 01:43:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11775287 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1D223618 for ; Tue, 15 Sep 2020 01:46:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0150F21741 for ; Tue, 15 Sep 2020 01:46:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="JAKTgZv4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726137AbgIOBqE (ORCPT ); Mon, 14 Sep 2020 21:46:04 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:51858 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726135AbgIOBqD (ORCPT ); Mon, 14 Sep 2020 21:46:03 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1irtF031281; Tue, 15 Sep 2020 01:46:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=BnJSZN8DIoLR3+BnhQP8IlL54jmgq8FGkBsMbcLnh2I=; b=JAKTgZv4C9XZwjJ6x7zMcYndt6iQbxW7H3qbwNu1CGMvxnMgW0+xLtOMzgXe0dDat08j 6w2+z0tVBTBOoxpU1AKYPBI7Rn/GA/ma+zoyJyan98PHzAzeNUMZmwzW/v3yvzAEtq+f 3N8lKNgCHERPqBgvm1zbXoLdSoxTlAvSLIo/z9+mS+nP4/T1/PLAQUfI+aSx90xdKlEs 8TOFCM4aSk0IxLNo+9QO0jMlpKMyN7ZEFl4zDY2OpbNIB0J5Eu7iSMODGDg3iHNl1EVE PDGhTHadtKuPvAW2fRoTFzZgooBu5aRg+iuwuKzTx4fFOlWpN6aHfwlPqX3zGtCfuTaU zg== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 33gp9m1wx2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 15 Sep 2020 01:46:01 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1dscM076003; Tue, 15 Sep 2020 01:44:01 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3030.oracle.com with ESMTP id 33h7wn6h21-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Sep 2020 01:44:01 +0000 Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 08F1i05R001220; Tue, 15 Sep 2020 01:44:00 GMT Received: from localhost (/10.159.147.241) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 15 Sep 2020 01:44:00 +0000 Subject: [PATCH 10/24] xfs: add a _require_xfs_copy helper From: "Darrick J. Wong" To: darrick.wong@oracle.com, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Mon, 14 Sep 2020 18:43:59 -0700 Message-ID: <160013423963.2923511.3348023490177095472.stgit@magnolia> In-Reply-To: <160013417420.2923511.6825722200699287884.stgit@magnolia> References: <160013417420.2923511.6825722200699287884.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 adultscore=0 bulkscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150011 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 adultscore=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 phishscore=0 spamscore=0 priorityscore=1501 suspectscore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150012 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Add a _require helper so that tests can ensure that they're running in the correct environment for xfs_copy to work (no external devices). Signed-off-by: Darrick J. Wong Reviewed-by: Zorro Lang Reviewed-by: Christoph Hellwig --- common/xfs | 7 +++++++ tests/xfs/032 | 4 +--- tests/xfs/073 | 5 +---- tests/xfs/077 | 3 +-- tests/xfs/284 | 3 +-- tests/xfs/503 | 1 + 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/common/xfs b/common/xfs index eab5e292..f4a47dfb 100644 --- a/common/xfs +++ b/common/xfs @@ -945,3 +945,10 @@ _try_wipe_scratch_xfs() fi rm -f $tmp.mkfs } + +_require_xfs_copy() +{ + [ -n "$XFS_COPY_PROG" ] || _notrun "xfs_copy binary not yet installed" + [ "$USE_EXTERNAL" = yes ] && \ + _notrun "Cannot xfs_copy with external devices" +} diff --git a/tests/xfs/032 b/tests/xfs/032 index af18f755..8ece957d 100755 --- a/tests/xfs/032 +++ b/tests/xfs/032 @@ -25,9 +25,7 @@ _supported_os Linux _require_scratch _require_test_program "feature" - -[ "$USE_EXTERNAL" = yes ] && _notrun "Cannot xfs_copy with external devices" -[ -n "$XFS_COPY_PROG" ] || _notrun "xfs_copy binary not yet installed" +_require_xfs_copy rm -f $seqres.full diff --git a/tests/xfs/073 b/tests/xfs/073 index 6939e102..dc0cde4f 100755 --- a/tests/xfs/073 +++ b/tests/xfs/073 @@ -113,10 +113,7 @@ _supported_fs xfs _supported_os Linux _require_test _require_attrs - -[ "$USE_EXTERNAL" = yes ] && _notrun "Cannot xfs_copy with external devices" -[ -n "$XFS_COPY_PROG" ] || _notrun "xfs_copy binary not yet installed" - +_require_xfs_copy _require_scratch _require_loop diff --git a/tests/xfs/077 b/tests/xfs/077 index 02bcc9f7..b11b2c07 100755 --- a/tests/xfs/077 +++ b/tests/xfs/077 @@ -35,8 +35,7 @@ _cleanup() _supported_fs xfs _supported_os Linux -# xfs_copy does not support realtime devices -_require_no_realtime +_require_xfs_copy _require_scratch _require_no_large_scratch_dev _require_xfs_crc diff --git a/tests/xfs/284 b/tests/xfs/284 index 7af77634..8f997e17 100755 --- a/tests/xfs/284 +++ b/tests/xfs/284 @@ -34,8 +34,7 @@ rm -f $seqres.full # real QA test starts here _supported_fs xfs _supported_os Linux -# xfs_copy does not support realtime devices -_require_no_realtime +_require_xfs_copy _require_test _require_scratch _require_no_large_scratch_dev diff --git a/tests/xfs/503 b/tests/xfs/503 index 41754353..756bcda3 100755 --- a/tests/xfs/503 +++ b/tests/xfs/503 @@ -33,6 +33,7 @@ testdir=$TEST_DIR/test-$seq _supported_os Linux _supported_fs xfs +_require_xfs_copy _require_scratch_nocheck _require_populate_commands From patchwork Tue Sep 15 01:44:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11775237 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4822A618 for ; Tue, 15 Sep 2020 01:44:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2CFAE21741 for ; Tue, 15 Sep 2020 01:44:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="UsMxCrhl" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726069AbgIOBoM (ORCPT ); Mon, 14 Sep 2020 21:44:12 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:45324 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726019AbgIOBoJ (ORCPT ); Mon, 14 Sep 2020 21:44:09 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1hYkB147225; Tue, 15 Sep 2020 01:44:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=eZKy1mv5hVN1JNBYemKOsswtMGqgnrBbnzQ3/iigUBo=; b=UsMxCrhljCsEiU9DTxX7cAJgxmGV+2gaE0As3bUZB9t3POPcFvUl2r4l3UwRbPaQr2vI Jr8UkTz6j8eThO4dKFPTLy2rwQpREK+ubloKIkOVvEMUe60QPfajyv6X6u67kXr8ixkc b0EQ5+PZSnt0Qc2eiFPAHgzuPdos6U7wVP1qT0EdV8erkey98PaER3Vr06lm/5PPkUJG rb5T6/5pDlwfhM3X+0RcN763oykIfX7exkPSy9evBEqHN71uXW8wQIkQh8dURFJX2Ea5 HDyK241Ivs/XKPtZHAb4kOYjdheyO471SS2Y15S0SfCBtLQTUsSeaZRiAa5NNIPO/Ec5 kQ== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 33gnrqsxv1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 15 Sep 2020 01:44:08 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1dm8t111649; Tue, 15 Sep 2020 01:44:08 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3020.oracle.com with ESMTP id 33hm2ycecp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Sep 2020 01:44:07 +0000 Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 08F1i7Ff020419; Tue, 15 Sep 2020 01:44:07 GMT Received: from localhost (/10.159.147.241) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 15 Sep 2020 01:44:06 +0000 Subject: [PATCH 11/24] overlay/{069,071}: fix undefined variables From: "Darrick J. Wong" To: darrick.wong@oracle.com, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Mon, 14 Sep 2020 18:44:05 -0700 Message-ID: <160013424591.2923511.7236445306723372509.stgit@magnolia> In-Reply-To: <160013417420.2923511.6825722200699287884.stgit@magnolia> References: <160013417420.2923511.6825722200699287884.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 bulkscore=0 mlxlogscore=829 malwarescore=0 mlxscore=0 phishscore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150011 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 mlxscore=0 bulkscore=0 suspectscore=0 clxscore=1015 mlxlogscore=849 adultscore=0 priorityscore=1501 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150012 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Change OVL_BASE_TEST_MNT -> OVL_BASE_TEST_DIR, since the former is not actually defined anywhere. Signed-off-by: Darrick J. Wong Reviewed-by: Amir Goldstein --- tests/overlay/069 | 2 +- tests/overlay/071 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/overlay/069 b/tests/overlay/069 index 77dfce63..f7eaec2d 100755 --- a/tests/overlay/069 +++ b/tests/overlay/069 @@ -53,7 +53,7 @@ _require_test_program "open_by_handle" _require_scratch_overlay_features index nfs_export redirect_dir # Lower overlay lower layer is on test fs, upper is on scratch fs -lower=$OVL_BASE_TEST_MNT/$OVL_LOWER-$seq +lower=$OVL_BASE_TEST_DIR/$OVL_LOWER-$seq upper=$OVL_BASE_SCRATCH_MNT/$OVL_UPPER work=$OVL_BASE_SCRATCH_MNT/$OVL_WORK diff --git a/tests/overlay/071 b/tests/overlay/071 index e083c29d..043fc4d3 100755 --- a/tests/overlay/071 +++ b/tests/overlay/071 @@ -56,7 +56,7 @@ _require_scratch_overlay_features index nfs_export redirect_dir _require_loop # Lower overlay lower layer is on test fs, upper is on scratch fs -lower=$OVL_BASE_TEST_MNT/$OVL_LOWER-$seq +lower=$OVL_BASE_TEST_DIR/$OVL_LOWER-$seq upper=$OVL_BASE_SCRATCH_MNT/$OVL_UPPER work=$OVL_BASE_SCRATCH_MNT/$OVL_WORK # Lower dir of nested overlay is the scratch overlay mount at SCRATCH_MNT From patchwork Tue Sep 15 01:44:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11775241 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5B52D746 for ; Tue, 15 Sep 2020 01:44:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 41017214F1 for ; Tue, 15 Sep 2020 01:44:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="PNLRxp2R" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726019AbgIOBoS (ORCPT ); Mon, 14 Sep 2020 21:44:18 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:50536 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726130AbgIOBoR (ORCPT ); Mon, 14 Sep 2020 21:44:17 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1dJUL012987; Tue, 15 Sep 2020 01:44:15 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=HZJmizr7+pUF3cuvWbKJzbl0H8BgQzkW7Owqrj6n3vk=; b=PNLRxp2RYDFmyF1/7jqySOW6afCnSsEdDiAdZhIaX472lWgwKHInEhZZhm3Jn10WPnJd Kmi3QEgeVh3kzzppdR60NVLr+2iAm6x741wfwJBu4iya69djbraeJ6agz8QyHbLTm/rg JjnY4sTNjH2LLePRPnloBL++G/uC8B53p1mhPY58R1tPc3fbb5Kk6uQfZGzMezjFWBnB OXmHgueAla69uTRtjPDAtrLhHnLb0S6jtfNKWWWcPwtSSf1gkvLYT4a9B0IatnLoYJeV cwov1fWthuFB7FBWLmbypQzeNTkpO3+FGCB6u/rTHD7/AqVZCZUrTrooJu0T2+xveHVp Kg== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 33gp9m1wse-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 15 Sep 2020 01:44:14 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1eeK9022063; Tue, 15 Sep 2020 01:44:14 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3030.oracle.com with ESMTP id 33h88x2vgb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Sep 2020 01:44:14 +0000 Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 08F1iD0n007071; Tue, 15 Sep 2020 01:44:13 GMT Received: from localhost (/10.159.147.241) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 15 Sep 2020 01:44:13 +0000 Subject: [PATCH 12/24] overlay/020: make sure the system supports the required namespaces From: "Darrick J. Wong" To: darrick.wong@oracle.com, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Mon, 14 Sep 2020 18:44:12 -0700 Message-ID: <160013425217.2923511.11863740582450765597.stgit@magnolia> In-Reply-To: <160013417420.2923511.6825722200699287884.stgit@magnolia> References: <160013417420.2923511.6825722200699287884.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 spamscore=0 adultscore=0 suspectscore=0 mlxscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150011 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 adultscore=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 phishscore=0 spamscore=0 priorityscore=1501 suspectscore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150011 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Don't run this test if the kernel doesn't support namespaces. Signed-off-by: Darrick J. Wong Reviewed-by: Amir Goldstein --- tests/overlay/020 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/overlay/020 b/tests/overlay/020 index 85488b83..9029f042 100755 --- a/tests/overlay/020 +++ b/tests/overlay/020 @@ -32,10 +32,16 @@ rm -f $seqres.full # real QA test starts here +require_unshare() { + unshare -f -r "$@" true &>/dev/null || \ + _notrun "unshare $@: not supported" +} + # Modify as appropriate. _supported_fs overlay _supported_os Linux _require_scratch +require_unshare -m -p -U # Remove all files from previous tests _scratch_mkfs From patchwork Tue Sep 15 01:44:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11775245 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 80808618 for ; Tue, 15 Sep 2020 01:44:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6174B208DB for ; Tue, 15 Sep 2020 01:44:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="tywnuZG+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726134AbgIOBoY (ORCPT ); Mon, 14 Sep 2020 21:44:24 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:39474 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726123AbgIOBoX (ORCPT ); Mon, 14 Sep 2020 21:44:23 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1iIsf059131; Tue, 15 Sep 2020 01:44:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=9d9M48UUJDIoK4CIWIBWIUF892H74kEBloIOiACd2S4=; b=tywnuZG+6mjTctaeD3hrHG1EAG9CVykGdXew/1E0KeOWh7E8y4h4MrF+2tsM2bHMPc7Z F8HkSP4ddEyiFrwX7f/oBabkmkDmnirtwR8eHNkSayAEyA7+9dMjElo3DQQd5wNQhDSD kbNV9dQJ8AJv93N4ynjLxFuLevsYLllNbo+T1xpn+GC+Fa/sNODq5sNs2boBHi1wiD3b HKpy8REHAUOdGUiXMqEgh6u9iA4nFr0QHgGE6rLIHzIZGLkVgoYgiyrnPDthFzQwtTB0 ICHYDwH40ghzl6mdH8CmrIfo35IsvOG/jAYYQ/kvXOSVqbN0Oc2Am5aPjp0LrTlV8brB aA== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2120.oracle.com with ESMTP id 33j91dbhnx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 15 Sep 2020 01:44:21 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1duK8076080; Tue, 15 Sep 2020 01:44:21 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3030.oracle.com with ESMTP id 33h7wn6hd3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Sep 2020 01:44:21 +0000 Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 08F1iJIL007122; Tue, 15 Sep 2020 01:44:19 GMT Received: from localhost (/10.159.147.241) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 15 Sep 2020 01:44:19 +0000 Subject: [PATCH 13/24] generic/204: don't flood stdout with ENOSPC messages on an ENOSPC test From: "Darrick J. Wong" To: darrick.wong@oracle.com, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Mon, 14 Sep 2020 18:44:18 -0700 Message-ID: <160013425839.2923511.10488499486430760605.stgit@magnolia> In-Reply-To: <160013417420.2923511.6825722200699287884.stgit@magnolia> References: <160013417420.2923511.6825722200699287884.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 adultscore=0 bulkscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150011 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 impostorscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 mlxlogscore=999 clxscore=1015 adultscore=0 lowpriorityscore=0 spamscore=0 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150012 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong This test has been on and off my bad list for many years due to the fact that it will spew potentially millions of "No space left on device" errors if the file count calculations are wrong. The calculations should be correct for the XFS data device, but they don't apply to other filesystems. Therefore, filter out the ENOSPC messages when the files are not going to be created on the xfs data device (e.g. ext4, xfs realtime, etc.) Signed-off-by: Darrick J. Wong Reviewed-by: Zorro Lang --- tests/generic/204 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/generic/204 b/tests/generic/204 index 349f5eff..7250c00a 100755 --- a/tests/generic/204 +++ b/tests/generic/204 @@ -76,9 +76,13 @@ files=$((space / (direntlen + isize + dbsize))) echo files $files, resvblks $resv_blks >> $seqres.full _scratch_resvblks $resv_blks >> $seqres.full 2>&1 +filter() { + test $FSTYP != xfs && sed -e '/No space left on device/d' +} + for i in `seq -w 1 $files`; do - echo -n > $SCRATCH_MNT/$i - echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > $SCRATCH_MNT/$i + (echo -n > $SCRATCH_MNT/$i; + echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > $SCRATCH_MNT/$i) 2>&1 | filter done # success, all done From patchwork Tue Sep 15 01:44:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11775289 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 36CDC618 for ; Tue, 15 Sep 2020 01:46:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1893C214F1 for ; Tue, 15 Sep 2020 01:46:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="KikI1KD5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726276AbgIOBqa (ORCPT ); Mon, 14 Sep 2020 21:46:30 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:40876 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726135AbgIOBq3 (ORCPT ); Mon, 14 Sep 2020 21:46:29 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1iGuO059091; Tue, 15 Sep 2020 01:46:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=HZ3NseXtTYtcravZxyBsnTn0FMgD+J8M98HCU3yLkUI=; b=KikI1KD5byvFsQ8vHsbHQpI0iOxl4Eyj66vJRABqHmz7l0sYJ/lDoEJFwNxqj7JqI+Rx aKGxCvX3YHktOcnazNSfmmGS9l2LjWBYH5rEFveI3f378/WzaINWoy/CfeFc+rSwnUei 3PQSWQ3bEu0kysYd2gYfUjugRSdpmsD4p5pBXi36doFk65CTyqRf4TXIAvLIWY+hed2n 9YSy3FVvYv0egrhy2B+GKpuCnGvhdg1EDGR6xI4O8eq2NRADIuYnsOe2l/j3vyWgekO6 BhJOPYwhPZog7Qb81OaS7dNYWA9zQCmQfT3A+g0DB3+bo1toAz72frUH8euXKw2xToA9 TQ== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2120.oracle.com with ESMTP id 33j91dbhub-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 15 Sep 2020 01:46:27 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1duda076091; Tue, 15 Sep 2020 01:44:26 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3030.oracle.com with ESMTP id 33h7wn6hfy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Sep 2020 01:44:26 +0000 Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 08F1iQO1004367; Tue, 15 Sep 2020 01:44:26 GMT Received: from localhost (/10.159.147.241) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 15 Sep 2020 01:44:25 +0000 Subject: [PATCH 14/24] common/xfs: extract minimum log size message from mkfs correctly From: "Darrick J. Wong" To: darrick.wong@oracle.com, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Mon, 14 Sep 2020 18:44:24 -0700 Message-ID: <160013426483.2923511.15242915902031465698.stgit@magnolia> In-Reply-To: <160013417420.2923511.6825722200699287884.stgit@magnolia> References: <160013417420.2923511.6825722200699287884.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 adultscore=0 bulkscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150011 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 impostorscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 mlxlogscore=999 clxscore=1015 adultscore=0 lowpriorityscore=0 spamscore=0 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150012 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Modify the command that searches for the minimum log size message from mkfs to handle external log devices correctly. Signed-off-by: Darrick J. Wong Reviewed-by: Zorro Lang Reviewed-by: Christoph Hellwig --- common/xfs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/common/xfs b/common/xfs index f4a47dfb..6520ad29 100644 --- a/common/xfs +++ b/common/xfs @@ -103,7 +103,7 @@ _scratch_find_xfs_min_logblocks() # try again without MKFS_OPTIONS because that's what _scratch_do_mkfs # will do if we pass in the log size option. if [ $mkfs_status -ne 0 ] && - ! grep -q 'log size.*too small, minimum' $tmp.mkfserr; then + ! egrep -q '(log size.*too small, minimum|external log device.*too small, must be)' $tmp.mkfserr; then eval "$mkfs_cmd $extra_mkfs_options $SCRATCH_DEV" \ 2>$tmp.mkfserr 1>$tmp.mkfsstd mkfs_status=$? @@ -126,6 +126,12 @@ _scratch_find_xfs_min_logblocks() rm -f $tmp.mkfsstd $tmp.mkfserr return fi + if grep -q 'external log device.*too small, must be' $tmp.mkfserr; then + grep 'external log device.*too small, must be' $tmp.mkfserr | \ + sed -e 's/^.*must be at least \([0-9]*\) blocks/\1/g' + rm -f $tmp.mkfsstd $tmp.mkfserr + return + fi # Don't know what to do, so fail echo "Cannot determine minimum log size" >&2 From patchwork Tue Sep 15 01:44:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11775259 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A7E56746 for ; Tue, 15 Sep 2020 01:44:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8C03A212CC for ; Tue, 15 Sep 2020 01:44:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="OYl7Gvl/" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726123AbgIOBou (ORCPT ); Mon, 14 Sep 2020 21:44:50 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:50928 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726068AbgIOBos (ORCPT ); Mon, 14 Sep 2020 21:44:48 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1il8g031223; Tue, 15 Sep 2020 01:44:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=Laru6fYCx+ItFhqawtcrLi11l6zlh5NjYH9DFlpIQSM=; b=OYl7Gvl/E/QEitBFWal/EBeE+/Ghu+GWzaHmNVZxBHTaiawnlQ3nBSpQCT2GKQcc/kjJ WTLdNNae4Gvq4gAKerE4tBSEIiGoDx1ilI/sK4QpY42fqdFuBHvrhwYmzrDJGYqQm872 5gDqCXg4kgmVgsj9aS6WtL3cnQc5J1ofkMMfbFaLSlx4vOxRED+zb3iLkuoFvkI0eMgd ceeRIxRDDmVgMoINS/3e29f4n09tKdHDKhhP986qmwpdrz/NcSgWsohSiqi+i+A7+S/N PO2gFI2CuYmA92triJZAJ1fGUMuiZ2qOKZUaXf0RKxf1LlVIXsjxFaDGPli6F6lh62o5 Qg== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 33gp9m1wtg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 15 Sep 2020 01:44:46 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1igOd028995; Tue, 15 Sep 2020 01:44:42 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3030.oracle.com with ESMTP id 33h88x2vsp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Sep 2020 01:44:42 +0000 Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 08F1iW2G007137; Tue, 15 Sep 2020 01:44:32 GMT Received: from localhost (/10.159.147.241) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 15 Sep 2020 01:44:32 +0000 Subject: [PATCH 15/24] xfs/194: actually check if we got 512-byte blocks before proceeding From: "Darrick J. Wong" To: darrick.wong@oracle.com, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Mon, 14 Sep 2020 18:44:31 -0700 Message-ID: <160013427110.2923511.12673259176007024613.stgit@magnolia> In-Reply-To: <160013417420.2923511.6825722200699287884.stgit@magnolia> References: <160013417420.2923511.6825722200699287884.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 spamscore=0 adultscore=0 suspectscore=0 mlxscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150012 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 adultscore=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 phishscore=0 spamscore=0 priorityscore=1501 suspectscore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150012 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong This test has specific fs block size requirements, so make sure that's what we got before we proceed with the test. Signed-off-by: Darrick J. Wong --- tests/xfs/194 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/xfs/194 b/tests/xfs/194 index 9001a146..90b74c8f 100755 --- a/tests/xfs/194 +++ b/tests/xfs/194 @@ -84,6 +84,9 @@ unset XFS_MKFS_OPTIONS # we need 512 byte block size, so crc's are turned off _scratch_mkfs_xfs -m crc=0 -b size=$blksize >/dev/null 2>&1 _scratch_mount +test "$(_get_block_size $SCRATCH_MNT)" = 512 || \ + _notrun "Could not get 512-byte blocks" + # 512b block / 4k page example: # From patchwork Tue Sep 15 01:44:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11775249 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C4390618 for ; Tue, 15 Sep 2020 01:44:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9F073214F1 for ; Tue, 15 Sep 2020 01:44:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="HCsFUECL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726062AbgIOBop (ORCPT ); Mon, 14 Sep 2020 21:44:45 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:39716 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726019AbgIOBoo (ORCPT ); Mon, 14 Sep 2020 21:44:44 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1igJK059246; Tue, 15 Sep 2020 01:44:42 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=kTsdAQYeyMCJr1nEM6SpNRfcqlTdh5wEAo3ts+HS6pQ=; b=HCsFUECLr03J0f4nNhMJkyYzqQd8oAQwoQl812D44tU7AFLk/20UYlM62rR9Kddfbuft JnEyRTumkP8X8vew2yT5j31/wHJirm059VPYM5BqA1tTZijXJnWcVh7DBo9tOjjBmbCd DUh7u4vrSLP9fvoPYf64fgLcnz4KDSty1gdsZ8lX4/vqBZeVsynkWeYAc5ywM7uiePWV VjLuS5STjMZTm6SU6XcpKTQeaa9k4PVtEhNi7jyD6swdCHbA5WP6BNl5d2jbSlW3Txja 6Ay3XFZXhXcNzgvBYwUbTWftdvoHqBas1H7ZphAKHtvLchy3VGu046UOR5Bo1lE+f+QW wA== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 33j91dbhpr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 15 Sep 2020 01:44:42 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1ifwO028965; Tue, 15 Sep 2020 01:44:42 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3030.oracle.com with ESMTP id 33h88x2vx3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Sep 2020 01:44:42 +0000 Received: from abhmp0020.oracle.com (abhmp0020.oracle.com [141.146.116.26]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 08F1icrT020647; Tue, 15 Sep 2020 01:44:39 GMT Received: from localhost (/10.159.147.241) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 15 Sep 2020 01:44:38 +0000 Subject: [PATCH 16/24] xfs/098: adapt to external log devices From: "Darrick J. Wong" To: darrick.wong@oracle.com, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Mon, 14 Sep 2020 18:44:37 -0700 Message-ID: <160013427739.2923511.11743171089779718213.stgit@magnolia> In-Reply-To: <160013417420.2923511.6825722200699287884.stgit@magnolia> References: <160013417420.2923511.6825722200699287884.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 spamscore=0 adultscore=0 suspectscore=0 mlxscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150012 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 impostorscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 mlxlogscore=999 clxscore=1015 adultscore=0 lowpriorityscore=0 spamscore=0 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150012 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Teach this test to deal with external log devices correctly. Signed-off-by: Darrick J. Wong Reviewed-by: Zorro Lang Reviewed-by: Christoph Hellwig --- tests/xfs/098 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/xfs/098 b/tests/xfs/098 index c63b9d60..b7d3253e 100755 --- a/tests/xfs/098 +++ b/tests/xfs/098 @@ -76,7 +76,13 @@ echo "+ corrupt image" logstart="$(_scratch_xfs_get_sb_field logstart)" logstart="$(_scratch_xfs_db -c "convert fsblock ${logstart} byte" | sed -e 's/^.*(\([0-9]*\).*$/\1/g')" logblocks="$(_scratch_xfs_get_sb_field logblocks)" -$XFS_IO_PROG -f -c "pwrite -S 0x62 ${logstart} $((logblocks * blksz))" "${SCRATCH_DEV}" >> $seqres.full + +if [ "$USE_EXTERNAL" = yes ] && [ ! -z "$SCRATCH_LOGDEV" ]; then + logdev=$SCRATCH_LOGDEV +else + logdev=$SCRATCH_DEV +fi +$XFS_IO_PROG -f -c "pwrite -S 0x62 ${logstart} $((logblocks * blksz))" $logdev >> $seqres.full echo "+ mount image" _try_scratch_mount 2>/dev/null && _fail "mount should not succeed" From patchwork Tue Sep 15 01:44:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11775253 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 65EE2618 for ; Tue, 15 Sep 2020 01:44:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 48B03214F1 for ; Tue, 15 Sep 2020 01:44:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="akX74dDu" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726091AbgIOBot (ORCPT ); Mon, 14 Sep 2020 21:44:49 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:45772 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726019AbgIOBos (ORCPT ); Mon, 14 Sep 2020 21:44:48 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1hxtO147347; Tue, 15 Sep 2020 01:44:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=AGvHyhQYdidQEllW/LNOOp8Px+ACBFNYf/vzQHP2Ats=; b=akX74dDuG52QWX1pBj2w1DXNF3TffA5pQwPABSHk2TtH0yzGJtiax8shDVHVjsnk3JFV GvIFPCpMUqncwOGiRVBC+2JVIYqjvmfkfUzajycVbekhe1uc3K5h//Lsvxy5RdBOrQ2y LirafI8gA7PyKkoB+yICLj9rnCpUglE+VYEuyv/B+UfI3QvPV5zmdNQaFiIdqnGAgx5n lrRoQMXVL/xJc/Nqya3mgCohMZGZmVn6eV0zcwWBHnLVys9O82mPGKCO5orm/fdNcGyx M0GB9nDvgFh97NuVObiUOo6fWpKxpvpmgXnPdgv2wUZLteL0VD6anMMwR4B91QAnphRk 4g== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2130.oracle.com with ESMTP id 33gnrqsxwd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 15 Sep 2020 01:44:46 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1dsh2075961; Tue, 15 Sep 2020 01:44:45 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3030.oracle.com with ESMTP id 33h7wn6htq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Sep 2020 01:44:45 +0000 Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 08F1ij07001487; Tue, 15 Sep 2020 01:44:45 GMT Received: from localhost (/10.159.147.241) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 15 Sep 2020 01:44:44 +0000 Subject: [PATCH 17/24] xfs: refactor _xfs_check calls to the scratch device From: "Darrick J. Wong" To: darrick.wong@oracle.com, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Mon, 14 Sep 2020 18:44:43 -0700 Message-ID: <160013428386.2923511.798805055641192515.stgit@magnolia> In-Reply-To: <160013417420.2923511.6825722200699287884.stgit@magnolia> References: <160013417420.2923511.6825722200699287884.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 adultscore=0 bulkscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150011 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 mlxscore=0 bulkscore=0 suspectscore=0 clxscore=1015 mlxlogscore=999 adultscore=0 priorityscore=1501 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150012 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Use _scratch_xfs_check, not _xfs_check $SCRATCH_DEV. Signed-off-by: Darrick J. Wong Reviewed-by: Zorro Lang Reviewed-by: Christoph Hellwig --- tests/xfs/291 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/xfs/291 b/tests/xfs/291 index 8a4b1354..adef2536 100755 --- a/tests/xfs/291 +++ b/tests/xfs/291 @@ -102,7 +102,7 @@ done _scratch_unmount # Can xfs_repair and xfs_check cope with this monster? _scratch_xfs_repair >> $seqres.full 2>&1 || _fail "xfs_repair failed" -_xfs_check $SCRATCH_DEV >> $seqres.full 2>&1 || _fail "xfs_check failed" +_scratch_xfs_check >> $seqres.full 2>&1 || _fail "xfs_check failed" # Yes they can! Now... # Can xfs_metadump cope with this monster? From patchwork Tue Sep 15 01:44:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11775261 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CAD0C746 for ; Tue, 15 Sep 2020 01:44:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AEE1D214F1 for ; Tue, 15 Sep 2020 01:44:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="BKVRv7Uc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726135AbgIOBo4 (ORCPT ); Mon, 14 Sep 2020 21:44:56 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:45844 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726068AbgIOBoz (ORCPT ); Mon, 14 Sep 2020 21:44:55 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1ier2147835; Tue, 15 Sep 2020 01:44:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=330miZwVEX4Rpugn8t8zKpEMqqoSKmffYc/nOOKEac8=; b=BKVRv7Uc/POfehjWJfGPDbFpmcbj2UqN1CMe1Stk6R3wTKwzdXb32CVXaoO2EPfQ5j3Z gUf6eYxkGbYni+416wFQ05Qr2AvVCiu8GVXZ1VeWcY6xKZfsP7myfgxK2fFxXU5aoLeR F0hvithQ3KL+M+nYjfbW2pZPBnRbWDr3UDLTbkJf0EteWBruDaJep3pHDqDLO7Wt0F7M 3Q7Qe3vi4rYLtidNlCZnS2LXBTrIYabD1RY9UMMdHPgxd/JXqoRZczMvlb24LEeb7Xg9 x5PHNVIxaMjiQ9pNV8it4ovnaDmXd/JHlPS8FyRw4Gmj+OfNqMT+38kxj030obOzJG5k OA== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2130.oracle.com with ESMTP id 33gnrqsxwn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 15 Sep 2020 01:44:53 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1fPfM109437; Tue, 15 Sep 2020 01:44:52 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3020.oracle.com with ESMTP id 33h88381mv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Sep 2020 01:44:52 +0000 Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 08F1ipOX020679; Tue, 15 Sep 2020 01:44:51 GMT Received: from localhost (/10.159.147.241) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 15 Sep 2020 01:44:51 +0000 Subject: [PATCH 18/24] xfs/291: fix open-coded repair call to mdrestore'd fs image From: "Darrick J. Wong" To: darrick.wong@oracle.com, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Mon, 14 Sep 2020 18:44:50 -0700 Message-ID: <160013429012.2923511.7187414322832672163.stgit@magnolia> In-Reply-To: <160013417420.2923511.6825722200699287884.stgit@magnolia> References: <160013417420.2923511.6825722200699287884.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 spamscore=0 adultscore=0 suspectscore=0 phishscore=0 malwarescore=0 bulkscore=0 mlxlogscore=975 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150011 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 mlxscore=0 bulkscore=0 suspectscore=0 clxscore=1015 mlxlogscore=982 adultscore=0 priorityscore=1501 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150012 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Attach any external log devices to the open-coded repair call. Signed-off-by: Darrick J. Wong Reviewed-by: Zorro Lang --- tests/xfs/291 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/xfs/291 b/tests/xfs/291 index adef2536..5d4f1ac4 100755 --- a/tests/xfs/291 +++ b/tests/xfs/291 @@ -110,7 +110,9 @@ _scratch_metadump $tmp.metadump || _fail "xfs_metadump failed" xfs_mdrestore $tmp.metadump $tmp.img || _fail "xfs_mdrestore failed" [ "$USE_EXTERNAL" = yes ] && [ -n "$SCRATCH_RTDEV" ] && \ rt_repair_opts="-r $SCRATCH_RTDEV" -$XFS_REPAIR_PROG $rt_repair_opts -f $tmp.img >> $seqres.full 2>&1 || \ +[ "$USE_EXTERNAL" = yes ] && [ -n "$SCRATCH_LOGDEV" ] && \ + log_repair_opts="-l $SCRATCH_LOGDEV" +$XFS_REPAIR_PROG $rt_repair_opts $log_repair_opts -f $tmp.img >> $seqres.full 2>&1 || \ _fail "xfs_repair of metadump failed" # Yes it can; success, all done From patchwork Tue Sep 15 01:44:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11775293 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1EE1C92C for ; Tue, 15 Sep 2020 01:47:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0400820771 for ; Tue, 15 Sep 2020 01:47:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="HRWfYpMd" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726064AbgIOBrD (ORCPT ); Mon, 14 Sep 2020 21:47:03 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:47144 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726057AbgIOBrC (ORCPT ); Mon, 14 Sep 2020 21:47:02 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1i5Uo147445; Tue, 15 Sep 2020 01:46:59 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=76hQgMbEEeHLaojm+wBPtYPe43PNt6BTtsupBb5F3j8=; b=HRWfYpMdZthkPj8pl1GqkhYl91XIPLLEPL2nyKgY1VvSYXMVTJvFg9dN68HLjGzPJVe/ 324zz+YeNlZYibTLpE02eSA+cNXkKA7ITuslU2Nh26Two6BAPKIKA99c+SdJb5tDA+o+ VE/GR9bdHldnH38iPK/jKx7YWZjlntO0wnV5DFSG3tROF8awzhCPSDiD1gQ8glzCJvJ1 wQQLr3FBI7ltGx77mC4GRzNWQwsVpiDedK6MLroYkn06fOy+fV5MujGNedvVwYvwPRES 89RBkewgm0SCDEelG0bsti9m3j0YfNFuo7oxjfRd2fzKWnN7cI26qMsgOLQh5JJETmP9 Rg== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2130.oracle.com with ESMTP id 33gnrqsy2n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 15 Sep 2020 01:46:59 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1fP1V109475; Tue, 15 Sep 2020 01:44:59 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3020.oracle.com with ESMTP id 33h88381v1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Sep 2020 01:44:58 +0000 Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 08F1iv3s020784; Tue, 15 Sep 2020 01:44:57 GMT Received: from localhost (/10.159.147.241) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 15 Sep 2020 01:44:57 +0000 Subject: [PATCH 19/24] xfs/424: disable external devices From: "Darrick J. Wong" To: darrick.wong@oracle.com, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Mon, 14 Sep 2020 18:44:56 -0700 Message-ID: <160013429643.2923511.17476130717295164051.stgit@magnolia> In-Reply-To: <160013417420.2923511.6825722200699287884.stgit@magnolia> References: <160013417420.2923511.6825722200699287884.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 spamscore=0 adultscore=0 suspectscore=0 phishscore=0 malwarescore=0 bulkscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150011 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 mlxscore=0 bulkscore=0 suspectscore=0 clxscore=1015 mlxlogscore=999 adultscore=0 priorityscore=1501 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150012 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong This test uses an open-coded call to mkfs, so we need to disable the external devices so that _scratch_xfs_db doesn't get confused. We also disable the post-check fsck because it's run by the parent ./check program, which won't know that we didn't use the external devices. Signed-off-by: Darrick J. Wong Reviewed-by: Zorro Lang Reviewed-by: Christoph Hellwig --- tests/xfs/424 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/xfs/424 b/tests/xfs/424 index 66d79458..4907cf0f 100755 --- a/tests/xfs/424 +++ b/tests/xfs/424 @@ -47,7 +47,13 @@ rm -f $seqres.full # Modify as appropriate _supported_os Linux _supported_fs xfs -_require_scratch + +# Since we have an open-coded mkfs call, disable the external devices and +# don't let the post-check fsck actually run since it'll trip over us not +# using the external devices. +_require_scratch_nocheck +export SCRATCH_LOGDEV= +export SCRATCH_RTDEV= echo "Silence is golden." From patchwork Tue Sep 15 01:45:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11775265 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6047192C for ; Tue, 15 Sep 2020 01:45:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 45BFD214F1 for ; Tue, 15 Sep 2020 01:45:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="TLJgxuxY" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726091AbgIOBpJ (ORCPT ); Mon, 14 Sep 2020 21:45:09 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:45998 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726062AbgIOBpH (ORCPT ); Mon, 14 Sep 2020 21:45:07 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1iBUt147465; Tue, 15 Sep 2020 01:45:05 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=yUMD9a5OoiDxVogijMMpxGUcklEVM6umGk+hlhTUJ0Y=; b=TLJgxuxYr0pOu/Rrl40sugcviDG3j5NgEyMgX5hP8VGzu6JN/lQeGrp7QXLUR+PKC5v7 L/OkKDl8j3ssKekBbbj+O5fZTzNLMJdM1wv/W0b6eklPu95o3Fip5d0/SgBxqPYhReV5 ODbFbP6Vnyc6kSRjWV9xdepTfFEUfCtZXRTDjzFumfnJi4xjmeEU5pe9KQMoZQzn2h8K qnJ5pEjB/Zq9C7VmMLGOGGC4qwNve1PzAW3G2O4/tgril9dBE/1vp3Y/ZHplEuW29iBO jHgHQvySl0AsIYBVSsp1Ku2q8orvzd5b6GAmF3eOPN3FF3RUH8wRgthXEpbbfqx8Ny7K Qw== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2130.oracle.com with ESMTP id 33gnrqsxxa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 15 Sep 2020 01:45:05 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1fPfR109437; Tue, 15 Sep 2020 01:45:04 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3020.oracle.com with ESMTP id 33h883824p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Sep 2020 01:45:04 +0000 Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 08F1j3HT001660; Tue, 15 Sep 2020 01:45:03 GMT Received: from localhost (/10.159.147.241) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 15 Sep 2020 01:45:03 +0000 Subject: [PATCH 20/24] xfs/449: fix xfs info report output if realtime device specified From: "Darrick J. Wong" To: darrick.wong@oracle.com, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Mon, 14 Sep 2020 18:45:02 -0700 Message-ID: <160013430267.2923511.8202421356162568130.stgit@magnolia> In-Reply-To: <160013417420.2923511.6825722200699287884.stgit@magnolia> References: <160013417420.2923511.6825722200699287884.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 spamscore=0 adultscore=0 suspectscore=0 phishscore=0 malwarescore=0 bulkscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150011 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 mlxscore=0 bulkscore=0 suspectscore=0 clxscore=1015 mlxlogscore=999 adultscore=0 priorityscore=1501 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150012 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Modify the mkfs.xfs output so that "realtime =/dev/XXX" becomes "realtime =external" so that the output will match xfs_db, which doesn't take a rt device argument and thus does not know. Signed-off-by: Darrick J. Wong Reviewed-by: Zorro Lang Reviewed-by: Christoph Hellwig --- tests/xfs/449 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/xfs/449 b/tests/xfs/449 index 83c3c493..938dbe28 100755 --- a/tests/xfs/449 +++ b/tests/xfs/449 @@ -46,7 +46,9 @@ cat $tmp.mkfs >> $seqres.full _scratch_xfs_db -c "info" > $tmp.dbinfo echo DB >> $seqres.full cat $tmp.dbinfo >> $seqres.full -diff -u $tmp.mkfs $tmp.dbinfo +# xfs_db doesn't take a rtdev argument, so it reports "realtime=external". +# mkfs does, so make a quick substitution +diff -u <(cat $tmp.mkfs | sed -e 's/realtime =\/.*extsz=/realtime =external extsz=/g') $tmp.dbinfo _scratch_mount From patchwork Tue Sep 15 01:45:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11775269 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2BDFA92C for ; Tue, 15 Sep 2020 01:45:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 12C5E216C4 for ; Tue, 15 Sep 2020 01:45:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="rV4t1KZO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726156AbgIOBpO (ORCPT ); Mon, 14 Sep 2020 21:45:14 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:51232 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726062AbgIOBpM (ORCPT ); Mon, 14 Sep 2020 21:45:12 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1ilop031237; Tue, 15 Sep 2020 01:45:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=/UENgHT+JqPB1/laXzd4VJ3skakw2bdCBXg+VAmTEiU=; b=rV4t1KZObpnCKm1rZOmjFAWhU7Wiq2+hDr5W22ZI5TpeGx1QbD2LW3MydR0V3Sarjb7P W1jJViIyyXYu1n/iQpnJGxtmeesSZY35p30M7uJzHlXgWn/QK2jVpOm8iA3zJ/AqhU9D gzCssJieuOg4/EW7igmkJXDsK4RPjFDr4j7UVk+xRODUV7iYSaSyqfSBJhQKBgkUlTgz nYmkGvv3XclMYjghHkFSZVrScvkuivcDIYpBoWPqb3rwYf2JGOe93n/y6egED/I+t5ZB bjIcsAJENdiJ0rxO6jvU30PRKQ8ZDWqK1nITOyQYlZH10Mb3ARbBxPAjF6tlLMnUriq3 ZQ== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 33gp9m1wus-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 15 Sep 2020 01:45:11 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1dsuI075952; Tue, 15 Sep 2020 01:45:10 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3030.oracle.com with ESMTP id 33h7wn6jdw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Sep 2020 01:45:10 +0000 Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 08F1jAAB004718; Tue, 15 Sep 2020 01:45:10 GMT Received: from localhost (/10.159.147.241) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 15 Sep 2020 01:45:10 +0000 Subject: [PATCH 21/24] common/rc: teach _scratch_mkfs_sized to set a size on an xfs realtime volume From: "Darrick J. Wong" To: darrick.wong@oracle.com, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Mon, 14 Sep 2020 18:45:08 -0700 Message-ID: <160013430895.2923511.7033338053997588353.stgit@magnolia> In-Reply-To: <160013417420.2923511.6825722200699287884.stgit@magnolia> References: <160013417420.2923511.6825722200699287884.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 adultscore=0 bulkscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150011 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 adultscore=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 phishscore=0 spamscore=0 priorityscore=1501 suspectscore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150012 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Generally speaking, tests that call _scratch_mkfs_sized are trying to constrain a test's run time by formatting a filesystem that's smaller than the device. The current helper does this for the scratch device, but it doesn't do this for the xfs realtime volume. If fstests has been configured to create files on the realtime device by default ("-d rtinherit=1) then those tests that want to run with a small volume size will instead be running with a huge realtime device. This makes certain tests take forever to run, so apply the same sizing to the rt volume if one exists. Signed-off-by: Darrick J. Wong Reviewed-by: Zorro Lang Reviewed-by: Christoph Hellwig --- common/rc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/common/rc b/common/rc index f78b1cfc..b2d45fa2 100644 --- a/common/rc +++ b/common/rc @@ -976,14 +976,20 @@ _scratch_mkfs_sized() [ "$fssize" -gt "$devsize" ] && _notrun "Scratch device too small" fi + if [ "$HOSTOS" == "Linux" ] && [ "$FSTYP" = "xfs" ] && [ -b "$SCRATCH_RTDEV" ]; then + local rtdevsize=`blockdev --getsize64 $SCRATCH_RTDEV` + [ "$fssize" -gt "$rtdevsize" ] && _notrun "Scratch rt device too small" + rt_ops="-r size=$fssize" + fi + case $FSTYP in xfs) # don't override MKFS_OPTIONS that set a block size. echo $MKFS_OPTIONS |egrep -q "b?size=" if [ $? -eq 0 ]; then - _scratch_mkfs_xfs -d size=$fssize + _scratch_mkfs_xfs -d size=$fssize $rt_ops else - _scratch_mkfs_xfs -d size=$fssize -b size=$blocksize + _scratch_mkfs_xfs -d size=$fssize $rt_ops -b size=$blocksize fi ;; ext2|ext3|ext4|ext4dev) From patchwork Tue Sep 15 01:45:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11775275 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F367A92C for ; Tue, 15 Sep 2020 01:45:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D7B7D208DB for ; Tue, 15 Sep 2020 01:45:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="rjfkO1ze" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726192AbgIOBpX (ORCPT ); Mon, 14 Sep 2020 21:45:23 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:51340 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726174AbgIOBpT (ORCPT ); Mon, 14 Sep 2020 21:45:19 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1jAsd031495; Tue, 15 Sep 2020 01:45:18 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=dtBMW03p1FAG3GBvJjSHy6PxIDhFPFkBmYQ5LiGyTbw=; b=rjfkO1zeFoB9I61pd6RltYharHyppxpgv+efL7CEEkxauJqjKQ/ASJDP7PDV78eBtnh/ m4BjcDmBlMeVWAmYZBkeWIGGbG0miDYOUwbsoWAeDNJkPa9i3ksAZkSCy2NFCfqCP2B6 GRHEAlDCg9kjpX3qGYoyblECeunq/+HW3/e63cyAnej86hxm3lIDSdGIApdn+pN5gImE tODBjQ/e48SDhOwVkYEDLXNl21YvOdhjMVsMQ89ddEZ80uaj/i7q4hLA/Rqs5dIfp5W3 4zREgasBO8UQlF6vvF5mLuRwD46LtJ9YIglTVy6XEDZ2OqjnFWoufaE+5e4SuYhYvjy4 Wg== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 33gp9m1wv5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 15 Sep 2020 01:45:18 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1dsuq075943; Tue, 15 Sep 2020 01:45:17 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3030.oracle.com with ESMTP id 33h7wn6jjj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Sep 2020 01:45:17 +0000 Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 08F1jGfb007460; Tue, 15 Sep 2020 01:45:16 GMT Received: from localhost (/10.159.147.241) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 15 Sep 2020 01:45:16 +0000 Subject: [PATCH 22/24] xfs/141: run for longer with TIME_FACTOR From: "Darrick J. Wong" To: darrick.wong@oracle.com, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Mon, 14 Sep 2020 18:45:15 -0700 Message-ID: <160013431528.2923511.17636617456077025611.stgit@magnolia> In-Reply-To: <160013417420.2923511.6825722200699287884.stgit@magnolia> References: <160013417420.2923511.6825722200699287884.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 adultscore=0 bulkscore=0 phishscore=0 mlxlogscore=851 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150011 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=859 adultscore=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 phishscore=0 spamscore=0 priorityscore=1501 suspectscore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150012 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Allow the test runner to run the crash loop in this test for longer by setting TIME_FACTOR. This has been useful for finding bugs in log recovery. Signed-off-by: Darrick J. Wong Reviewed-by: Zorro Lang Reviewed-by: Christoph Hellwig --- tests/xfs/141 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/xfs/141 b/tests/xfs/141 index 754ca37a..ef7210ff 100755 --- a/tests/xfs/141 +++ b/tests/xfs/141 @@ -50,7 +50,8 @@ _scratch_mount sdev=$(_short_dev $SCRATCH_DEV) -for i in $(seq 1 5); do +nr_times=$((TIME_FACTOR * 5)) +while [ $nr_times -gt 0 ]; do # Enable error injection. Use a random bad crc factor up to 100 # (increase this value to run fsstress longer). factor=$((RANDOM % 100 + 1)) @@ -65,6 +66,7 @@ for i in $(seq 1 5); do # write. _scratch_unmount _scratch_mount + nr_times=$((nr_times - 1)) done # success, all done From patchwork Tue Sep 15 01:45:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11775281 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F3FF892C for ; Tue, 15 Sep 2020 01:45:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D785E208DB for ; Tue, 15 Sep 2020 01:45:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="SMh7szOd" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726213AbgIOBpf (ORCPT ); Mon, 14 Sep 2020 21:45:35 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:46244 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726196AbgIOBp0 (ORCPT ); Mon, 14 Sep 2020 21:45:26 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1hkw4147281; Tue, 15 Sep 2020 01:45:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=0KJQL+rMZcad1L1L6dmzQBU6KxLdHJR9CCKNoVJSzv8=; b=SMh7szOdu1yWIjEvLW6WiAW8nyDosagcvUfy1MYcHDgXT9tQdHAfTHOeAvqEbaZIFK3u jOkKLf/cCo062AgFk4QwfN+5hbn3PKAKdnjTspDPGMr+My98reyIThM1hQnZL/qBib0d 2RtR/IC418V8Yqsn2kYh32L+7Bmehz6Ox2FD+tDBv+PIs42yBtSFbox/balnUdTeoGjE zXn6Otp4jjzBROTrVRuvrqzgP8X9Fu3ZdMLVcsBOq0R6QXbNxtCuxbWtYdrqZMeIFHre SaDLu3KA2knmcK5zJsmx3nTEaWtGAj/q2Ea5gEL9uSa/68muWioUL0j40QzqfChcxhOG BA== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2130.oracle.com with ESMTP id 33gnrqsxxs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 15 Sep 2020 01:45:24 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1jNFW116705; Tue, 15 Sep 2020 01:45:23 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3020.oracle.com with ESMTP id 33h88382mf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Sep 2020 01:45:23 +0000 Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 08F1jNl7004759; Tue, 15 Sep 2020 01:45:23 GMT Received: from localhost (/10.159.147.241) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 15 Sep 2020 01:45:22 +0000 Subject: [PATCH 23/24] generic/204: sync before scrub hits EIO From: "Darrick J. Wong" To: darrick.wong@oracle.com, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Mon, 14 Sep 2020 18:45:21 -0700 Message-ID: <160013432161.2923511.669329888874845585.stgit@magnolia> In-Reply-To: <160013417420.2923511.6825722200699287884.stgit@magnolia> References: <160013417420.2923511.6825722200699287884.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 spamscore=0 adultscore=0 suspectscore=0 phishscore=0 malwarescore=0 bulkscore=0 mlxlogscore=913 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150012 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 mlxscore=0 bulkscore=0 suspectscore=0 clxscore=1015 mlxlogscore=941 adultscore=0 priorityscore=1501 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150012 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Let's see if we can prevent fs corruption warnings by flushing dirty data to disk before the test ends. Signed-off-by: Darrick J. Wong Reviewed-by: Zorro Lang Reviewed-by: Christoph Hellwig --- tests/generic/204 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/generic/204 b/tests/generic/204 index 7250c00a..22d6fed5 100755 --- a/tests/generic/204 +++ b/tests/generic/204 @@ -18,6 +18,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 _cleanup() { rm -f $tmp.* + sync } # get standard environment, filters and checks From patchwork Tue Sep 15 01:45:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11775297 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9C9F392C for ; Tue, 15 Sep 2020 01:47:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 827BC21655 for ; Tue, 15 Sep 2020 01:47:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="qHwcbWC3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726131AbgIOBrd (ORCPT ); Mon, 14 Sep 2020 21:47:33 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:52858 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726034AbgIOBrc (ORCPT ); Mon, 14 Sep 2020 21:47:32 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1il9R031214; Tue, 15 Sep 2020 01:47:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=exqzEGpx9SPcPrNDzxxFjk25EbH87SsgpZs6FKUrq80=; b=qHwcbWC3s9V+6EnbYAfHSiYd3snvwZyn+dZ0P9X1Wqv4p/J8gBPpHuxwdT730BMi/uLe jgik93DD2CgntJTJZl7EG8f6sAbdfOmp/m6tvJlUO64NHAlbc/1SwmCaG3kVc+q638yw xv9hAFgq+3J04JNscDxioasJd54N6aVvnoLfntyt7Lt7ftHACNHDGEMVBB/K8zx2TgpL Q+n2XNZuFq933KnRvlbfxgR1Rx+52GZrHl4zeezN2EXaEjcE8Rj9VwTQ6IeBJ4fHync0 xp8RUZJmK1KV8PoCvmNdlVE19m3ykUaq1e6MA1Nv36k/mKdunLeSSRvoq2WTK+OZbnoE nw== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 33gp9m1x21-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 15 Sep 2020 01:47:31 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08F1igik029082; Tue, 15 Sep 2020 01:45:30 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3030.oracle.com with ESMTP id 33h88x2ws6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Sep 2020 01:45:30 +0000 Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 08F1jTaK007484; Tue, 15 Sep 2020 01:45:29 GMT Received: from localhost (/10.159.147.241) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 15 Sep 2020 01:45:29 +0000 Subject: [PATCH 24/24] check: try reloading modules From: "Darrick J. Wong" To: darrick.wong@oracle.com, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Mon, 14 Sep 2020 18:45:28 -0700 Message-ID: <160013432812.2923511.2856221820399528798.stgit@magnolia> In-Reply-To: <160013417420.2923511.6825722200699287884.stgit@magnolia> References: <160013417420.2923511.6825722200699287884.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 spamscore=0 adultscore=0 suspectscore=0 mlxscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150012 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9744 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 adultscore=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 phishscore=0 spamscore=0 priorityscore=1501 suspectscore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150012 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Optionally reload the module between each test to try to pinpoint slab cache errors and whatnot. Signed-off-by: Darrick J. Wong --- README | 3 +++ check | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/README b/README index d0e23fcd..4af331b4 100644 --- a/README +++ b/README @@ -106,6 +106,9 @@ Preparing system for tests: - set USE_KMEMLEAK=yes to scan for memory leaks in the kernel after every test, if the kernel supports kmemleak. - set KEEP_DMESG=yes to keep dmesg log after test + - Set TEST_FS_MODULE_RELOAD=1 to unload the module and reload + it between test invocations. This assumes that the name of + the module is the same as FSTYP. - or add a case to the switch in common/config assigning these variables based on the hostname of your test diff --git a/check b/check index 5ffa8777..29306262 100755 --- a/check +++ b/check @@ -810,6 +810,15 @@ function run_section() _check_dmesg || err=true fi + # Reload the module after each test to check for leaks or + # other problems. + if [ -n "${TEST_FS_MODULE_RELOAD}" ]; then + _test_unmount 2> /dev/null + _scratch_unmount 2> /dev/null + modprobe -r $FSTYP + modprobe $FSTYP + fi + # Scan for memory leaks after every test so that associating # a leak to a particular test will be as accurate as possible. _check_kmemleak || err=true From patchwork Fri Sep 18 02:10:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11783867 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1F00F59D for ; Fri, 18 Sep 2020 02:44:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EE3412388D for ; Fri, 18 Sep 2020 02:44:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="YtOKieNh" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728866AbgIRCo1 (ORCPT ); Thu, 17 Sep 2020 22:44:27 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:51134 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728455AbgIRCK3 (ORCPT ); Thu, 17 Sep 2020 22:10:29 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08I2AQWM100544; Fri, 18 Sep 2020 02:10:26 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2020-01-29; bh=RtIQmea5y53ySGgO4dqMNU/opUXSAC/hxLSpwdK3lF0=; b=YtOKieNhyJ5lENmbguzuf5vTYy0ZqPD3L6nK9Q127d+lg5aGKOCUyItdy0YgQNs1jgKK 3b0Nkyl+t4Hae+jQfGjhzOvuA6aeuyiG0qNgAAIhyUTj/CZkm65xGozv6v3G99EpgkrC kFpueTrHHT1jnHkOQLjLuay0L/ZBVmW++gnTLmbcd1SqmCzb2Bvws2sVzVsBr5W5pfL3 xzIVpm+tlRta0qNoSA9GS7X6wEvxqrfNrtKNdYjBdwb1vK70JkWfPK7zXKLZBzmy++jV Phv0VxbV6vbW+u3/XmEJnx/pItzz/SA0wbcsCNSbqxlE2rRHjE0Z3ZgJiswHCyI9yS+f dw== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2120.oracle.com with ESMTP id 33j91dx7cb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 18 Sep 2020 02:10:26 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08I25vbh130909; Fri, 18 Sep 2020 02:10:24 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 33hm35x9bw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 18 Sep 2020 02:10:24 +0000 Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 08I2AOqQ018700; Fri, 18 Sep 2020 02:10:24 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 18 Sep 2020 02:10:23 +0000 Date: Thu, 17 Sep 2020 19:10:22 -0700 From: "Darrick J. Wong" To: guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Subject: [PATCH 26/24] common: drop HOSTOS Message-ID: <20200918021022.GK7954@magnolia> References: <160013417420.2923511.6825722200699287884.stgit@magnolia> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <160013417420.2923511.6825722200699287884.stgit@magnolia> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9747 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 phishscore=0 adultscore=0 suspectscore=3 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009180019 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9747 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 impostorscore=0 priorityscore=1501 malwarescore=0 suspectscore=3 mlxlogscore=999 clxscore=1015 adultscore=0 lowpriorityscore=0 spamscore=0 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009180019 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong We effectively support only Linux these days, so drop most of the special casing of HOSTOS. We'll retain the simple check just in case someone tries to run this on a different operating system. Signed-off-by: Darrick J. Wong --- common/config | 50 ++++++++++++++++++++++---------------------------- common/rc | 20 ++------------------ common/xfs | 2 +- 3 files changed, 25 insertions(+), 47 deletions(-) diff --git a/common/config b/common/config index 1fe1e0e1..3de87ea7 100644 --- a/common/config +++ b/common/config @@ -46,7 +46,7 @@ export LC_ALL=C PATH=".:$PATH" export HOST=`hostname -s` -export HOSTOS=`uname -s` +test `uname -s` = "Linux" || _fatal "fstests only supports Linux" export MODULAR=0 # using XFS as a module or not export BOOT="/boot" # install target for kernels @@ -143,7 +143,7 @@ export PS_ALL_FLAGS="-ef" export DF_PROG="$(type -P df)" [ "$DF_PROG" = "" ] && _fatal "df not found" -[ "$HOSTOS" = "Linux" ] && export DF_PROG="$DF_PROG -T -P" +export DF_PROG="$DF_PROG -T -P" # Linux export XFS_IO_PROG="$(type -P xfs_io)" [ "$XFS_IO_PROG" = "" ] && _fatal "xfs_io not found" @@ -242,29 +242,25 @@ if [ "$UDEV_SETTLE_PROG" == "" ]; then fi export UDEV_SETTLE_PROG -case "$HOSTOS" in - Linux) - export MKFS_XFS_PROG=$(type -P mkfs.xfs) - export MKFS_EXT4_PROG=$(type -P mkfs.ext4) - export MKFS_UDF_PROG=$(type -P mkudffs) - export MKFS_BTRFS_PROG=$(set_mkfs_prog_path_with_opts btrfs) - export MKFS_F2FS_PROG=$(set_mkfs_prog_path_with_opts f2fs) - export DUMP_F2FS_PROG=$(type -P dump.f2fs) - export F2FS_IO_PROG=$(type -P f2fs_io) - export BTRFS_UTIL_PROG=$(type -P btrfs) - export BTRFS_SHOW_SUPER_PROG=$(type -P btrfs-show-super) - export BTRFS_CONVERT_PROG=$(type -P btrfs-convert) - export BTRFS_TUNE_PROG=$(type -P btrfstune) - export XFS_FSR_PROG=$(type -P xfs_fsr) - export MKFS_NFS_PROG="false" - export MKFS_CIFS_PROG="false" - export MKFS_OVERLAY_PROG="false" - export MKFS_REISER4_PROG=$(type -P mkfs.reiser4) - export E2FSCK_PROG=$(type -P e2fsck) - export TUNE2FS_PROG=$(type -P tune2fs) - export FSCK_OVERLAY_PROG=$(type -P fsck.overlay) - ;; -esac +export MKFS_XFS_PROG=$(type -P mkfs.xfs) +export MKFS_EXT4_PROG=$(type -P mkfs.ext4) +export MKFS_UDF_PROG=$(type -P mkudffs) +export MKFS_BTRFS_PROG=$(set_mkfs_prog_path_with_opts btrfs) +export MKFS_F2FS_PROG=$(set_mkfs_prog_path_with_opts f2fs) +export DUMP_F2FS_PROG=$(type -P dump.f2fs) +export F2FS_IO_PROG=$(type -P f2fs_io) +export BTRFS_UTIL_PROG=$(type -P btrfs) +export BTRFS_SHOW_SUPER_PROG=$(type -P btrfs-show-super) +export BTRFS_CONVERT_PROG=$(type -P btrfs-convert) +export BTRFS_TUNE_PROG=$(type -P btrfstune) +export XFS_FSR_PROG=$(type -P xfs_fsr) +export MKFS_NFS_PROG="false" +export MKFS_CIFS_PROG="false" +export MKFS_OVERLAY_PROG="false" +export MKFS_REISER4_PROG=$(type -P mkfs.reiser4) +export E2FSCK_PROG=$(type -P e2fsck) +export TUNE2FS_PROG=$(type -P tune2fs) +export FSCK_OVERLAY_PROG=$(type -P fsck.overlay) # SELinux adds extra xattrs which can mess up our expected output. # So, mount with a context, and they won't be created. @@ -753,9 +749,7 @@ if [ -z "$CONFIG_INCLUDED" ]; then # Autodetect fs type based on what's on $TEST_DEV unless it's been set # externally - if [ -z "$FSTYP" ] && \ - [ "$HOSTOS" == "Linux" -o "$OSTYPE" == "linux-gnu" ] && \ - [ ! -z "$TEST_DEV" ]; then + if [ -z "$FSTYP" ] && [ ! -z "$TEST_DEV" ]; then FSTYP=`blkid -c /dev/null -s TYPE -o value $TEST_DEV` fi FSTYP=${FSTYP:=xfs} diff --git a/common/rc b/common/rc index bbafc73d..3adeeefe 100644 --- a/common/rc +++ b/common/rc @@ -49,19 +49,13 @@ _math() dd() { - if [ "$HOSTOS" == "Linux" ] - then command dd --help 2>&1 | grep noxfer >/dev/null - if [ "$?" -eq 0 ] then command dd status=noxfer $@ else command dd $@ - fi - else - command dd $@ - fi + fi } # Prints the md5 checksum of a given file @@ -992,7 +986,7 @@ _scratch_mkfs_sized() local blocks=`expr $fssize / $blocksize` - if [ "$HOSTOS" == "Linux" -a -b "$SCRATCH_DEV" ]; then + if [ -b "$SCRATCH_DEV" ]; then local devsize=`blockdev --getsize64 $SCRATCH_DEV` [ "$fssize" -gt "$devsize" ] && _notrun "Scratch device too small" fi @@ -1764,11 +1758,6 @@ _require_logdev() # _require_loop() { - if [ "$HOSTOS" != "Linux" ] - then - _notrun "This test requires linux for loopback device support" - fi - modprobe loop >/dev/null 2>&1 if grep loop /proc/devices >/dev/null 2>&1 then @@ -1782,11 +1771,6 @@ _require_loop() # _require_ext2() { - if [ "$HOSTOS" != "Linux" ] - then - _notrun "This test requires linux for ext2 filesystem support" - fi - modprobe ext2 >/dev/null 2>&1 if grep ext2 /proc/filesystems >/dev/null 2>&1 then diff --git a/common/xfs b/common/xfs index 8a3fd30c..0f4b8521 100644 --- a/common/xfs +++ b/common/xfs @@ -481,7 +481,7 @@ _check_xfs_filesystem() $XFS_LOGPRINT_PROG -t $extra_log_options $device 2>&1 \ | tee $tmp.logprint | grep -q "" - if [ $? -ne 0 -a "$HOSTOS" = "Linux" ]; then + if [ $? -ne 0 ]; then _log_err "_check_xfs_filesystem: filesystem on $device has dirty log" echo "*** xfs_logprint -t output ***" >>$seqres.full cat $tmp.logprint >>$seqres.full From patchwork Fri Sep 18 02:11:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11783861 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D4CC659D for ; Fri, 18 Sep 2020 02:41:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ACAB623730 for ; Fri, 18 Sep 2020 02:41:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="RHeWMerw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727457AbgIRClJ (ORCPT ); Thu, 17 Sep 2020 22:41:09 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:51846 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727807AbgIRCLW (ORCPT ); Thu, 17 Sep 2020 22:11:22 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08I2AQUR100536; Fri, 18 Sep 2020 02:11:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2020-01-29; bh=X1wYdPxklvpY0TUe/W3b2PxhiaH4nIQYooJnRGNGZu0=; b=RHeWMerwihdGbAABlVa4B7hdUS6iMLvasDvGbO/UgILiIf2zzQq+rFlOcY++iLVJQZ1H lLZprTQtVXYdOgyQHpS+U5OVUx9KgLVYyFiiMoK8M09BaUC6ZcufOCEGxjEr7WaRezth ZU7gQqAlMPNxx+b32HVLeXdVBBtTV/5HdPmc2muaEETLs7mgOn3AjSayNxgatRIVq6iO 2tcXL0G0JAPuYY2qnPaGR9iDvSWYL5KvKInNTK8jKnKKPLUQZn8J30aAY1bo+QwIChQg 255hMbG9h8MquMPPdOqIAQAo3MxcK5LpRsTyTy/vk5WXIjIvsa2Z2FSXthB/9hhUqC+S Kw== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 33j91dx7ea-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 18 Sep 2020 02:11:12 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08I24pDD167163; Fri, 18 Sep 2020 02:11:12 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3030.oracle.com with ESMTP id 33megag5vc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 18 Sep 2020 02:11:12 +0000 Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 08I2BBud018993; Fri, 18 Sep 2020 02:11:11 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 18 Sep 2020 02:11:10 +0000 Date: Thu, 17 Sep 2020 19:11:09 -0700 From: "Darrick J. Wong" To: guaneryu@gmail.com, Christoph Hellwig Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Subject: [PATCH 27/24] common/rc: fix indentation in _scratch_mkfs_sized Message-ID: <20200918021109.GL7954@magnolia> References: <160013417420.2923511.6825722200699287884.stgit@magnolia> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <160013417420.2923511.6825722200699287884.stgit@magnolia> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9747 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=5 mlxscore=0 spamscore=0 mlxlogscore=999 adultscore=0 bulkscore=0 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009180019 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9747 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 impostorscore=0 priorityscore=1501 malwarescore=0 suspectscore=5 mlxlogscore=999 clxscore=1015 adultscore=0 lowpriorityscore=0 spamscore=0 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009180019 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Fix the weird indentation in _scratch_mkfs_sized. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- common/rc | 205 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 102 insertions(+), 103 deletions(-) diff --git a/common/rc b/common/rc index 3adeeefe..94936a8e 100644 --- a/common/rc +++ b/common/rc @@ -956,116 +956,115 @@ _available_memory_bytes() # _scratch_mkfs_sized [optional blocksize] _scratch_mkfs_sized() { - local fssize=$1 - local blocksize=$2 - local def_blksz + local fssize=$1 + local blocksize=$2 + local def_blksz - case $FSTYP in - xfs) - def_blksz=`echo $MKFS_OPTIONS|sed -rn 's/.*-b ?size= ?+([0-9]+).*/\1/p'` - ;; - ext2|ext3|ext4|ext4dev|udf|btrfs|reiser4|ocfs2|reiserfs) - def_blksz=`echo $MKFS_OPTIONS| sed -rn 's/.*-b ?+([0-9]+).*/\1/p'` - ;; - jfs) - def_blksz=4096 - ;; - esac + case $FSTYP in + xfs) + def_blksz=`echo $MKFS_OPTIONS | sed -rn 's/.*-b ?size= ?+([0-9]+).*/\1/p'` + ;; + ext2|ext3|ext4|ext4dev|udf|btrfs|reiser4|ocfs2|reiserfs) + def_blksz=`echo $MKFS_OPTIONS | sed -rn 's/.*-b ?+([0-9]+).*/\1/p'` + ;; + jfs) + def_blksz=4096 + ;; + esac - [ -n "$def_blksz" ] && blocksize=$def_blksz - [ -z "$blocksize" ] && blocksize=4096 + [ -n "$def_blksz" ] && blocksize=$def_blksz + [ -z "$blocksize" ] && blocksize=4096 + local re='^[0-9]+$' + if ! [[ $fssize =~ $re ]] ; then + _notrun "error: _scratch_mkfs_sized: fs size \"$fssize\" not an integer." + fi + if ! [[ $blocksize =~ $re ]] ; then + _notrun "error: _scratch_mkfs_sized: block size \"$blocksize\" not an integer." + fi - local re='^[0-9]+$' - if ! [[ $fssize =~ $re ]] ; then - _notrun "error: _scratch_mkfs_sized: fs size \"$fssize\" not an integer." - fi - if ! [[ $blocksize =~ $re ]] ; then - _notrun "error: _scratch_mkfs_sized: block size \"$blocksize\" not an integer." - fi - - local blocks=`expr $fssize / $blocksize` - - if [ -b "$SCRATCH_DEV" ]; then - local devsize=`blockdev --getsize64 $SCRATCH_DEV` - [ "$fssize" -gt "$devsize" ] && _notrun "Scratch device too small" - fi - - if [ "$FSTYP" = "xfs" ] && [ -b "$SCRATCH_RTDEV" ]; then - local rtdevsize=`blockdev --getsize64 $SCRATCH_RTDEV` - [ "$fssize" -gt "$rtdevsize" ] && _notrun "Scratch rt device too small" - rt_ops="-r size=$fssize" - fi + local blocks=`expr $fssize / $blocksize` - case $FSTYP in - xfs) - # don't override MKFS_OPTIONS that set a block size. - echo $MKFS_OPTIONS |egrep -q "b?size=" - if [ $? -eq 0 ]; then - _scratch_mkfs_xfs -d size=$fssize $rt_ops - else - _scratch_mkfs_xfs -d size=$fssize $rt_ops -b size=$blocksize - fi - ;; - ext2|ext3|ext4|ext4dev) - ${MKFS_PROG}.$FSTYP -F $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks - ;; - gfs2) - # mkfs.gfs2 doesn't automatically shrink journal files on small - # filesystems, so the journal files may end up being bigger than the - # filesystem, which will cause mkfs.gfs2 to fail. Until that's fixed, - # shrink the journal size to at most one eigth of the filesystem and at - # least 8 MiB, the minimum size allowed. - local min_journal_size=8 - local default_journal_size=128 - if (( fssize/8 / (1024*1024) < default_journal_size )); then - local journal_size=$(( fssize/8 / (1024*1024) )) - (( journal_size >= min_journal_size )) || journal_size=$min_journal_size - MKFS_OPTIONS="-J $journal_size $MKFS_OPTIONS" + if [ -b "$SCRATCH_DEV" ]; then + local devsize=`blockdev --getsize64 $SCRATCH_DEV` + [ "$fssize" -gt "$devsize" ] && _notrun "Scratch device too small" fi - ${MKFS_PROG}.$FSTYP $MKFS_OPTIONS -O -b $blocksize $SCRATCH_DEV $blocks - ;; - ocfs2) - yes | ${MKFS_PROG}.$FSTYP -F $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks - ;; - udf) - $MKFS_UDF_PROG $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks - ;; - btrfs) - local mixed_opt= - # minimum size that's needed without the mixed option. - # Ref: btrfs-prog: btrfs_min_dev_size() - # Non mixed mode is also the default option. - (( fssize < $((256 * 1024 *1024)) )) && mixed_opt='--mixed' - $MKFS_BTRFS_PROG $MKFS_OPTIONS $mixed_opt -b $fssize $SCRATCH_DEV - ;; - jfs) - ${MKFS_PROG}.$FSTYP $MKFS_OPTIONS $SCRATCH_DEV $blocks - ;; - reiserfs) - ${MKFS_PROG}.$FSTYP $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks - ;; - reiser4) - # mkfs.resier4 requires size in KB as input for creating filesystem - $MKFS_REISER4_PROG $MKFS_OPTIONS -y -b $blocksize $SCRATCH_DEV \ - `expr $fssize / 1024` - ;; - f2fs) - # mkfs.f2fs requires # of sectors as an input for the size - local sector_size=`blockdev --getss $SCRATCH_DEV` - $MKFS_F2FS_PROG $MKFS_OPTIONS $SCRATCH_DEV `expr $fssize / $sector_size` - ;; - tmpfs) - local free_mem=`_free_memory_bytes` - if [ "$free_mem" -lt "$fssize" ] ; then - _notrun "Not enough memory ($free_mem) for tmpfs with $fssize bytes" + + if [ "$FSTYP" = "xfs" ] && [ -b "$SCRATCH_RTDEV" ]; then + local rtdevsize=`blockdev --getsize64 $SCRATCH_RTDEV` + [ "$fssize" -gt "$rtdevsize" ] && _notrun "Scratch rt device too small" + rt_ops="-r size=$fssize" fi - export MOUNT_OPTIONS="-o size=$fssize $TMPFS_MOUNT_OPTIONS" - ;; - *) - _notrun "Filesystem $FSTYP not supported in _scratch_mkfs_sized" - ;; - esac + + case $FSTYP in + xfs) + # don't override MKFS_OPTIONS that set a block size. + echo $MKFS_OPTIONS |egrep -q "b?size=" + if [ $? -eq 0 ]; then + _scratch_mkfs_xfs -d size=$fssize $rt_ops + else + _scratch_mkfs_xfs -d size=$fssize $rt_ops -b size=$blocksize + fi + ;; + ext2|ext3|ext4|ext4dev) + ${MKFS_PROG}.$FSTYP -F $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks + ;; + gfs2) + # mkfs.gfs2 doesn't automatically shrink journal files on small + # filesystems, so the journal files may end up being bigger than the + # filesystem, which will cause mkfs.gfs2 to fail. Until that's fixed, + # shrink the journal size to at most one eigth of the filesystem and at + # least 8 MiB, the minimum size allowed. + local min_journal_size=8 + local default_journal_size=128 + if (( fssize/8 / (1024*1024) < default_journal_size )); then + local journal_size=$(( fssize/8 / (1024*1024) )) + (( journal_size >= min_journal_size )) || journal_size=$min_journal_size + MKFS_OPTIONS="-J $journal_size $MKFS_OPTIONS" + fi + ${MKFS_PROG}.$FSTYP $MKFS_OPTIONS -O -b $blocksize $SCRATCH_DEV $blocks + ;; + ocfs2) + yes | ${MKFS_PROG}.$FSTYP -F $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks + ;; + udf) + $MKFS_UDF_PROG $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks + ;; + btrfs) + local mixed_opt= + # minimum size that's needed without the mixed option. + # Ref: btrfs-prog: btrfs_min_dev_size() + # Non mixed mode is also the default option. + (( fssize < $((256 * 1024 *1024)) )) && mixed_opt='--mixed' + $MKFS_BTRFS_PROG $MKFS_OPTIONS $mixed_opt -b $fssize $SCRATCH_DEV + ;; + jfs) + ${MKFS_PROG}.$FSTYP $MKFS_OPTIONS $SCRATCH_DEV $blocks + ;; + reiserfs) + ${MKFS_PROG}.$FSTYP $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks + ;; + reiser4) + # mkfs.resier4 requires size in KB as input for creating filesystem + $MKFS_REISER4_PROG $MKFS_OPTIONS -y -b $blocksize $SCRATCH_DEV \ + `expr $fssize / 1024` + ;; + f2fs) + # mkfs.f2fs requires # of sectors as an input for the size + local sector_size=`blockdev --getss $SCRATCH_DEV` + $MKFS_F2FS_PROG $MKFS_OPTIONS $SCRATCH_DEV `expr $fssize / $sector_size` + ;; + tmpfs) + local free_mem=`_free_memory_bytes` + if [ "$free_mem" -lt "$fssize" ] ; then + _notrun "Not enough memory ($free_mem) for tmpfs with $fssize bytes" + fi + export MOUNT_OPTIONS="-o size=$fssize $TMPFS_MOUNT_OPTIONS" + ;; + *) + _notrun "Filesystem $FSTYP not supported in _scratch_mkfs_sized" + ;; + esac } # Emulate an N-data-disk stripe w/ various stripe units