All of lore.kernel.org
 help / color / mirror / Atom feed
* sfdisk, stderr/stdout output order
@ 2016-03-10 10:40 Rüdiger Meier
  2016-03-10 11:16 ` Karel Zak
  0 siblings, 1 reply; 5+ messages in thread
From: Rüdiger Meier @ 2016-03-10 10:40 UTC (permalink / raw)
  To: util-linux

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

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

* Re: sfdisk, stderr/stdout output order
  2016-03-10 10:40 sfdisk, stderr/stdout output order Rüdiger Meier
@ 2016-03-10 11:16 ` Karel Zak
  2016-03-10 14:08   ` Bernhard Voelker
  0 siblings, 1 reply; 5+ messages in thread
From: Karel Zak @ 2016-03-10 11:16 UTC (permalink / raw)
  To: Rüdiger Meier; +Cc: util-linux

On Thu, Mar 10, 2016 at 11:40:50AM +0100, Rüdiger Meier wrote:
> 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

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

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

* Re: sfdisk, stderr/stdout output order
  2016-03-10 11:16 ` Karel Zak
@ 2016-03-10 14:08   ` Bernhard Voelker
  2016-03-10 14:24     ` Karel Zak
  0 siblings, 1 reply; 5+ messages in thread
From: Bernhard Voelker @ 2016-03-10 14:08 UTC (permalink / raw)
  To: Karel Zak, Rüdiger Meier; +Cc: util-linux

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?

Have a nice day,
Berny

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

* Re: sfdisk, stderr/stdout output order
  2016-03-10 14:08   ` Bernhard Voelker
@ 2016-03-10 14:24     ` Karel Zak
  2016-03-10 14:35       ` Rüdiger Meier
  0 siblings, 1 reply; 5+ messages in thread
From: Karel Zak @ 2016-03-10 14:24 UTC (permalink / raw)
  To: Bernhard Voelker; +Cc: Rüdiger Meier, util-linux

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.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

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

* Re: sfdisk, stderr/stdout output order
  2016-03-10 14:24     ` Karel Zak
@ 2016-03-10 14:35       ` Rüdiger Meier
  0 siblings, 0 replies; 5+ messages in thread
From: Rüdiger Meier @ 2016-03-10 14:35 UTC (permalink / raw)
  To: Karel Zak; +Cc: Bernhard Voelker, util-linux



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=FCdiger 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=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

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

end of thread, other threads:[~2016-03-10 14:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-10 10:40 sfdisk, stderr/stdout output order Rüdiger Meier
2016-03-10 11:16 ` Karel Zak
2016-03-10 14:08   ` Bernhard Voelker
2016-03-10 14:24     ` Karel Zak
2016-03-10 14:35       ` Rüdiger Meier

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.