summaryrefslogtreecommitdiff
path: root/tools/bootconfig/test-bootconfig.sh
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2020-07-15 19:00:38 +0300
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2020-08-03 23:22:29 +0300
commit81464192839de0b5bc84c5739381101e04d94f62 (patch)
tree90f505647355bc09a5e9bd840b7e738ef35a88b5 /tools/bootconfig/test-bootconfig.sh
parenta2de2f86ae3831736dc906f9559b600f186403fe (diff)
downloadlinux-81464192839de0b5bc84c5739381101e04d94f62.tar.xz
tools/bootconfig: Add testcases for value override operator
Add some testcases and examples for value override operator. Link: https://lkml.kernel.org/r/159482883824.126704.2166030493721357163.stgit@devnote2 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-xtools/bootconfig/test-bootconfig.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/bootconfig/test-bootconfig.sh b/tools/bootconfig/test-bootconfig.sh
index 3c2ab9e75730..56284b98d8f0 100755
--- a/tools/bootconfig/test-bootconfig.sh
+++ b/tools/bootconfig/test-bootconfig.sh
@@ -117,6 +117,19 @@ xpass grep -q "bar" $OUTFILE
xpass grep -q "baz" $OUTFILE
xpass grep -q "qux" $OUTFILE
+echo "Override same-key values"
+cat > $TEMPCONF << EOF
+key = bar, baz
+key := qux
+EOF
+echo > $INITRD
+
+xpass $BOOTCONF -a $TEMPCONF $INITRD
+$BOOTCONF $INITRD > $OUTFILE
+xfail grep -q "bar" $OUTFILE
+xfail grep -q "baz" $OUTFILE
+xpass grep -q "qux" $OUTFILE
+
echo "Double/single quotes test"
echo "key = '\"string\"';" > $TEMPCONF
$BOOTCONF -a $TEMPCONF $INITRD