All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests/util/grub-fs-tester: Add missing redirect to /dev/null
@ 2023-04-10  3:15 Glenn Washburn
  2023-04-12 13:30 ` Daniel Kiper
  0 siblings, 1 reply; 2+ messages in thread
From: Glenn Washburn @ 2023-04-10  3:15 UTC (permalink / raw)
  To: grub-devel, Daniel Kiper; +Cc: Glenn Washburn

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] tests/util/grub-fs-tester: Add missing redirect to /dev/null
  2023-04-10  3:15 [PATCH] tests/util/grub-fs-tester: Add missing redirect to /dev/null Glenn Washburn
@ 2023-04-12 13:30 ` Daniel Kiper
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Kiper @ 2023-04-12 13:30 UTC (permalink / raw)
  To: Glenn Washburn; +Cc: grub-devel

On Mon, Apr 10, 2023 at 03:15:57AM +0000, Glenn Washburn wrote:
> 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>

Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>

Daniel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-12 13:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-10  3:15 [PATCH] tests/util/grub-fs-tester: Add missing redirect to /dev/null Glenn Washburn
2023-04-12 13:30 ` Daniel Kiper

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.