]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test: run-standalone move aside cores found before testing starts 22848/head
authorDavid Zafman <dzafman@redhat.com>
Fri, 8 Jun 2018 22:31:35 +0000 (15:31 -0700)
committerNathan Cutler <ncutler@suse.com>
Wed, 4 Jul 2018 08:19:50 +0000 (10:19 +0200)
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit ea75e03d2222f890033dee1b2f1f9eba71f9a142)

qa/run-standalone.sh

index 3be6121f6ff3d075f920dbbb36c9f1491df05b9c..9321cba6515016696afaf22a4d60583ff09ab459 100755 (executable)
@@ -61,6 +61,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