From: Cyril Hrubis <chrubis@suse.cz>
To: Jan Stancek <jstancek@redhat.com>
Cc: LTP List <ltp-list@lists.sourceforge.net>
Subject: Re: [LTP] [PATCH] syscalls/getrusage03: flush stdout to avoid duplicated output
Date: Wed, 11 Jan 2012 13:56:42 +0100 [thread overview]
Message-ID: <20120111125642.GD7143@saboteur.suse.cz> (raw)
In-Reply-To: <974e6f10-853c-4e38-98ba-4bd6bdb6ac98@zmail16.collab.prod.int.phx2.redhat.com>
Hi!
> > > when executing with `$BIN/runltp` command, getrusage03 puts out
> > > duplicated information due to buffered stdout. Using fflush(stdout)
> > > to
> > > solve this issue.
> > >
> > > Signed-off-by: Caspar Zhang <caspar@casparzhang.com>
> > > ---
> > > testcases/kernel/syscalls/getrusage/getrusage03.c | 7 +++++++
> > > .../kernel/syscalls/getrusage/getrusage03_child.c | 1 +
> > > 2 files changed, 8 insertions(+), 0 deletions(-)
> > >
> >
> > Not sure if we have any better solution to avoid such buffered I/O
> > issue.
>
> How about "setvbuf(stdout, NULL, _IOLBF, 0);"?
>
I still think that this is a workaround for something that should be
either avoided or fixed on different level.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2012-01-11 12:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-10 3:38 [LTP] [PATCH] syscalls/getrusage03: flush stdout to avoid duplicated output Caspar Zhang
2012-01-10 3:40 ` Caspar Zhang
2012-01-10 3:43 ` Wanlong Gao
2012-01-11 12:20 ` Cyril Hrubis
2012-01-11 12:41 ` Jan Stancek
2012-01-11 12:56 ` Cyril Hrubis [this message]
[not found] ` <aa1139e7-47d6-40d4-8406-4cef27343f29@zmail16.collab.prod.int.phx2.redhat.com>
2012-01-11 14:34 ` Cyril Hrubis
[not found] ` <201201130101.06630.vapier@gentoo.org>
2012-01-13 13:07 ` Cyril Hrubis
[not found] ` <201201131216.03211.vapier@gentoo.org>
2012-01-18 16:17 ` Cyril Hrubis
[not found] ` <201201181139.19497.vapier@gentoo.org>
2012-01-19 17:43 ` Cyril Hrubis
[not found] ` <201201191334.47413.vapier@gentoo.org>
2012-01-20 14:37 ` Cyril Hrubis
2012-01-13 5:43 ` Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120111125642.GD7143@saboteur.suse.cz \
--to=chrubis@suse.cz \
--cc=jstancek@redhat.com \
--cc=ltp-list@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox