From c5725c8c4bb21903490a48035286d0f94463642e Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 8 Aug 2024 18:37:48 +0100 Subject: [PATCH] tests: df-P.sh: fix intermittent false failure The test writes to the disk and means the space used changes. If this crosses a number boundary, the heading spacing can change: -Filesystem 1024-blocks Used Available Capacity Mounted on +Filesystem 1024-blocks Used Available Capacity Mounted on * tests/df/df-P.sh: Squash spaces with tr to avoid alignment variations. --- tests/df/df-P.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/df/df-P.sh b/tests/df/df-P.sh index 12fefb6f51..b559c3033e 100755 --- a/tests/df/df-P.sh +++ b/tests/df/df-P.sh @@ -29,8 +29,8 @@ BLOCK_SIZE=1M df -P . > t2 || fail=1 # while for 1K, it would be # Filesystem 1024-blocks Used Available Capacity Mounted on -head -n1 t1 > exp || fail=1 -head -n1 t2 > out || fail=1 +head -n1 t1 | tr -s ' ' > exp || framework_failure_ +head -n1 t2 | tr -s ' ' > out || framework_failure_ compare exp out || fail=1 -- 2.47.2