From: Kees Cook <keescook@chromium.org>
To: Takashi Iwai <tiwai@suse.de>
Cc: shuah <shuah@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Luis Chamberlain <mcgrof@kernel.org>,
"Rafael J . Wysocki" <rafael@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/5] firmware: Add support for loading compressed files
Date: Mon, 20 May 2019 14:50:03 -0700 [thread overview]
Message-ID: <201905201446.B1CE073E@keescook> (raw)
In-Reply-To: <s5hwoil6jgd.wl-tiwai@suse.de>
On Mon, May 20, 2019 at 08:59:14PM +0200, Takashi Iwai wrote:
> So the problem is obvious: the commit above adjusts the stdout to be
> unbuffered via stdbuf, hence each invocation like
> echo -n abc > /sys/....
>
> would become writes of "a", "b" and "c", instead of "abc".
>
> Although we can work around it in each test unit, I'm afraid that
> enforcing the unbuffered stdio is too fragile for scripts like the
> above case.
Oh this is nasty. Looks like stdbuf overrides all child processes too...
yeah, that's very broken. Let me try to see if I can find an
alternative.
Shuah, in the meantime, if you want a fix to restore test behavior,
but regress output flushing, this will work:
diff --git a/tools/testing/selftests/kselftest/runner.sh b/tools/testing/selftests/kselftest/runner.sh
index eff3ee303d0d..a529c19240fc 100644
--- a/tools/testing/selftests/kselftest/runner.sh
+++ b/tools/testing/selftests/kselftest/runner.sh
@@ -27,11 +27,11 @@ tap_prefix()
# If stdbuf is unavailable, we must fall back to line-at-a-time piping.
tap_unbuffer()
{
- if ! which stdbuf >/dev/null ; then
+ #if ! which asdfstdbuf >/dev/null ; then
"$@"
- else
- stdbuf -i0 -o0 -e0 "$@"
- fi
+ #else
+ # stdbuf -i0 -o0 -e0 "$@"
+ #fi
}
run_one()
Some tests will no longer show their output until they're entirely done,
but at least no test pass/fail results should regress.
I'll keep looking at solutions...
--
Kees Cook
next prev parent reply other threads:[~2019-05-20 21:50 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-20 9:26 [PATCH 0/5] firmware: Add support for loading compressed files Takashi Iwai
2019-05-20 9:26 ` [PATCH 1/5] firmware: Free temporary page table after vmapping Takashi Iwai
2019-05-20 9:26 ` [PATCH 2/5] firmware: Unify the paged buffer release helper Takashi Iwai
2019-05-20 9:26 ` [PATCH 3/5] firmware: Use kvmalloc for page tables Takashi Iwai
2019-05-20 9:26 ` [PATCH 4/5] firmware: Factor out the paged buffer handling code Takashi Iwai
2019-05-20 9:26 ` [PATCH 5/5] firmware: Add support for loading compressed files Takashi Iwai
2019-05-20 9:39 ` [PATCH 0/5] " Greg Kroah-Hartman
2019-05-20 9:56 ` Takashi Iwai
2019-05-21 5:30 ` Takashi Iwai
2019-05-20 14:39 ` Takashi Iwai
2019-05-20 15:18 ` Takashi Iwai
2019-05-20 16:22 ` Takashi Iwai
2019-05-20 17:26 ` shuah
2019-05-20 18:07 ` Takashi Iwai
2019-05-20 18:59 ` Takashi Iwai
2019-05-20 21:50 ` Kees Cook [this message]
2019-05-28 5:25 ` Takashi Iwai
2019-06-10 17:21 ` Greg Kroah-Hartman
2019-06-10 17:30 ` Takashi Iwai
2019-06-10 17:48 ` Greg Kroah-Hartman
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=201905201446.B1CE073E@keescook \
--to=keescook@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=rafael@kernel.org \
--cc=shuah@kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).