]> code.ossystems Code Review - openembedded-core.git/commitdiff
valgrind: make run-ptest better
authorRandy MacLeod <randy.macleod@windriver.com>
Thu, 30 Dec 2021 01:37:30 +0000 (17:37 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 4 Jan 2022 23:13:32 +0000 (23:13 +0000)
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.

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/valgrind/valgrind/run-ptest

index caeae84d4fc7e956cae88d0d308a1ca6f607e588..15cf03f9d2cf46a2ad0b80abeb94c98642eb3cac 100755 (executable)
@@ -32,13 +32,16 @@ if [ "$arch" = "aarch64" ]; then
    done
 fi
 
-echo "Run flaky tests using taskset to limit them to a single core."
+echo "Run non-deterministic tests using taskset to limit them to a single core."
 for i in `cat taskset_nondeterministic_tests`; do
-   taskset 0x00000001 perl tests/vg_regtest --valgrind=${VALGRIND_BIN} --valgrind-lib=${VALGRIND_LIBEXECDIR} --yocto-ptest $i 2>&1|tee -a ${LOG}
-   mv $i.vgtest $i.IGNORE
+   # The remove-for-aarch64 and taskset_nondeterministic_tests may overlap so 
+   # check if a file exist.
+   if test -f "${i}.vgtest"; then
+      taskset 0x00000001 perl tests/vg_regtest --valgrind=${VALGRIND_BIN} --valgrind-lib=${VALGRIND_LIBEXECDIR} --yocto-ptest $i 2>&1|tee -a ${LOG}
+      mv $i.vgtest $i.IGNORE
+   fi
 done
 
-
 cd ${VALGRIND_LIB}/ptest && ./tests/vg_regtest \
     --valgrind=${VALGRIND_BIN} \
     --valgrind-lib=${VALGRIND_LIBEXECDIR} \
@@ -51,6 +54,13 @@ cd ${VALGRIND_LIB}/ptest && \
     gdbserver_tests ${TOOLS} ${EXP_TOOLS} \
     2>&1|tee -a ${LOG}
 
+echo "Restore non-deterministic tests"
+for i in `cat taskset_nondeterministic_tests`; do
+   if test -f "${i}.vgtest.IGNORE"; then
+      mv $i.IGNORE $i.vgtest;
+   fi
+done
+
 if [ "$arch" = "aarch64" ]; then
    echo "Aarch64: Restore valgrind tests that result in defunct process and then out of memory"
    for i in `cat remove-for-aarch64`; do
@@ -63,11 +73,6 @@ for i in `cat remove-for-all`; do
    mv $i.IGNORE $i.vgtest;
 done
 
-echo "Restore flaky and other non-deterministic tests"
-for i in `cat taskset_nondeterministic_tests`; do
-   mv $i.IGNORE $i.vgtest;
-done
-
 echo "Failed test details..."
 failed_tests=`grep FAIL: ${LOG} | awk '{print $2}'`
 for test in $failed_tests; do