* [LTP] [PATCH 1/1] df01.sh: Fix DF_FS_TYPE assignment on bind mount
@ 2021-04-01 12:47 Petr Vorel
2021-04-26 18:59 ` Petr Vorel
0 siblings, 1 reply; 2+ messages in thread
From: Petr Vorel @ 2021-04-01 12:47 UTC (permalink / raw)
To: ltp
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
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/commands/df/df01.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/commands/df/df01.sh b/testcases/commands/df/df01.sh
index 0e73a16af..f59676bfa 100755
--- a/testcases/commands/df/df01.sh
+++ 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()
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [LTP] [PATCH 1/1] df01.sh: Fix DF_FS_TYPE assignment on bind mount
2021-04-01 12:47 [LTP] [PATCH 1/1] df01.sh: Fix DF_FS_TYPE assignment on bind mount Petr Vorel
@ 2021-04-26 18:59 ` Petr Vorel
0 siblings, 0 replies; 2+ messages in thread
From: Petr Vorel @ 2021-04-26 18:59 UTC (permalink / raw)
To: ltp
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()
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-26 18:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-01 12:47 [LTP] [PATCH 1/1] df01.sh: Fix DF_FS_TYPE assignment on bind mount Petr Vorel
2021-04-26 18:59 ` Petr Vorel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.