diff options
author | Randy MacLeod <randy.macleod@windriver.com> | 2021-12-29 17:37:30 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-01-04 23:14:05 +0000 |
commit | 50d144b655b1677bf98faa9517f3a9701a8088b1 (patch) | |
tree | 496e384dc243ff331316fd9c2c59836571000f09 /meta/recipes-devtools/valgrind | |
parent | 521094d569d8d5542a5362421325bf71340d52c9 (diff) | |
download | poky-50d144b655b1677bf98faa9517f3a9701a8088b1.tar.gz |
valgrind: make run-ptest better
There were warnings about non-existent files when there was
a duplicate in the remove-for-aarch list and the non-deterministic lists
so check if the files still exists before trying to deal with it.
Also restore the tests in the opposite order that they were hidden.
(From OE-Core rev: 2e1dc5782dcb879410d535f937c633edea484d11)
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/valgrind')
-rwxr-xr-x | meta/recipes-devtools/valgrind/valgrind/run-ptest | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind/run-ptest b/meta/recipes-devtools/valgrind/valgrind/run-ptest index caeae84d4f..15cf03f9d2 100755 --- a/meta/recipes-devtools/valgrind/valgrind/run-ptest +++ b/meta/recipes-devtools/valgrind/valgrind/run-ptest | |||
@@ -32,13 +32,16 @@ if [ "$arch" = "aarch64" ]; then | |||
32 | done | 32 | done |
33 | fi | 33 | fi |
34 | 34 | ||
35 | echo "Run flaky tests using taskset to limit them to a single core." | 35 | echo "Run non-deterministic tests using taskset to limit them to a single core." |
36 | for i in `cat taskset_nondeterministic_tests`; do | 36 | for i in `cat taskset_nondeterministic_tests`; do |
37 | taskset 0x00000001 perl tests/vg_regtest --valgrind=${VALGRIND_BIN} --valgrind-lib=${VALGRIND_LIBEXECDIR} --yocto-ptest $i 2>&1|tee -a ${LOG} | 37 | # The remove-for-aarch64 and taskset_nondeterministic_tests may overlap so |
38 | mv $i.vgtest $i.IGNORE | 38 | # check if a file exist. |
39 | if test -f "${i}.vgtest"; then | ||
40 | taskset 0x00000001 perl tests/vg_regtest --valgrind=${VALGRIND_BIN} --valgrind-lib=${VALGRIND_LIBEXECDIR} --yocto-ptest $i 2>&1|tee -a ${LOG} | ||
41 | mv $i.vgtest $i.IGNORE | ||
42 | fi | ||
39 | done | 43 | done |
40 | 44 | ||
41 | |||
42 | cd ${VALGRIND_LIB}/ptest && ./tests/vg_regtest \ | 45 | cd ${VALGRIND_LIB}/ptest && ./tests/vg_regtest \ |
43 | --valgrind=${VALGRIND_BIN} \ | 46 | --valgrind=${VALGRIND_BIN} \ |
44 | --valgrind-lib=${VALGRIND_LIBEXECDIR} \ | 47 | --valgrind-lib=${VALGRIND_LIBEXECDIR} \ |
@@ -51,6 +54,13 @@ cd ${VALGRIND_LIB}/ptest && \ | |||
51 | gdbserver_tests ${TOOLS} ${EXP_TOOLS} \ | 54 | gdbserver_tests ${TOOLS} ${EXP_TOOLS} \ |
52 | 2>&1|tee -a ${LOG} | 55 | 2>&1|tee -a ${LOG} |
53 | 56 | ||
57 | echo "Restore non-deterministic tests" | ||
58 | for i in `cat taskset_nondeterministic_tests`; do | ||
59 | if test -f "${i}.vgtest.IGNORE"; then | ||
60 | mv $i.IGNORE $i.vgtest; | ||
61 | fi | ||
62 | done | ||
63 | |||
54 | if [ "$arch" = "aarch64" ]; then | 64 | if [ "$arch" = "aarch64" ]; then |
55 | echo "Aarch64: Restore valgrind tests that result in defunct process and then out of memory" | 65 | echo "Aarch64: Restore valgrind tests that result in defunct process and then out of memory" |
56 | for i in `cat remove-for-aarch64`; do | 66 | for i in `cat remove-for-aarch64`; do |
@@ -63,11 +73,6 @@ for i in `cat remove-for-all`; do | |||
63 | mv $i.IGNORE $i.vgtest; | 73 | mv $i.IGNORE $i.vgtest; |
64 | done | 74 | done |
65 | 75 | ||
66 | echo "Restore flaky and other non-deterministic tests" | ||
67 | for i in `cat taskset_nondeterministic_tests`; do | ||
68 | mv $i.IGNORE $i.vgtest; | ||
69 | done | ||
70 | |||
71 | echo "Failed test details..." | 76 | echo "Failed test details..." |
72 | failed_tests=`grep FAIL: ${LOG} | awk '{print $2}'` | 77 | failed_tests=`grep FAIL: ${LOG} | awk '{print $2}'` |
73 | for test in $failed_tests; do | 78 | for test in $failed_tests; do |