lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 18 Nov 2020 07:39:39 -0800
From:   Saranya Muruganandam <saranyamohan@...gle.com>
To:     linux-ext4@...r.kernel.org, tytso@....edu
Cc:     adilger.kernel@...ger.ca, Andreas Dilger <adilger@...mcloud.com>,
        Saranya Muruganandam <saranyamohan@...gle.com>
Subject: [RFC PATCH v3 53/61] e2fsck: fix f_multithread_ok test

From: Andreas Dilger <adilger@...mcloud.com>

Don't use $OUT for both the input amd output of a pipeline,
as the output file is truncated befor the input is read.

Fix the handling in the failure case to generate the
*.failed file, and print the actual $test_name instead
of "test_name".

Signed-off-by: Andreas Dilger <adilger@...mcloud.com>
Signed-off-by: Saranya Muruganandam <saranyamohan@...gle.com>
---
 tests/f_multithread_ok/script | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/f_multithread_ok/script b/tests/f_multithread_ok/script
index 4010881b..c62c93ce 100644
--- a/tests/f_multithread_ok/script
+++ b/tests/f_multithread_ok/script
@@ -5,15 +5,15 @@ SKIP_CLEANUP="true"
 
 . $cmd_dir/run_e2fsck
 
-cat $OUT1 | grep -v Thread > $OUT1
-rm -f $test_name.ok $test_name.failed
-cmp -s $OUT1 $EXP1
+grep -v Thread $OUT1 > $OUT1.tmp
+cmp -s $OUT1.tmp $EXP1
 status1=$?
 if [ "$status1" -eq 0 ]; then
 	echo "$test_name: $test_description: ok"
 	touch $test_name.ok
 else
-	echo "test_name: $test_description: failed"
+	echo "$test_name: $test_description: failed"
+	cmp $OUT1.tmp $EXP1 > $test_name.failed
 fi
 
 unset IMAGE FSCK_OPT SECOND_FSCK_OPT OUT1 OUT2 EXP1 EXP2 
-- 
2.29.2.299.gdc1121823c-goog

Powered by blists - more mailing lists