From patchwork Thu Oct 29 19:52:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ritesh Harjani X-Patchwork-Id: 11867457 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 60F7C139F for ; Thu, 29 Oct 2020 19:53:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3711920825 for ; Thu, 29 Oct 2020 19:53:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="KSghU9Iw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726028AbgJ2TxS (ORCPT ); Thu, 29 Oct 2020 15:53:18 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:46652 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725780AbgJ2TxS (ORCPT ); Thu, 29 Oct 2020 15:53:18 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 09TJXRHk196154; Thu, 29 Oct 2020 15:53:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=QqwY4XihXOf86ySBA5WxNci+O2Si7XfCBSjMtTbChBY=; b=KSghU9IwPGOT0kYugnRMu65fvuVXgWjz6oL+kb+JhJWVWShW0v/vjI7vuSZ5CYEKtaHR sM7RvJK31UHwjDcnfNIDj0TJ2x6CwAjO2js++GNoN2tpiRl6uAr5VyewHQNoT9h4vpk5 dgyZSWb5uYQdR8LmUOGkodaXMo6WwS1lOZUOF6yF6gpyBClRQZslVqBcGxwZm18H7fgY zS5bkRDlhNP2ZLMnPC+YCORh/iweSY/HfNb5V3ihdUSIQaV5zo2r7fhnWpau+uVwA2/p dJ5LwewQ7HVMuqCJkI/5pioKzF7bGOHvQS9lw2kMiD3gBjQfeXolFcOBNInnWhJDxnpb Eg== Received: from ppma04fra.de.ibm.com (6a.4a.5195.ip4.static.sl-reverse.com [149.81.74.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 34g31ctf3k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 29 Oct 2020 15:53:15 -0400 Received: from pps.filterd (ppma04fra.de.ibm.com [127.0.0.1]) by ppma04fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 09TJmAcB016310; Thu, 29 Oct 2020 19:53:13 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma04fra.de.ibm.com with ESMTP id 34f7s3rs2m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 29 Oct 2020 19:53:12 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 09TJrAir36045232 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 Oct 2020 19:53:10 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5AD554C04A; Thu, 29 Oct 2020 19:53:10 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AD9044C040; Thu, 29 Oct 2020 19:53:08 +0000 (GMT) Received: from riteshh-domain.ibmuc.com (unknown [9.199.33.247]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 29 Oct 2020 19:53:08 +0000 (GMT) From: Ritesh Harjani To: fstests@vger.kernel.org Cc: anju@linux.vnet.ibm.com, Eryu Guan , linux-ext4@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-xfs@vger.kernel.org, Ritesh Harjani Subject: [PATCH 1/3] common/rc: Make swapon check in _require_scratch_swapfile() specific to btrfs Date: Fri, 30 Oct 2020 01:22:51 +0530 Message-Id: <6070d16aab6a61bbbc988fc68cc727c21ec7baef.1604000570.git.riteshh@linux.ibm.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-10-29_12:2020-10-29,2020-10-29 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 bulkscore=0 clxscore=1015 suspectscore=3 adultscore=0 malwarescore=0 mlxscore=0 mlxlogscore=999 lowpriorityscore=0 spamscore=0 impostorscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010290134 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org swapon/off check in _require_scratch_swapfile() was specifically added for btrfs[1]/[2] since in previous kernels, swapfile was not supported on btrfs. This rather masks the issue sometimes with swapon system call in case if it fails. for e.g. in latest ext4 upstream tree when "-g quick" (which ran swap tests too) was tested, all swap tests resulted into "_notrun" since swapon failed inside _require_scratch_swapfile() itself. Whereas this failure on ext4 was actually due to a regression with latest fast-commit patch, which went un-noticed. Hence make this swapon/off check only specific to btrfs. Tested default config of xfs/btrfs/ext4/f2fs with this patch. With this change on buggy kernel, we could clearly catch the swap failures. e.g. generic/472 17s ... <...> @@ -1,4 +1,7 @@ QA output created by 472 regular swap +swapon: Invalid argument too long swap +swapon: Invalid argument tiny swap +swapon: Invalid argument ... (Run 'diff -u /home/qemu/src/tools-work/xfstests-dev/tests/generic/472.out \ /home/qemu/src/tools-work/xfstests-dev/results//ext4/generic/472.out.bad' \ to see the entire diff) [1]: 8c96cfbfe530 ("generic/35[67]: disable swapfile tests on Btrfs") [2]: bd6d67ee598e ("generic: enable swapfile tests on Btrfs") Signed-off-by: Ritesh Harjani --- common/rc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/common/rc b/common/rc index b0c353c4c107..4c59968a6bd3 100644 --- a/common/rc +++ b/common/rc @@ -2358,18 +2358,20 @@ _require_scratch_swapfile() [ -n "$SELINUX_MOUNT_OPTIONS" ] && export \ SELINUX_MOUNT_OPTIONS="-o context=system_u:object_r:swapfile_t:s0" - _scratch_mount + if [ "$FSTYP" = "btrfs" ]; then + _scratch_mount + + # Minimum size for mkswap is 10 pages + _format_swapfile "$SCRATCH_MNT/swap" $(($(get_page_size) * 10)) - # Minimum size for mkswap is 10 pages - _format_swapfile "$SCRATCH_MNT/swap" $(($(get_page_size) * 10)) + if ! swapon "$SCRATCH_MNT/swap" >/dev/null 2>&1; then + _scratch_unmount + _notrun "swapfiles are not supported" + fi - if ! swapon "$SCRATCH_MNT/swap" >/dev/null 2>&1; then + swapoff "$SCRATCH_MNT/swap" >/dev/null 2>&1 _scratch_unmount - _notrun "swapfiles are not supported" fi - - swapoff "$SCRATCH_MNT/swap" >/dev/null 2>&1 - _scratch_unmount } # Check that a fs has enough free space (in 1024b blocks) From patchwork Thu Oct 29 19:52:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ritesh Harjani X-Patchwork-Id: 11867459 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 E3B286A2 for ; Thu, 29 Oct 2020 19:53:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B9A6E2083B for ; Thu, 29 Oct 2020 19:53:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="RgJlw5j4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725780AbgJ2TxU (ORCPT ); Thu, 29 Oct 2020 15:53:20 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:57672 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726073AbgJ2TxT (ORCPT ); Thu, 29 Oct 2020 15:53:19 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 09TJWH4o100020; Thu, 29 Oct 2020 15:53:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=Hs+sSwME8cN/ETcXqb7UZT/lCqhAOJNpiIjNgy5nNHQ=; b=RgJlw5j4vSjiTaxfjmG4M7svuRzWRd/vbFLZqsgP7Mw4SK6dtbeeCkHwwikL9SJdzb2g 4d/TOayDzhnyh9egwCEhDqJDdICd+VJfw05fggB1JAXCzBKu4WiN8hV92PX/pS1+7o8B ClJsrB5elje5jaLbSQnJcOxD3DOYx2Pr1KoVydfF6yiB4AUkYI5OsXPE75zbeuQ8SnUB rYgTQC4oG/6VjWlJtuj4C4zodf33A0VMy8eF1GldGG8hJjqJxCDJXxSVUdcEK7pKoRHq yUUSk8sQYr8PG6YuAQCaRe8KNAelmr2puDdXOAjZIW1yUSwV4CCyjdVEs/iygz7zOLCu Ow== Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0a-001b2d01.pphosted.com with ESMTP id 34fnh068yt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 29 Oct 2020 15:53:17 -0400 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 09TJm4aO025081; Thu, 29 Oct 2020 19:53:14 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma02fra.de.ibm.com with ESMTP id 34fvc487cs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 29 Oct 2020 19:53:14 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 09TJrCK033620242 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 Oct 2020 19:53:12 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6BE614C052; Thu, 29 Oct 2020 19:53:12 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BF64F4C040; Thu, 29 Oct 2020 19:53:10 +0000 (GMT) Received: from riteshh-domain.ibmuc.com (unknown [9.199.33.247]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 29 Oct 2020 19:53:10 +0000 (GMT) From: Ritesh Harjani To: fstests@vger.kernel.org Cc: anju@linux.vnet.ibm.com, Eryu Guan , linux-ext4@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-xfs@vger.kernel.org, Ritesh Harjani Subject: [PATCH 2/3] shared/001: Verify swapon on fallocated files for supported FS Date: Fri, 30 Oct 2020 01:22:52 +0530 Message-Id: <5750e38bb14440b6357a46470f2cd769cde1a349.1604000570.git.riteshh@linux.ibm.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-10-29_11:2020-10-29,2020-10-29 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 spamscore=0 mlxlogscore=999 lowpriorityscore=0 clxscore=1015 impostorscore=0 suspectscore=1 priorityscore=1501 adultscore=0 phishscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010290131 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Currently generic/496 tests if swapon works with fallocated files or not on the given FS and bails out with _not_run if it doesn't. Due to this 2 of the regressions went unnoticed in ext4. Hence this test is created specifically for FS (ext4, xfs) which does support swap functionality on unwritten extents to report an error if it swapon fails with fallocated fils. Signed-off-by: Ritesh Harjani --- tests/shared/001 | 97 ++++++++++++++++++++++++++++++++++++++++++++ tests/shared/001.out | 6 +++ tests/shared/group | 1 + 3 files changed, 104 insertions(+) create mode 100755 tests/shared/001 create mode 100644 tests/shared/001.out -- 2.26.2 diff --git a/tests/shared/001 b/tests/shared/001 new file mode 100755 index 000000000000..ad7285bdb709 --- /dev/null +++ b/tests/shared/001 @@ -0,0 +1,97 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2018 Oracle. All Rights Reserved. +# +# FS QA Test 001 +# +# This is similar to generic/472 and generic/496. +# Except that generic/496 is modified to focefully verify if +# swap works on fallocate files for given supported filesystems +# or not instead of bailing out with _not_run, if swapon cmd fails. +# Modified by Ritesh Harjani +# +seq=`basename $0` +seqres=$RESULT_DIR/$seq +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{ + cd / + swapoff $swapfile 2> /dev/null + rm -f $tmp.* +} + +# get standard environment, filters and checks +. ./common/rc +. ./common/filter + +# remove previous $seqres.full before test +rm -f $seqres.full + +# Modify as appropriate. +_supported_fs ext4 xfs +_require_scratch_swapfile +_require_test_program mkswap +_require_test_program swapon +_require_xfs_io_command "falloc" + +_scratch_mkfs >>$seqres.full 2>&1 +_scratch_mount >>$seqres.full 2>&1 + +swapfile=$SCRATCH_MNT/swap +len=$((2 * 1048576)) +page_size=$(get_page_size) + +swapfile_cycle() { + local swapfile="$1" + + if [ $# -eq 2 ]; then + local len="$2" + _pwrite_byte 0x58 0 $len $swapfile >> $seqres.full + fi + "$here/src/mkswap" $swapfile >> $seqres.full + "$here/src/swapon" $swapfile 2>&1 | _filter_scratch + swapoff $swapfile 2>> $seqres.full + rm -f $swapfile +} + +# from here similar to generic/472 +touch $swapfile + +# Create a regular swap file +echo "regular swap" | tee -a $seqres.full +swapfile_cycle $swapfile $len + +# Create a swap file with a little too much junk on the end +echo "too long swap" | tee -a $seqres.full +swapfile_cycle $swapfile $((len + 3)) + +# Create a ridiculously small swap file. Each swap file must have at least +# two pages after the header page. +echo "tiny swap" | tee -a $seqres.full +swapfile_cycle $swapfile $(($(get_page_size) * 3)) + +# From here similar to generic/496 +echo "fallocate swap" | tee -a $seqres.full +$XFS_IO_PROG -f -c "falloc 0 $len" $swapfile >> $seqres.full +"$here/src/mkswap" $swapfile +"$here/src/swapon" $swapfile 2>&1 | _filter_scratch +swapoff $swapfile + +# Create a fallocated swap file and touch every other $PAGE_SIZE to create +# a mess of written/unwritten extent records +echo "mixed swap" | tee -a $seqres.full +$XFS_IO_PROG -f -c "falloc 0 $len" $swapfile >> $seqres.full +seq $page_size $((page_size * 2)) $len | while read offset; do + _pwrite_byte 0x58 $offset 1 $swapfile >> $seqres.full +done +swapfile_cycle $swapfile + +# success, all done +status=0 +exit diff --git a/tests/shared/001.out b/tests/shared/001.out new file mode 100644 index 000000000000..2d7655e19422 --- /dev/null +++ b/tests/shared/001.out @@ -0,0 +1,6 @@ +QA output created by 001 +regular swap +too long swap +tiny swap +fallocate swap +mixed swap diff --git a/tests/shared/group b/tests/shared/group index a8b926d877d2..5a41b23c7010 100644 --- a/tests/shared/group +++ b/tests/shared/group @@ -3,6 +3,7 @@ # - do not start group names with a digit # - comment line before each group is "new" description # +001 auto swap quick 002 auto metadata quick log 032 mkfs auto quick 298 auto trim From patchwork Thu Oct 29 19:52:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ritesh Harjani X-Patchwork-Id: 11867463 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 7144E139F for ; Thu, 29 Oct 2020 19:53:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 475442083B for ; Thu, 29 Oct 2020 19:53:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="CFPhX2Li" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726133AbgJ2TxX (ORCPT ); Thu, 29 Oct 2020 15:53:23 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:9018 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725980AbgJ2TxW (ORCPT ); Thu, 29 Oct 2020 15:53:22 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 09TJYOm9127339; Thu, 29 Oct 2020 15:53:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=wqX6CLeoDapKERTcG3S0RVEmkQlKUlM+bdp1Fmhqzzo=; b=CFPhX2LiDdF4tCEGJoku8Y3x1Kdt0DosIumVMqHTO0VQxXguSbnrGLY3XGdnB5GsK6QK sB09s/uU2VNRsvegvTE025MKS/D8mkyob5tJnn/TOV+6+c9fifrOO9FAkH/3W06wGnnX 3vrq4pQmeq81tlu/bBnrvky3Xvkp0gcXveV8W4UlBFqrTgSv29htxpq8rIenXASWspjf L86iQPTPrdJOcjsbkrg310OS16UcRYETR27Rf8IGNuTw8CXgu5oO+Ej9+oganYmiTnhi 9CZe38QMh+s9FcoVzWhTKaTxClcjtSdzO3er99ktbzfZ0NDcuUkiDEJYFMCGf7ImtvJ+ EA== Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0b-001b2d01.pphosted.com with ESMTP id 34fwvewh0a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 29 Oct 2020 15:53:18 -0400 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 09TJkhTe022987; Thu, 29 Oct 2020 19:53:16 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma03ams.nl.ibm.com with ESMTP id 34e56quavj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 29 Oct 2020 19:53:16 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 09TJrEpO30933382 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 Oct 2020 19:53:14 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8E7B24C059; Thu, 29 Oct 2020 19:53:14 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CF3E54C040; Thu, 29 Oct 2020 19:53:12 +0000 (GMT) Received: from riteshh-domain.ibmuc.com (unknown [9.199.33.247]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 29 Oct 2020 19:53:12 +0000 (GMT) From: Ritesh Harjani To: fstests@vger.kernel.org Cc: anju@linux.vnet.ibm.com, Eryu Guan , linux-ext4@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-xfs@vger.kernel.org, Ritesh Harjani Subject: [PATCH 3/3] common/rc: source common/xfs and common/btrfs Date: Fri, 30 Oct 2020 01:22:53 +0530 Message-Id: <8d7db41971a227c5bd83677464d139399607e720.1604000570.git.riteshh@linux.ibm.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-10-29_12:2020-10-29,2020-10-29 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 suspectscore=1 mlxlogscore=940 bulkscore=0 phishscore=0 impostorscore=0 lowpriorityscore=0 adultscore=0 clxscore=1015 malwarescore=0 spamscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010290131 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Without this patch I am unable to test for multiple different filesystem sections for the same tests. Since we anyway have only function definitions in these files, so it should be ok to source it by default too. e.g. when I run ./check -s btrfs tests/generic/613 with 3 different [***_fs] sections from local.config file, I see below failures. ./common/rc: line 2801: _check_btrfs_filesystem: command not found ./check -s xfs_4k -g swap (for XFS this fails like below) ./common/rc: line 749: _scratch_mkfs_xfs: command not found check: failed to mkfs $SCRATCH_DEV using specified options Signed-off-by: Ritesh Harjani --- common/rc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/rc b/common/rc index 4c59968a6bd3..e9ba1b6e8265 100644 --- a/common/rc +++ b/common/rc @@ -3,6 +3,8 @@ # Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved. . common/config +. ./common/xfs +. ./common/btrfs BC=$(which bc 2> /dev/null) || BC=