[LTP] [PATCH 1/1] df01.sh: Fix DF_FS_TYPE assignment on bind mount
Petr Vorel
pvorel@suse.cz
Mon Apr 26 20:59:05 CEST 2021
Hi,
Merged this one.
Kind regards,
Petr
> In case of bind mount of testing directory, grep will assign filesystem
> twice, with new line:
> $ echo "DF_FS_TYPE: '$DF_FS_TYPE'"
> DF_FS_TYPE: 'ext2
> ext2'
> Limiting only first line to avoid failure with confusing message:
> df01 5 TFAIL: 'df' failed.
> df: ext2: No such file or directory
> +++ b/testcases/commands/df/df01.sh
> @@ -39,7 +39,7 @@ setup()
> {
> tst_mkfs
> tst_mount
> - DF_FS_TYPE=$(mount | grep "$TST_DEVICE" | awk '{print $5}')
> + DF_FS_TYPE=$(mount | grep "$TST_DEVICE" | awk 'NR==1{print $5}')
> }
> df_test()
More information about the ltp
mailing list