diff options
author | Masami Hiramatsu <mhiramat@kernel.org> | 2020-02-09 16:05:13 +0300 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2020-02-11 01:22:56 +0300 |
commit | 973780011106c534d69c4d25fe0749bd3a5f0b53 (patch) | |
tree | 457a3097190e095dc5f49d73a00d7b9d9c1cb48c /tools/bootconfig/test-bootconfig.sh | |
parent | a91e4f12ffc42fa019b5a66eaa8702f5e0f08a6a (diff) | |
download | linux-973780011106c534d69c4d25fe0749bd3a5f0b53.tar.xz |
tools/bootconfig: Suppress non-error messages
Suppress non-error messages when applying new bootconfig
to initrd image. To enable it, replace printf for error
message with pr_err() macro.
This also adds a testcase for this fix.
Link: http://lkml.kernel.org/r/158125351377.16911.13283712972275131160.stgit@devnote2
Reported-by: Michael Ellerman <mpe@ellerman.id.au>
Tested-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'tools/bootconfig/test-bootconfig.sh')
-rwxr-xr-x | tools/bootconfig/test-bootconfig.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/bootconfig/test-bootconfig.sh b/tools/bootconfig/test-bootconfig.sh index 87725e8723f8..1de06de328e2 100755 --- a/tools/bootconfig/test-bootconfig.sh +++ b/tools/bootconfig/test-bootconfig.sh @@ -64,6 +64,15 @@ echo "File size check" new_size=$(stat -c %s $INITRD) xpass test $new_size -eq $initrd_size +echo "No error messge while applying" +OUTFILE=`mktemp tempout-XXXX` +dd if=/dev/zero of=$INITRD bs=4096 count=1 +printf " \0\0\0 \0\0\0" >> $INITRD +$BOOTCONF -a $TEMPCONF $INITRD > $OUTFILE 2>&1 +xfail grep -i "failed" $OUTFILE +xfail grep -i "error" $OUTFILE +rm $OUTFILE + echo "Max node number check" echo -n > $TEMPCONF |