mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: shuah <shuah@kernel.org>
To: Takashi Iwai <tiwai@suse.de>, Kees Cook <keescook@chromium.org>
Cc: John Stultz <john.stultz@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Stephen Boyd <sboyd@kernel.org>,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	shuah <shuah@kernel.org>
Subject: Re: [PATCH 1/2] selftests: Remove forced unbuffering for test running
Date: Tue, 21 May 2019 08:12:43 -0600	[thread overview]
Message-ID: <e6a41345-7c98-751a-80bd-34d96e6de001@kernel.org> (raw)
In-Reply-To: <s5hlfz0757d.wl-tiwai@suse.de>

On 5/20/19 11:21 PM, Takashi Iwai wrote:
> On Tue, 21 May 2019 00:37:48 +0200,
> Kees Cook wrote:
>>
>> As it turns out, the "stdbuf" command will actually force all
>> subprocesses into unbuffered output, and some implementations of "echo"
>> turn into single-character writes, which utterly wrecks writes to /sys
>> and /proc files.
>>
>> Instead, drop the "stdbuf" usage, and for any tests that want explicit
>> flushing between newlines, they'll have to add "fflush(stdout);" as
>> needed.
>>
>> Reported-by: Takashi Iwai <tiwai@suse.de>
>> Fixes: 5c069b6dedef ("selftests: Move test output to diagnostic lines")
>> Signed-off-by: Kees Cook <keescook@chromium.org>
> 
> Tested-by: Takashi Iwai <tiwai@suse.de>
> 
> BTW, this might be specific to shell invocation.  As in the original
> discussion thread, it starts working when I replace "echo" with
> "/usr/bin/echo".
> 
> Still it's not easy to control in a script itself, so dropping the
> unbuffered mode is certainly safer, yes.
> 
> Thanks!

Thank you both.

I will get this in for next rc.

-- Shuah

  reply	other threads:[~2019-05-21 14:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-20 22:37 [PATCH v5.2-rc2 0/2] " Kees Cook
2019-05-20 22:37 ` [PATCH 1/2] " Kees Cook
2019-05-21  5:21   ` Takashi Iwai
2019-05-21 14:12     ` shuah [this message]
2019-05-20 22:37 ` [PATCH 2/2] selftests/timers: Add missing fflush(stdout) calls Kees Cook

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=e6a41345-7c98-751a-80bd-34d96e6de001@kernel.org \
    --to=shuah@kernel.org \
    --cc=john.stultz@linaro.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=sboyd@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tiwai@suse.de \
    /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

Powered by JetHome