Re: sfdisk, stderr/stdout output order

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

 




On Thursday 10 March 2016 15:24:50 Karel Zak wrote:
> On Thu, Mar 10, 2016 at 03:08:28PM +0100, Bernhard Voelker wrote:
> > On 03/10/2016 12:16 PM, Karel Zak wrote:
> > >On Thu, Mar 10, 2016 at 11:40:50AM +0100, Rüdiger Meier wrote:
> > >>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.

Yep, I had found more problems like in rename below. For rename we
should probably fix the test rather than adding fflush().

--- /home/rudi/devel/util-linux/tests/expected/rename/exit_codes
+++ /tmp/build-musl/tests/output/rename/exit_codes 
@@ -2,6 +2,6 @@
 `rename_exit_codes.1' -> `rename_exit_values.1'
 `rename_exit_codes.2' -> `rename_exit_values.2'
 EXIT_SUCCESS: 0
-rename: 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 directory
 RENAME_EXIT_SOMEOK: 2

cu,
Rudi
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux