sfdisk, stderr/stdout output order
Hi,
I've found such test diffs with musl libc. Maybe it needs some fflush(3) calls.
--- /home/rudi/devel/util-linux/tests/expected/sfdisk/dos-read-dump
+++ /tmp/build-musl/tests/output/sfdisk/dos-read-dump
@@ -1,5 +1,3 @@
-Partition 5 does not start on physical sector boundary. -Partition 6 does not start on physical sector boundary.
Checking that no-one is using this disk right now ... OK
Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
@@ -23,7 +21,9 @@
<removed>1 * 2048 8191 6144 3M 83 Linux <removed>2 8192 14335 6144 3M 82 Linux swap / Solaris <removed>3 14336 20479 6144 3M 83 Linux
-<removed>4 20480 102399 81920 40M 5 Extended
+<removed>4 Partition 5 does not start on physical sector boundary.
+Partition 6 does not start on physical sector boundary.
+20480 102399 81920 40M 5 Extended
<removed>5 20481 26624 6144 3M 83 Linux
<removed>6 26626 102399 75774 37M 83 Linux
cu,
Rudi
Karel Zak
maintainerQuoted 4 lines · Rüdiger Meier
Hi,
I've found such test diffs with musl libc. Maybe it needs some fflush(3) calls.
Yes, good point. I'll fix it.
Karel
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com
Quoted 5 lines · Karel Zak
Quoted 2 lines · Rüdiger Meier
I've found such test diffs with musl libc. Maybe it needs some fflush(3) calls.
Yes, good point. I'll fix it.
I don't think you can enforce stdout/stderr to be synchronous. Well, you can try with "stdbuf(1)", but only having coreutils >v7.5 (2009). Why not check the output of both streams separately?
Have a nice day,
Berny
Karel Zak
maintainerQuoted 10 lines · Bernhard Voelker
Quoted 5 lines · Karel Zak
Quoted 2 lines · Rüdiger Meier
I've found such test diffs with musl libc. Maybe it needs some fflush(3) calls.
Yes, good point. I'll fix it.
I don't think you can enforce stdout/stderr to be synchronous. Well, you can try with "stdbuf(1)", but only having coreutils >v7.5 (2009). Why not check the output of both streams separately?
Well, it's not about tests (although check both streams separately will be improvement). The problem is that we write to stderr and stdout in fdisks, fflush(stdout) before warnings will make things more deterministic.
Karel
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com
Quoted 8 lines · On Thursday 10 March 2016 15:24:50 Karel Zak wrote:
Quoted 7 lines · Bernhard Voelker
Quoted 5 lines · Karel Zak
Quoted 2 lines · R=FCdiger Meier
I've found such test diffs with musl libc. Maybe it needs some fflush(3) calls.
Yes, good point. I'll fix it.
Quoted 8 lines
Quoted 3 lines
I don't think you can enforce stdout/stderr to be synchronous. Well, you can try with "stdbuf(1)", but only having coreutils >v7.5 (2009). Why not check the output of both streams separately?
Well, it's not about tests (although check both streams separately will be improvement). The problem is that we write to stderr and=20 stdout in fdisks, fflush(stdout) before warnings will make things more deterministic.
Yep, I had found more problems like in rename below. For rename we should probably fix the test rather than adding fflush().
=2D-- /home/rudi/devel/util-linux/tests/expected/rename/exit_codes +++ /tmp/build-musl/tests/output/rename/exit_codes=20
@@ -2,6 +2,6 @@
rename_exit_codes.1' -> rename_exit_values.1' rename_exit_codes.2' -> rename_exit_values.2'
EXIT_SUCCESS: 0
=2Drename: rename_exit_values.2: rename to rename_exit_codes.2 failed: Is a=
directory
rename_exit_values.1' -> rename_exit_codes.1'
+rename: rename_exit_values.2: rename to rename_exit_codes.2 failed: Is a d= irectory
RENAME_EXIT_SOMEOK: 2
cu,
Rudi