From: Vasu Kulkarni Date: Sat, 20 Jan 2018 03:20:16 +0000 (-0800) Subject: sync rbd.py changes X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=0a5501a1a2ceec269e5657f22be4fa75a397a916;p=ceph.git sync rbd.py changes Signed-off-by: Vasu Kulkarni --- diff --git a/qa/tasks/rbd.py b/qa/tasks/rbd.py index 7b3a8ef049c6b..d45636a5692d7 100644 --- a/qa/tasks/rbd.py +++ b/qa/tasks/rbd.py @@ -4,6 +4,7 @@ Rbd testing task import contextlib import logging import os +import tempfile from cStringIO import StringIO from teuthology.orchestra import run @@ -334,6 +335,8 @@ def run_xfstests(ctx, config): scratch_dev: 'scratch_dev' fs_type: 'xfs' tests: 'generic/100 xfs/003 xfs/005 xfs/006 generic/015' + exclude: + - generic/42 randomize: true """ with parallel() as p: @@ -360,14 +363,14 @@ def run_xfstests_one_client(ctx, role, properties): fs_type = properties.get('fs_type') tests = properties.get('tests') + exclude_list = properties.get('exclude') randomize = properties.get('randomize') - (remote,) = ctx.cluster.only(role).remotes.keys() # Fetch the test script test_root = teuthology.get_testdir(ctx) - test_script = 'run_xfstests_krbd.sh' + test_script = 'run_xfstests.sh' test_path = os.path.join(test_root, test_script) xfstests_url = properties.get('xfstests_url') @@ -390,15 +393,21 @@ def run_xfstests_one_client(ctx, role, properties): log.info(' scratch device: {dev}'.format(dev=scratch_dev)) log.info(' using fs_type: {fs_type}'.format(fs_type=fs_type)) log.info(' tests to run: {tests}'.format(tests=tests)) + log.info(' exclude list: {}'.format(' '.join(exclude_list))) log.info(' randomize: {randomize}'.format(randomize=randomize)) + if exclude_list: + with tempfile.NamedTemporaryFile(bufsize=0, prefix='exclude') as exclude_file: + for test in exclude_list: + exclude_file.write("{}\n".format(test)) + remote.put_file(exclude_file.name, exclude_file.name) + # Note that the device paths are interpreted using # readlink -f in order to get their canonical # pathname (so it matches what the kernel remembers). args = [ '/usr/bin/sudo', 'TESTDIR={tdir}'.format(tdir=testdir), - 'URL_BASE={url}'.format(url=xfstests_url), 'adjust-ulimits', 'ceph-coverage', '{tdir}/archive/coverage'.format(tdir=testdir), @@ -409,6 +418,8 @@ def run_xfstests_one_client(ctx, role, properties): '-t', test_dev, '-s', scratch_dev, ] + if exclude_list: + args.extend(['-x', exclude_file.name]) if randomize: args.append('-r') if tests: @@ -445,6 +456,8 @@ def xfstests(ctx, config): scratch_format: 1 fs_type: 'xfs' tests: 'generic/100 xfs/003 xfs/005 xfs/006 generic/015' + exclude: + - generic/42 randomize: true xfstests_branch: master xfstests_url: 'https://raw.github.com/ceph/branch/master/qa' @@ -508,6 +521,7 @@ def xfstests(ctx, config): fs_type=properties.get('fs_type', 'xfs'), randomize=properties.get('randomize', False), tests=properties.get('tests'), + exclude=properties.get('exclude', []), xfstests_url=xfstests_url, )