From ea75e03d2222f890033dee1b2f1f9eba71f9a142 Mon Sep 17 00:00:00 2001 From: David Zafman Date: Fri, 8 Jun 2018 15:31:35 -0700 Subject: [PATCH] test: run-standalone move aside cores found before testing starts Signed-off-by: David Zafman --- qa/run-standalone.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/qa/run-standalone.sh b/qa/run-standalone.sh index e46a5c10d35f9..1cc4b56a6e823 100755 --- a/qa/run-standalone.sh +++ b/qa/run-standalone.sh @@ -94,6 +94,15 @@ if [ "$precore" = "$COREPATTERN" ]; then else sudo sysctl -w ${KERNCORE}=${COREPATTERN} fi +# Clean out any cores in core target directory (currently .) +if ls $(dirname $(sysctl -n $KERNCORE)) | grep -q '^core\|core$' ; then + mkdir found.cores.$$ 2> /dev/null || true + for i in $(ls $(dirname $(sysctl -n $KERNCORE)) | grep '^core\|core$'); do + mv $i found.cores.$$ + done + echo "Stray cores put in $(pwd)/found.cores.$$" +fi + ulimit -c unlimited for f in $(cd $location ; find . -perm $exec_mode -type f) do -- 2.39.5