[LTP] [PATCH v5 10/10] df01.sh: Convert to TST_ALL_FILESYSTEMS=1
Petr Vorel
pvorel@suse.cz
Fri Sep 9 16:18:40 CEST 2022
Reviewed-by: Li Wang <liwang@redhat.com>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
The same as in v4
runtest/commands | 8 +-------
runtest/smoketest | 2 +-
testcases/commands/df/df01.sh | 32 +++++++++-----------------------
3 files changed, 11 insertions(+), 31 deletions(-)
diff --git a/runtest/commands b/runtest/commands
index 8cfad0449..5ec2c3b69 100644
--- a/runtest/commands
+++ b/runtest/commands
@@ -14,13 +14,7 @@ ln01_sh ln_tests.sh
mkdir01_sh mkdir_tests.sh
mv01_sh mv_tests.sh
du01_sh du01.sh
-df01_ext2_sh df01.sh -f ext2
-df01_ext3_sh df01.sh -f ext3
-df01_ext4_sh df01.sh -f ext4
-df01_xfs_sh df01.sh -f xfs
-df01_vfat_sh df01.sh -f vfat
-df01_exfat_sh df01.sh -f exfat
-df01_ntfs_sh df01.sh -f ntfs
+df01_sh df01.sh
mkfs01_sh mkfs01.sh
mkfs01_ext2_sh mkfs01.sh -f ext2
mkfs01_ext3_sh mkfs01.sh -f ext3
diff --git a/runtest/smoketest b/runtest/smoketest
index 485f211fb..83eebfe7b 100644
--- a/runtest/smoketest
+++ b/runtest/smoketest
@@ -12,7 +12,7 @@ stat04 symlink01 -T stat04
utime01A symlink01 -T utime01
rename01A symlink01 -T rename01
splice02 splice02 -s 20
-df01_ext4_sh df01.sh -f ext4
+df01_sh df01.sh
shell_test01 echo "SUCCESS" | shell_pipe01.sh
ping602 ping02.sh -6
macsec02 macsec02.sh
diff --git a/testcases/commands/df/df01.sh b/testcases/commands/df/df01.sh
index 1e86d1c40..ddfa9d9a7 100755
--- a/testcases/commands/df/df01.sh
+++ b/testcases/commands/df/df01.sh
@@ -6,35 +6,19 @@
#
# Test df command with some basic options.
+TST_ALL_FILESYSTEMS=1
TST_CNT=12
TST_SETUP=setup
TST_TESTFUNC=test
-TST_OPTS="f:"
-TST_USAGE=usage
-TST_PARSE_ARGS=parse_args
TST_NEEDS_ROOT=1
-TST_MOUNT_DEVICE=1
-
-usage()
-{
- cat << EOF
-usage: $0 [-f <ext2|ext3|ext4|vfat|...>]
-
-OPTIONS
--f Specify the type of filesystem to be built. If not
- specified, the default filesystem type (currently ext2)
- is used.
-EOF
-}
-
-parse_args()
-{
- TST_FS_TYPE="$2"
-}
setup()
{
- DF_FS_TYPE=$(mount | grep "$TST_DEVICE" | awk 'NR==1{print $5}')
+ DF_FS_TYPE="$TST_FS_TYPE"
+
+ if [ "$TST_FS_TYPE_FUSE" = 1 ]; then
+ DF_FS_TYPE="fuseblk"
+ fi
}
df_test()
@@ -180,7 +164,9 @@ test11()
test12()
{
- local cmd="df -x $DF_FS_TYPE -P"
+ local fs="$DF_FS_TYPE"
+
+ local cmd="df -x $fs -P"
df_verify $cmd
if [ $? -ne 0 ]; then
--
2.37.3
More information about the ltp
mailing list