grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] tests/util/grub-fs-tester: Add missing redirect to /dev/null


From: Glenn Washburn
Subject: [PATCH] tests/util/grub-fs-tester: Add missing redirect to /dev/null
Date: Mon, 10 Apr 2023 03:15:57 +0000

In filesystem timestamp test, a check is done to verify that the timestamp
for a file as reported in Linux by the filesystem is within a few seconds
of the timestamp as reported by GRUB. This is done by grepping the output
of GRUB's ls command for the timestamp as reported by the filesystem in
Linux and for each of 3 seconds past that timestamp. All of these checks
except one redirect the output of grep to /dev/null. Fix this exception
to behave as the other checks.

Signed-off-by: Glenn Washburn <development@efficientek.com>
---
 tests/util/grub-fs-tester.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/util/grub-fs-tester.in b/tests/util/grub-fs-tester.in
index 064464eb2..9cc6b5811 100644
--- a/tests/util/grub-fs-tester.in
+++ b/tests/util/grub-fs-tester.in
@@ -1465,7 +1465,7 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" 
"$MAXLOGSECSIZE" 1); do
                FSTIMEM2="$(date -d "$FSTIME UTC -2 second" -u "+%Y-%m-%d 
%H:%M:%S")"
                FSTIMEM3="$(date -d "$FSTIME UTC -3 second" -u "+%Y-%m-%d 
%H:%M:%S")"
 
-               if echo "$LSOUT" | grep -F 'Last modification time '"$FSTIME" > 
/dev/null || echo "$LSOUT" | grep -F 'Last modification time '"$FSTIMEM1" > 
/dev/null || echo "$LSOUT" | grep -F 'Last modification time '"$FSTIMEM2" || 
echo "$LSOUT" | grep -F 'Last modification time '"$FSTIMEM3" > /dev/null; then
+               if echo "$LSOUT" | grep -F 'Last modification time '"$FSTIME" > 
/dev/null || echo "$LSOUT" | grep -F 'Last modification time '"$FSTIMEM1" > 
/dev/null || echo "$LSOUT" | grep -F 'Last modification time '"$FSTIMEM2" > 
/dev/null || echo "$LSOUT" | grep -F 'Last modification time '"$FSTIMEM3" > 
/dev/null; then
                    :
                else
                    echo FSTIME FAIL
-- 
2.34.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]