From 83d830e745712254c1269e6107db80ef550d7bd0 Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Wed, 26 Aug 2020 14:06:48 +0200 Subject: [PATCH] test/blobfs: Call process_core() from rocksdb.sh test rocksdb.sh is run independently from the autotest.sh as part of the BlobFS-nightly-autotest job. In case a rogue file lands in the dir where the results are stored, i.e., a core dump, CI may fail to fetch the artifacts due to not sufficient permissions. To avoid that, make sure cores are always processed as part of the test. Also, adjust permissions across the entire $RESULTS_DIR, just for the good measure. Change-Id: I8df7799cc7ed7424950cc26250597a0e2d73bc9f Signed-off-by: Michal Berger Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3943 Reviewed-by: Tomasz Zawadzki Reviewed-by: Jim Harris Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins --- test/blobfs/rocksdb/rocksdb.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/blobfs/rocksdb/rocksdb.sh b/test/blobfs/rocksdb/rocksdb.sh index 5e00f8653..a11703358 100755 --- a/test/blobfs/rocksdb/rocksdb.sh +++ b/test/blobfs/rocksdb/rocksdb.sh @@ -4,6 +4,11 @@ testdir=$(readlink -f $(dirname $0)) rootdir=$(readlink -f $testdir/../../..) source $rootdir/test/common/autotest_common.sh +sanitize_results() { + process_core + [[ -d $RESULTS_DIR ]] && chmod 644 "$RESULTS_DIR/"* +} + dump_db_bench_on_err() { # Fetch std dump of the last run_step that might have failed [[ -e $db_bench ]] || return 0 @@ -74,7 +79,7 @@ $rootdir/scripts/gen_nvme.sh > $ROCKSDB_CONF echo "[Global]" >> $ROCKSDB_CONF echo "TpointGroupMask 0x80" >> $ROCKSDB_CONF -trap 'dump_db_bench_on_err; run_bsdump || :; rm -f $ROCKSDB_CONF; exit 1' SIGINT SIGTERM EXIT +trap 'dump_db_bench_on_err; run_bsdump || :; rm -f $ROCKSDB_CONF; sanitize_results; exit 1' SIGINT SIGTERM EXIT if [ -z "$SKIP_MKFS" ]; then run_test "blobfs_mkfs" $rootdir/test/blobfs/mkfs/mkfs $ROCKSDB_CONF Nvme0n1 @@ -162,3 +167,4 @@ trap - SIGINT SIGTERM EXIT run_bsdump rm -f $ROCKSDB_CONF +sanitize_results