Skip to content

Commit 5414251

Browse files
mhiramatrostedt
authored andcommitted
tools/bootconfig: Add testcase for show-command and quotes test
Add testcases for the return value of the command to show bootconfig in initrd, and double/single quotes selecting. Link: http://lkml.kernel.org/r/159230247428.65555.2109472942519215104.stgit@devnote2 Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
1 parent f91cb5b commit 5414251

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎tools/bootconfig/test-bootconfig.sh‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ echo "Apply command test"
5555
xpass $BOOTCONF -a $TEMPCONF $INITRD
5656
new_size=$(stat -c %s $INITRD)
5757

58+
echo "Show command test"
59+
xpass $BOOTCONF $INITRD
60+
5861
echo "File size check"
5962
xpass test $new_size -eq $(expr $bconf_size + $initrd_size + 9 + 12)
6063

@@ -114,6 +117,13 @@ xpass grep -q "bar" $OUTFILE
114117
xpass grep -q "baz" $OUTFILE
115118
xpass grep -q "qux" $OUTFILE
116119

120+
echo "Double/single quotes test"
121+
echo "key = '\"string\"';" > $TEMPCONF
122+
$BOOTCONF -a $TEMPCONF $INITRD
123+
$BOOTCONF $INITRD > $TEMPCONF
124+
cat $TEMPCONF
125+
xpass grep \'\"string\"\' $TEMPCONF
126+
117127
echo "=== expected failure cases ==="
118128
for i in samples/bad-* ; do
119129
xfail $BOOTCONF -a $i $INITRD

0 commit comments

Comments
 (0)