Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

bootconfig: Add bootconfig tests about braces

Add more bootconfig tests for checking the error message of
non closing brace and max number of nested braces.

Link: https://lore.kernel.org/all/177337553551.416919.11217619471547711262.stgit@devnote2/

Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>

+51
+4
tools/bootconfig/samples/bad-non-closed-brace.bconf
··· 1 + foo { 2 + bar { 3 + buz 4 + }
+19
tools/bootconfig/samples/bad-over-max-brace.bconf
··· 1 + key1 { 2 + key2 { 3 + key3 { 4 + key4 { 5 + key5 { 6 + key6 { 7 + key7 { 8 + key8 { 9 + key9 { 10 + key10 { 11 + key11 { 12 + key12 { 13 + key13 { 14 + key14 { 15 + key15 { 16 + key16 { 17 + key17 { 18 + }}}}}}}}}}}}}}}}} 19 +
+1
tools/bootconfig/samples/exp-good-nested-brace.bconf
··· 1 + key1.key2.key3.key4.key5.key6.key7.key8.key9.key10.key11.key12.key13.key14.key15.key16;
+18
tools/bootconfig/samples/good-nested-brace.bconf
··· 1 + key1 { 2 + key2 { 3 + key3 { 4 + key4 { 5 + key5 { 6 + key6 { 7 + key7 { 8 + key8 { 9 + key9 { 10 + key10 { 11 + key11 { 12 + key12 { 13 + key13 { 14 + key14 { 15 + key15 { 16 + key16 { 17 + }}}}}}}}}}}}}}}} 18 +
+9
tools/bootconfig/test-bootconfig.sh
··· 171 171 xfail grep -q 'val[[:space:]]' $OUTFILE 172 172 xpass grep -q 'val2[[:space:]]' $OUTFILE 173 173 174 + echo "Showing correct line:column of no closing brace" 175 + cat > $TEMPCONF << EOF 176 + foo { 177 + bar { 178 + } 179 + EOF 180 + $BOOTCONF -a $TEMPCONF $INITRD 2> $OUTFILE 181 + xpass grep -q "1:1" $OUTFILE 182 + 174 183 echo "=== expected failure cases ===" 175 184 for i in samples/bad-* ; do 176 185 xfail $BOOTCONF -a $i $INITRD