qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

test/decode: Add tests for PatternGroups

This adds one test that supposed to succeed to test deep nesting
of pattern groups which is rarely exercised by targets using decode
tree. The remaining tests exercise various fail conditions.

Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Message-Id: <20190227120217.20794-1-kbastian@mail.uni-paderborn.de>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

authored by

Bastian Koppelmann and committed by
Richard Henderson
bf92118f 0eff2df4

+68
+6
tests/decode/check.sh
··· 15 15 fi 16 16 done 17 17 18 + for i in succ_*.decode; do 19 + if ! $PYTHON $DECODETREE $i > /dev/null 2> /dev/null; then 20 + echo FAIL:$i 1>&2 21 + fi 22 + done 23 + 18 24 exit $E
+6
tests/decode/err_pattern_group_empty.decode
··· 1 + # This work is licensed under the terms of the GNU LGPL, version 2 or later. 2 + # See the COPYING.LIB file in the top-level directory. 3 + 4 + # empty groups are not allowed 5 + { 6 + }
+10
tests/decode/err_pattern_group_ident1.decode
··· 1 + # This work is licensed under the terms of the GNU LGPL, version 2 or later. 2 + # See the COPYING.LIB file in the top-level directory. 3 + 4 + %sub1 0:8 5 + 6 + # Make sure that indentation is enforced 7 + { 8 + top 00000000 00000000 00000000 00000000 9 + sub1 00000000 00000000 00000000 ........ %sub1 10 + }
+11
tests/decode/err_pattern_group_ident2.decode
··· 1 + # This work is licensed under the terms of the GNU LGPL, version 2 or later. 2 + # See the COPYING.LIB file in the top-level directory. 3 + 4 + %sub1 0:8 5 + 6 + # Make sure that indentation is enforced 7 + { 8 + top 00000000 00000000 00000000 00000000 9 + sub1 00000000 00000000 00000000 ........ %sub1 10 + # comments are suposed to be indented 11 + }
+13
tests/decode/err_pattern_group_nest1.decode
··· 1 + # This work is licensed under the terms of the GNU LGPL, version 2 or later. 2 + # See the COPYING.LIB file in the top-level directory. 3 + 4 + %sub1 0:8 5 + %sub2 8:8 6 + %sub3 16:8 7 + %sub4 24:8 8 + 9 + # Groups with no overlap are supposed to fail 10 + { 11 + top 00000000 00000000 00000000 00000000 12 + sub4 ........ ........ ........ ........ %sub1 %sub2 %sub3 %sub4 13 + }
+22
tests/decode/succ_pattern_group_nest1.decode
··· 1 + # This work is licensed under the terms of the GNU LGPL, version 2 or later. 2 + # See the COPYING.LIB file in the top-level directory. 3 + 4 + %sub1 0:8 5 + %sub2 8:8 6 + %sub3 16:8 7 + %sub4 24:7 8 + 9 + # Make sure deep netsting works, as few targets will actually exercise it 10 + { 11 + top 00000000 00000000 00000000 00000000 12 + { 13 + sub1 00000000 00000000 00000000 ........ %sub1 14 + { 15 + sub2 00000000 00000000 ........ ........ %sub1 %sub2 16 + { 17 + sub3 00000000 ........ ........ ........ %sub1 %sub2 %sub3 18 + sub4 0....... ........ ........ ........ %sub1 %sub2 %sub3 %sub4 19 + } 20 + } 21 + } 22 + }