]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fincore: (tests) fix double log output
authorChris Hofstaedtler <zeha@debian.org>
Tue, 18 Jul 2023 21:34:51 +0000 (23:34 +0200)
committerChris Hofstaedtler <zeha@debian.org>
Mon, 31 Jul 2023 08:47:19 +0000 (10:47 +0200)
The fincore tests call ts_log_both inside an output redirection of both stdout
and stderr, leading to the ts_log_both output ending up twice in both stdout
and stderr.
Call ts_log_both before setting up the output redirection.

Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
tests/ts/fincore/count

index ba5f6cd590bceb7e5bd28400ee4941d162f44fe5..c89ad9f89fe651c6f39f76e3348edf4ae87a6437 100755 (executable)
@@ -119,11 +119,11 @@ check_dd_fs_feat
 INPUT=
 input=
 
+ts_log_both "[ NO EXCITING FILE ]"
 {
     input=no_such_file
     INPUT="${INPUT} ${input}"
 
-    ts_log_both "[ NO EXCITING FILE ]"
     $TS_CMD_FINCORE --output $OUT_COLUMNS --bytes --noheadings $input
     footer "$?"
 } >> $TS_OUTPUT 2>> $TS_ERRLOG
@@ -220,8 +220,8 @@ input=
                   "oflag=append seek=$hole_count"
 } >> $TS_OUTPUT 2>> $TS_ERRLOG
 
+ts_log_both "[ MULTIPLE FILES ]"
 {
-    ts_log_both "[ MULTIPLE FILES ]"
     $TS_CMD_FINCORE --output $OUT_COLUMNS --bytes $INPUT
     footer "$?"
 } >> $TS_OUTPUT 2>> $TS_ERRLOG