• Home
  • Raw
  • Download

Lines Matching +full:valgrind +full:-

5 # selected, depending on which build-time options were used.
8 # JIT, unless "-nojit" is given on the command line. There are also two tests
9 # for JIT-specific features, one to be run when JIT support is available
10 # (unless "-nojit" is specified), and one when it is not.
12 # Whichever of the 8-, 16- and 32-bit libraries exist are tested. It is also
13 # possible to select which to test by giving "-8", "-16" or "-32" on the
16 # As well as "-nojit", "-8", "-16", and "-32", arguments for this script are
17 # individual test numbers, ranges of tests such as 3-6 or 3- (meaning 3 to the
18 # end), or a number preceded by ~ to exclude a test. For example, "3-15 ~10"
35 # Other arguments can be one of the words "-valgrind", "-valgrind-log", or
36 # "-sim" followed by an argument to run cross-compiled executables under a
39 # RunTest 3 -sim "qemu-arm -s 8388608"
41 # For backwards compatibility, -nojit, -valgrind, -valgrind-log, and -sim may
42 # be given without the leading "-" character.
44 # When PCRE2 is compiled by clang with -fsanitize arguments, some tests need
46 # set at runtime, -bigstack sets a gigantic stack.
60 # of them are modified (e.g. with -8 or -16) when used in the actual tests.
63 title1="Test 1: Main non-UTF, non-UCP functionality (compatible with Perl >= 5.10)"
64 title2="Test 2: API, errors, internals and non-Perl stuff"
65 title3="Test 3: Locale-specific features"
68 title5A="Test 5: API, internals, and non-Perl stuff for UTF"
70 title6="Test 6: DFA matching main non-UTF, non-UCP functionality"
74 title9="Test 9: Specials for the basic 8-bit library"
75 title10="Test 10: Specials for the 8-bit library with UTF-8 and UCP support"
76 title11="Test 11: Specials for the basic 16-bit and 32-bit libraries"
77 title12="Test 12: Specials for the 16-bit and 32-bit libraries UTF and UCP support"
78 title13="Test 13: DFA specials for the basic 16-bit and 32-bit libraries"
80 title15="Test 15: Non-JIT limits and other non-JIT tests"
81 title16="Test 16: JIT-specific features when JIT is not available"
82 title17="Test 17: JIT-specific features when JIT is available"
89 title24="Test 24: Non-UTF pattern conversion tests"
91 title26="Test 26: Auto-generated unicode property tests"
93 titleheap="Test 'heap': Environment-specific heap tests"
95 if [ $# -eq 1 -a "$1" = "list" ]; then
132 # have a diff that lacks a -u option. Try to deal with this.
135 diff -u /dev/null /dev/null 2>/dev/null && cf="diff -u"
139 if [ -n "$srcdir" -a -d "$srcdir" ] ; then
141 elif [ -d "./testdata" ] ; then
143 elif [ -d "../testdata" ] ; then
151 # ------ Function to check results of a test -------
157 # $3 the $opt value (empty, -jit, or -dfa)
163 if [ $1 -ne 0 ] ; then
164 echo "** pcre2test failed - check testtry"
168 -jit) with=" with JIT";;
169 -dfa) with=" with DFA";;
182 # ------ Function to run and check a special pcre2test arguments test -------
186 $valgrind $vjs ./pcre2test $1 >>testtry
187 if [ $? -ne 0 ] ; then
188 echo "** pcre2test $1 failed - check testtry"
194 # ------ Special EBCDIC Test -------
196 if [ $# -eq 1 -a "$1" = "ebcdic" ]; then
197 $valgrind ./pcre2test -C ebcdic >/dev/null
199 if [ $ebcdic -ne 1 ] ; then
203 for opt in "" "-dfa"; do
204 ./pcre2test -q $opt $testdata/testinputEBC >testtry
211 # ------ Normal Tests ------
222 valgrind=
225 # This is in case the caller has set aliases (as I do - PH)
260 while [ $# -gt 0 ] ; do
290 -8) arg8=yes;;
291 -16) arg16=yes;;
292 -32) arg32=yes;;
293 bigstack|-bigstack) bigstack=yes;;
294 nojit|-nojit) nojit=yes;;
295 sim|-sim) shift; sim=$1;;
296 valgrind|-valgrind) valgrind="valgrind --tool=memcheck -q --smc-check=all-non-file";;
297valgrind-log|-valgrind-log) valgrind="valgrind --tool=memcheck --num-callers=30 --leak-check=no --
299 if expr "$1" : '~[0-9][0-9]*$' >/dev/null; then
300 skip="$skip `expr "$1" : '~\([0-9]*\)*$'`"
305 *-*)
306 if expr "$1" : '[0-9][0-9]*-[0-9]*$' >/dev/null; then
307 tf=`expr "$1" : '\([0-9]*\)'`
308 tt=`expr "$1" : '.*-\([0-9]*\)'`
328 $sim ./pcre2test -C linksize >/dev/null
330 if [ $link_size -lt 2 ] ; then
334 if [ $link_size -gt 4 ] ; then
339 # If it is possible to set the system stack size and -bigstack was given,
342 $sim ./pcre2test -S 64 /dev/null /dev/null
344 if [ $support_setstack -eq 0 -a "$bigstack" != "" ] ; then
345 setstack="-S 64"
350 # All of 8-bit, 16-bit, and 32-bit character strings may be supported, but only
353 $sim ./pcre2test -C pcre2-8 >/dev/null
355 $sim ./pcre2test -C pcre2-16 >/dev/null
357 $sim ./pcre2test -C pcre2-32 >/dev/null
362 $sim ./pcre2test -C backslash-C >/dev/null
374 if [ $support8 -ne 0 ] ; then
375 test8=-8
377 if [ $support16 -ne 0 ] ; then
378 test16=-16
380 if [ $support32 -ne 0 ] ; then
381 test32=-32
388 if [ $support8 -eq 0 ] ; then
389 echo "Cannot run 8-bit library tests: 8-bit library not compiled"
392 test8=-8
395 if [ $support16 -eq 0 ] ; then
396 echo "Cannot run 16-bit library tests: 16-bit library not compiled"
399 test16=-16
402 if [ $support32 -eq 0 ] ; then
403 echo "Cannot run 32-bit library tests: 32-bit library not compiled"
406 test32=-32
411 # sizes if both are supported; we can't have UTF-8 support without UTF-16 or
412 # UTF-32 support.
414 $sim ./pcre2test -C unicode >/dev/null
417 # When JIT is used with valgrind, we need to set up valgrind suppressions as
418 # otherwise there are a lot of false positive valgrind reports when the
422 $sim ./pcre2test -C jit >/dev/null
424 if [ $jit -ne 0 -a "$nojit" != "yes" ] ; then
425 jitopt=-jit
426 if [ "$valgrind" != "" ] ; then
427 vjs="--suppressions=$testdata/valgrind-jit.supp"
434 if [ $do0 = no -a $do1 = no -a $do2 = no -a $do3 = no -a \
435 $do4 = no -a $do5 = no -a $do6 = no -a $do7 = no -a \
436 $do8 = no -a $do9 = no -a $do10 = no -a $do11 = no -a \
437 $do12 = no -a $do13 = no -a $do14 = no -a $do15 = no -a \
438 $do16 = no -a $do17 = no -a $do18 = no -a $do19 = no -a \
439 $do20 = no -a $do21 = no -a $do22 = no -a $do23 = no -a \
440 $do24 = no -a $do25 = no -a $do26 = no -a $doheap = no \
486 -16) if [ "$test8$test32" != "skipskip" ] ; then echo ""; fi
487 bits=16; echo "---- Testing 16-bit library ----"; echo "";;
488 -32) if [ "$test8$test16" != "skipskip" ] ; then echo ""; fi
489 bits=32; echo "---- Testing 32-bit library ----"; echo "";;
490 -8) bits=8; echo "---- Testing 8-bit library ----"; echo "";;
502 checkspecial '-C'
503 checkspecial '--help'
504 if [ $support_setstack -eq 0 ] ; then
505 checkspecial '-S 1 -t 10 testSinput'
510 # Primary non-UTF test, compatible with JIT and all versions of Perl >= 5.8
515 $sim $valgrind ${opt:+$vjs} ./pcre2test -q $setstack $bmode $opt $testdata/testinput1 testtry
520 # PCRE2 tests that are not Perl-compatible: API, errors, internals. We copy
524 echo $title2 "(excluding UTF-$bits)"
527 $sim $valgrind ${opt:+$vjs} ./pcre2test -q $setstack $bmode $opt $testdata/testinput2 testtry
530 …$sim $valgrind ${opt:+$vjs} ./pcre2test -q $bmode $opt -error -70,-62,-2,-1,0,100,101,191,200 >>te…
538 # Locale-specific tests, provided that either the "fr_FR", "fr_CA", "french"
539 # or "fr" locale is available. The first two are Unix-like standards; the
547 # In some environments locales that are listed by the "locale -a"
553 locale -a | grep "^$loc\$" >/dev/null
554 if [ $? -eq 0 ] ; then
556 $sim $valgrind ./pcre2test -q $bmode | \
558 if [ $? -ne 0 ] ; then
583 $sim $valgrind ${opt:+$vjs} ./pcre2test -q $setstack $bmode $opt $infile testtry
586 -jit) with=" with JIT";;
605 echo "Cannot test locale-specific features - none of the 'fr_FR', 'fr_CA',"
615 echo ${title4A}-${bits}${title4B}
616 if [ $utf -eq 0 ] ; then
617 echo " Skipped because UTF-$bits support is not available"
620 … $sim $valgrind ${opt:+$vjs} ./pcre2test -q $setstack $bmode $opt $testdata/testinput4 testtry
627 echo ${title5A}-${bits}$title5B
628 if [ $utf -eq 0 ] ; then
629 echo " Skipped because UTF-$bits support is not available"
632 … $sim $valgrind ${opt:+$vjs} ./pcre2test -q $setstack $bmode $opt $testdata/testinput5 testtry
642 $sim $valgrind ./pcre2test -q $setstack $bmode $testdata/testinput6 testtry
647 echo ${title7A}-${bits}$title7B
648 if [ $utf -eq 0 ] ; then
649 echo " Skipped because UTF-$bits support is not available"
651 $sim $valgrind ./pcre2test -q $setstack $bmode $opt $testdata/testinput7 testtry
660 # The output from this test is different in 8-bit, 16-bit, and 32-bit modes
666 if [ $utf -eq 0 ] ; then
667 echo " Skipped because UTF-$bits support is not available"
669 $sim $valgrind ./pcre2test -q $setstack $bmode $testdata/testinput8 testtry
670 checkresult $? 8-$bits-$link_size ""
674 # Tests for 8-bit-specific features
678 if [ "$bits" = "16" -o "$bits" = "32" ] ; then
679 echo " Skipped when running 16/32-bit tests"
682 … $sim $valgrind ${opt:+$vjs} ./pcre2test -q $setstack $bmode $opt $testdata/testinput9 testtry
688 # Tests for UTF-8 and UCP 8-bit-specific features
692 if [ "$bits" = "16" -o "$bits" = "32" ] ; then
693 echo " Skipped when running 16/32-bit tests"
694 elif [ $utf -eq 0 ] ; then
695 echo " Skipped because UTF-$bits support is not available"
698 … $sim $valgrind ${opt:+$vjs} ./pcre2test -q $setstack $bmode $opt $testdata/testinput10 testtry
704 # Tests for 16-bit and 32-bit features. Output is different for the two widths.
709 echo " Skipped when running 8-bit tests"
712 … $sim $valgrind ${opt:+$vjs} ./pcre2test -q $setstack $bmode $opt $testdata/testinput11 testtry
713 checkresult $? 11-$bits "$opt"
718 # Tests for 16-bit and 32-bit features with UTF-16/32 and UCP support. Output
724 echo " Skipped when running 8-bit tests"
725 elif [ $utf -eq 0 ] ; then
726 echo " Skipped because UTF-$bits support is not available"
729 … $sim $valgrind ${opt:+$vjs} ./pcre2test -q $setstack $bmode $opt $testdata/testinput12 testtry
730 checkresult $? 12-$bits "$opt"
735 # Tests for 16/32-bit-specific features in DFA non-UTF modes
740 echo " Skipped when running 8-bit tests"
742 $sim $valgrind ./pcre2test -q $setstack $bmode $testdata/testinput13 testtry
751 if [ $utf -eq 0 ] ; then
752 echo " Skipped because UTF-$bits support is not available"
754 $sim $valgrind ./pcre2test -q $setstack $bmode $opt $testdata/testinput14 testtry
755 checkresult $? 14-$bits ""
759 # Test non-JIT match and recursion limits
763 $sim $valgrind ./pcre2test -q $setstack $bmode $testdata/testinput15 testtry
767 # Test JIT-specific features when JIT is not available
771 if [ $jit -ne 0 ] ; then
774 $sim $valgrind ./pcre2test -q $setstack $bmode $testdata/testinput16 testtry
779 # Test JIT-specific features when JIT is available
783 if [ $jit -eq 0 -o "$nojit" = "yes" ] ; then
786 $sim $valgrind $vjs ./pcre2test -q $setstack $bmode $testdata/testinput17 testtry
791 # Tests for the POSIX interface without UTF/UCP (8-bit only)
795 if [ "$bits" = "16" -o "$bits" = "32" ] ; then
796 echo " Skipped when running 16/32-bit tests"
798 $sim $valgrind ./pcre2test -q $setstack $bmode $testdata/testinput18 testtry
803 # Tests for the POSIX interface with UTF/UCP (8-bit only)
807 if [ "$bits" = "16" -o "$bits" = "32" ] ; then
808 echo " Skipped when running 16/32-bit tests"
809 elif [ $utf -eq 0 ] ; then
810 echo " Skipped because UTF-$bits support is not available"
812 $sim $valgrind ./pcre2test -q $setstack $bmode $testdata/testinput19 testtry
821 $sim $valgrind ./pcre2test -q $setstack $bmode $testdata/testinput20 testtry
825 # \C tests without UTF - DFA matching is supported
829 if [ $supportBSC -eq 0 ] ; then
832 for opt in "" $jitopt -dfa; do
833 … $sim $valgrind ${opt:+$vjs} ./pcre2test -q $setstack $bmode $opt $testdata/testinput21 testtry
839 # \C tests with UTF - DFA matching is not supported for \C in UTF mode
843 if [ $supportBSC -eq 0 ] ; then
845 elif [ $utf -eq 0 ] ; then
846 echo " Skipped because UTF-$bits support is not available"
849 … $sim $valgrind ${opt:+$vjs} ./pcre2test -q $setstack $bmode $opt $testdata/testinput22 testtry
850 checkresult $? 22-$bits "$opt"
859 if [ $supportBSC -ne 0 ] ; then
862 $sim $valgrind ./pcre2test -q $setstack $bmode $testdata/testinput23 testtry
867 # Non-UTF pattern conversion tests
871 $sim $valgrind ./pcre2test -q $setstack $bmode $testdata/testinput24 testtry
879 if [ $utf -eq 0 ] ; then
880 echo " Skipped because UTF-$bits support is not available"
882 $sim $valgrind ./pcre2test -q $setstack $bmode $testdata/testinput25 testtry
887 # Auto-generated unicode property tests
891 if [ $utf -eq 0 ] ; then
892 echo " Skipped because UTF-$bits support is not available"
895 … $sim $valgrind ${opt:+$vjs} ./pcre2test -q $setstack $bmode $opt $testdata/testinput26 testtry
901 # Manually selected heap tests - output may vary in different environments,
906 $sim $valgrind ./pcre2test -q $setstack $bmode $testdata/testinputheap testtry
907 checkresult $? heap-$bits ""
910 # End of loop for 8/16/32-bit tests
914 rm -f testbtables testSinput test3input testsaved1 testsaved2 test3output test3outputA test3outputB…