[LTP] [PATCH v5 07/10] tst_test.sh: Introduce TST_FS_TYPE_FUSE
Cyril Hrubis
chrubis@suse.cz
Mon Sep 12 17:28:21 CEST 2022
Hi!
> @@ -307,6 +307,18 @@ tst_mount()
> if [ $ret -ne 0 ]; then
> tst_brk TBROK "Failed to mount device${mnt_err}: mount exit = $ret"
> fi
> +
> + mnt_real="$(grep -E "$TST_MNTPOINT ($TST_FS_TYPE|fuseblk)" /proc/mounts | awk 'NR==1{print $3}')"
> + case $mnt_real in
> + '') tst_brk TBROK 'Failed to found filesystem type in /proc/mounts';;
> + 'fuseblk') TST_FS_TYPE_FUSE=1;;
> + *)
> + if [ "$mnt_real" != "$TST_FS_TYPE" ]; then
> + tst_brk TBROK "$mnt_real: unsupported type in /proc/mounts"
> + fi
> + TST_FS_TYPE_FUSE=
> + ;;
> + esac
> }
I just wonder if this is worth being added to the test library just for
a single test. Or do you expect this to be usable in more than df01.sh?
Also maybe it would be a better as a function so that the code does not
run unconditionally on each tst_mount() call?
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list