summaryrefslogtreecommitdiffstats
path: root/tools/bootconfig/test-bootconfig.sh
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2020-02-09 14:05:13 +0100
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2020-02-10 23:22:56 +0100
commit973780011106c534d69c4d25fe0749bd3a5f0b53 (patch)
tree457a3097190e095dc5f49d73a00d7b9d9c1cb48c /tools/bootconfig/test-bootconfig.sh
parentbootconfig: Allocate xbc_nodes array dynamically (diff)
downloadlinux-973780011106c534d69c4d25fe0749bd3a5f0b53.tar.xz
linux-973780011106c534d69c4d25fe0749bd3a5f0b53.zip
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 '')
-rwxr-xr-xtools/bootconfig/test-bootconfig.sh9
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