]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/rbd.xfstests: take exclude list from yaml
authorIlya Dryomov <idryomov@gmail.com>
Thu, 17 Aug 2017 13:35:42 +0000 (15:35 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 26 Sep 2017 14:37:46 +0000 (16:37 +0200)
Different filesystems (and further, different configurations of the
same filesystem) need different exclude lists.  Hard coding the list in
a wrapper script is inflexible.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 01914be5a3b35479037054293b85d96596cb870b)

Conflicts:
qa/run_xfstests_krbd.sh [ trivial, caused by commit
  3aae5ca6fda8 ("scripts: fix bash path in shebangs") ]

qa/run_xfstests_krbd.sh [deleted file]
qa/tasks/rbd.py

diff --git a/qa/run_xfstests_krbd.sh b/qa/run_xfstests_krbd.sh
deleted file mode 100644 (file)
index aafc0f1..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/bin/bash
-#
-# This is a wrapper around run_xfstests.sh to provide an expunge file
-# suitable for krbd xfstests runs.
-
-set -x
-
-[ -n "${TESTDIR}" ] || export TESTDIR="/tmp/cephtest"
-[ -d "${TESTDIR}" ] || mkdir "${TESTDIR}"
-
-SCRIPT="run_xfstests.sh"
-
-if [ -z "${URL_BASE}" ]; then
-       URL_BASE="https://git.ceph.com/?p=ceph.git;a=blob_plain;f=qa"
-fi
-
-cd "${TESTDIR}"
-
-wget -O "${SCRIPT}" "${URL_BASE}/${SCRIPT}"
-chmod +x "${SCRIPT}"
-
-EXPUNGE="$(mktemp expunge.XXXXXXXXXX)"
-cat > "${EXPUNGE}" <<-!
-       # mv - moved here from the old version of run_xfstests.sh
-       #      and rbd_xfstests.yaml
-       # wasn't run - like 'mv', but wasn't specifically excluded
-       # new test - didn't exist in the xfstests version that was
-       #            used by the old version of this script
-       
-       generic/038
-       generic/042     # zeroes out only the last 4k of test file, but expects
-                       #  only zeros in the entire file. bug in test?
-       generic/046     # _count_extents in common/rc assumes backticks do not
-                       #  remove newlines. This breaks parsing on some
-                       #  platforms.
-       generic/050     # blockdev --setro right after mkfs returns EBUSY
-       generic/078 # RENAME_WHITEOUT was enabled in kernel commit 7dcf5c, but causes
-                       # a BUG for now
-       generic/081     # ubuntu lvm2 doesn't suport --yes argument
-       generic/083     # mkfs.xfs -dxize=104857600,agcount=6 fails
-                       #  when sunit=swidth=8192
-       generic/093     # not for Linux
-       generic/097     # not for Linux
-       generic/099     # not for Linux
-       generic/204     # stripe size throws off test's math for when to
-                       #  expect ENOSPC
-       generic/231 # broken for disk and rbd by xfs kernel commit 4162bb
-       generic/247 # race between DIO and mmap writes
-               # see (https://lists.01.org/pipermail/lkp/2015-March/002459.html)
-
-       shared/272      # not for xfs
-       shared/289      # not for xfs
-
-       xfs/007         # sector size math
-       xfs/030         # mkfs.xfs -dsize=100m,agcount=6 fails
-                       #  when sunit=swidth=8192
-       xfs/032         # xfs_copy cleans up with pthread_kill (RHBA-2015-0537)
-       xfs/042         # stripe size throws off test's math when filling FS
-       xfs/051
-       xfs/057         # test for IRIX
-       xfs/058         # test for IRIX
-       xfs/069         # _filter_bmap in common/punch parses incorrectly if
-                       #  blocks are not stripe-aligned
-       xfs/070         # extra output from xfs_repair
-       xfs/071         # xfs_repair issue on large offsets (RHBA-2015-0537)
-       xfs/073
-       xfs/081         # very small mkfs breaks test with sunit=swidth-8192
-       xfs/095         # not for Linux
-       xfs/096         # checks various mkfs options and chokes on sunit/swidth
-       xfs/104         # can't suppress sunit/swidth warnings on mkfs
-       xfs/109         # can't suppress sunit/swidth warnings on mkfs
-       xfs/167
-       xfs/178         # test explicitly checks for stripe width of 0
-       xfs/191         # tests NFSv4
-       xfs/197         # tests 32-bit machines
-       xfs/205         # very small mkfs breaks tests with sunit=swidth=8192
-       xfs/242         # _filter_bmap in common/punch parses incorrectly if
-                       #  blocks are not stripe-aligned
-       xfs/261         # bug in mount_xfs involving creation of new quota files
-       xfs/279         # sector size math (logical v. physical: BZ836433?)
-       xfs/297         # XXX: temporarily expunged due to length
-       xfs/300         # SELinux
-!
-
-./"${SCRIPT}" -x "$(readlink -f "${EXPUNGE}")" "$@"
-STATUS=$?
-
-rm -f "${EXPUNGE}"
-rm -f "${SCRIPT}"
-
-exit "${STATUS}"
index 7b3a8ef049c6b80f5069145e663de251429bbb6f..d45636a5692d74010d2cb3b0750b280043a89ccb 100644 (file)
@@ -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 <path> 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,
             )