From de824f74dd8ac909e47335ccd53d7a085e388e41 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Tue, 18 Sep 2018 14:57:05 -0700 Subject: [PATCH] qa: cleanup parallel execution of fsstress Two instances of fsstress clobber each other. Just build it in the local sandbox. Fixes: http://tracker.ceph.com/issues/24177 Signed-off-by: Patrick Donnelly --- qa/tasks/workunit.py | 13 +++++-------- qa/workunits/suites/fsstress.sh | 29 +++++++++++++---------------- 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/qa/tasks/workunit.py b/qa/tasks/workunit.py index a2689dc7f8d2d..9b02c1db77eb4 100644 --- a/qa/tasks/workunit.py +++ b/qa/tasks/workunit.py @@ -408,16 +408,13 @@ def _run_tests(ctx, refspec, role, tests, env, basedir, args=args, label="workunit test {workunit}".format(workunit=workunit) ) - if cleanup: - remote.run( - logger=log.getChild(role), - args=['sudo', 'rm', '-rf', '--', scratch_tmp], - ) finally: log.info('Stopping %s on %s...', tests, role) + args=['rm', '-rf', '--', workunits_file, clonedir] + if cleanup: + log.info("and cleaning up scratch: {}".format(scratch_tmp)) + args.append(scratch_tmp) remote.run( logger=log.getChild(role), - args=[ - 'rm', '-rf', '--', workunits_file, clonedir, - ], + args=args, ) diff --git a/qa/workunits/suites/fsstress.sh b/qa/workunits/suites/fsstress.sh index 0780a8274ffa4..fc9c0facf197f 100755 --- a/qa/workunits/suites/fsstress.sh +++ b/qa/workunits/suites/fsstress.sh @@ -1,20 +1,17 @@ -#!/usr/bin/env bash +#!/bin/bash -BIN_PATH=${TESTDIR}/fsstress/ltp-full-20091231/testcases/kernel/fs/fsstress/fsstress +set -ex -path=`pwd` -trap "rm -rf ${TESTDIR}/fsstress" EXIT -mkdir -p ${TESTDIR}/fsstress -cd ${TESTDIR}/fsstress -wget -q -O ${TESTDIR}/fsstress/ltp-full.tgz http://download.ceph.com/qa/ltp-full-20091231.tgz -tar xzf ${TESTDIR}/fsstress/ltp-full.tgz -rm ${TESTDIR}/fsstress/ltp-full.tgz -cd ${TESTDIR}/fsstress/ltp-full-20091231/testcases/kernel/fs/fsstress +mkdir -p fsstress +pushd fsstress +wget -q -O ltp-full.tgz http://download.ceph.com/qa/ltp-full-20091231.tgz +tar xzf ltp-full.tgz +pushd ltp-full-20091231/testcases/kernel/fs/fsstress make -cd $path +BIN=$(realpath fsstress) +popd +popd -command="${BIN_PATH} -d fsstress-`hostname`$$ -l 1 -n 1000 -p 10 -v" - -echo "Starting fsstress $command" -mkdir fsstress`hostname`-$$ -$command +T=$(mktemp -d -p .) +"$BIN" -d "$T" -l 1 -n 1000 -p 10 -v +rm -rf -- "$T" -- 2.39.5