diff options
Diffstat (limited to 'extras/distributed-testing')
| -rw-r--r-- | extras/distributed-testing/distributed-test-build-env | 3 | ||||
| -rw-r--r-- | extras/distributed-testing/distributed-test-env | 154 | ||||
| -rwxr-xr-x | extras/distributed-testing/distributed-test-runner.py | 43 | ||||
| -rwxr-xr-x | extras/distributed-testing/distributed-test.sh | 10 |
4 files changed, 67 insertions, 143 deletions
diff --git a/extras/distributed-testing/distributed-test-build-env b/extras/distributed-testing/distributed-test-build-env index 4046eee8b40..cd68ff717da 100644 --- a/extras/distributed-testing/distributed-test-build-env +++ b/extras/distributed-testing/distributed-test-build-env @@ -1,8 +1,7 @@ #!/bin/bash GF_CONF_OPTS="--localstatedir=/var --sysconfdir /var/lib --prefix /usr --libdir /usr/lib64 \ - --enable-fusermount --enable-mempool --enable-api --with-jemalloc\ - --disable-tiering --with-ipv6-default --enable-gnfs" + --enable-bd-xlator=yes --enable-debug --enable-gnfs" if [ -x /usr/lib/rpm/redhat/dist.sh ]; then REDHAT_MAJOR=$(/usr/lib/rpm/redhat/dist.sh --distnum) diff --git a/extras/distributed-testing/distributed-test-env b/extras/distributed-testing/distributed-test-env index 5699adf97bf..36fdd82e5dd 100644 --- a/extras/distributed-testing/distributed-test-env +++ b/extras/distributed-testing/distributed-test-env @@ -12,131 +12,35 @@ KNOWN_FLAKY_TESTS="\ " BROKEN_TESTS="\ - tests/features/recon.t\ - tests/features/ipc.t\ - tests/bugs/io-cache/bug-read-hang.t\ - tests/bugs/rpc/bug-847624.t\ - tests/encryption/crypt.t\ - tests/bugs/shard/bug-shard-zerofill.t\ - tests/bugs/shard/shard-append-test.t\ - tests/bugs/shard/zero-flag.t\ - tests/bugs/shard/bug-shard-discard.t\ - tests/bugs/rpc/bug-921072.t\ - tests/bugs/protocol/bug-1433815-auth-allow.t\ - tests/bugs/glusterfs-server/bug-904300.t\ - tests/bugs/glusterd/bug-1507466-reset-brick-commit-force.t\ - tests/bugs/glusterd/bug-948729/bug-948729-mode-script.t\ - tests/bugs/glusterd/bug-948729/bug-948729.t\ - tests/bugs/glusterd/bug-948729/bug-948729-force.t\ - tests/bugs/glusterd/bug-1482906-peer-file-blank-line.t\ - tests/bugs/glusterd/bug-889630.t\ - tests/bugs/glusterd/bug-1047955.t\ - tests/bugs/glusterd/bug-1344407-volume-delete-on-node-down.t\ - tests/bugs/glusterd/bug-888752.t\ - tests/bugs/glusterd/bug-1245142-rebalance_test.t\ - tests/bugs/glusterd/bug-1109741-auth-mgmt-handshake.t\ - tests/bugs/glusterd/bug-1223213-peerid-fix.t\ - tests/bugs/glusterd/bug-1454418-seg-fault.t\ - tests/bugs/glusterd/bug-1266818-shared-storage-disable.t\ - tests/bugs/gfapi/glfs_vol_set_IO_ERR.t\ - tests/bugs/gfapi/bug-1447266/1460514.t\ - tests/bugs/gfapi/bug-1093594.t\ - tests/bugs/gfapi/bug-1319374-THIS-crash.t\ - tests/bugs/cli/bug-1169302.t\ - tests/bugs/ec/bug-1161886.t\ - tests/bugs/glusterd/bug-1238706-daemons-stop-on-peer-cleanup.t\ - tests/bugs/gfapi/bug-1447266/bug-1447266.t\ - tests/bugs/tier/bug-1205545-CTR-and-trash-integration.t\ - tests/bugs/glusterd/bug-1091935-brick-order-check-from-cli-to-glusterd.t\ - tests/bugs/glusterd/bug-964059.t\ - tests/bugs/glusterd/bug-1230121-replica_subvol_count_correct_cal.t\ - tests/bugs/glusterd/bug-1022055.t\ - tests/bugs/glusterd/bug-1322145-disallow-detatch-peer.t\ - tests/bugs/distribute/bug-1066798.t\ - tests/bugs/posix/disallow-gfid-volumeid-fremovexattr.t\ - tests/bugs/tier/bug-1279376-rename-demoted-file.t\ - tests/bugs/glusterd/bug-1303028-Rebalance-glusterd-rpc-connection-issue.t\ - tests/bugs/posix/bug-990028.t\ - tests/bugs/snapshot/bug-1140162-file-snapshot-features-encrypt-opts-validation.t\ - tests/bugs/glusterd/bug-948686.t\ - tests/bugs/glusterd/bug-1213295-snapd-svc-uninitialized.t\ - tests/bugs/glusterd/bug-1352277-spawn-daemons-on-two-node-setup.t\ - tests/bugs/glusterd/bug-1323287-real_path-handshake-test.t\ - tests/bugs/distribute/bug-1389697.t\ - tests/bugs/glusterd/bug-1173414-mgmt-v3-remote-lock-failure.t\ - tests/bugs/md-cache/afr-stale-read.t\ - tests/bugs/snapshot/bug-1202436-calculate-quota-cksum-during-snap-restore.t\ - tests/bugs/snapshot/bug-1112613.t\ - tests/bugs/snapshot/bug-1049834.t\ - tests/bugs/glusterd/bug-1420637-volume-sync-fix.t\ - tests/bugs/glusterd/bug-1104642.t\ - tests/bugs/glusterd/bug-1177132-quorum-validation.t\ - tests/bugs/snapshot/bug-1087203.t\ - tests/bugs/glusterd/bug-1293414-import-brickinfo-uuid.t\ - tests/bugs/snapshot/bug-1512451-snapshot-creation-failed-after-brick-reset.t\ - tests/bugs/glusterd/bug-1383893-daemons-to-follow-quorum.t\ - tests/bugs/nfs/bug-1116503.t\ - tests/bugs/nfs/bug-1157223-symlink-mounting.t\ - tests/bugs/glusterd/bug-1483058-replace-brick-quorum-validation.t\ - tests/bugs/bitrot/1207029-bitrot-daemon-should-start-on-valid-node.t\ - tests/bugs/snapshot/bug-1205592.t\ - tests/bugs/replicate/bug-1473026.t\ - tests/bugs/glusterd/bug-913555.t\ - tests/basic/bd.t\ - tests/bugs/quota/bug-1287996.t\ - tests/bugs/bitrot/1209752-volume-status-should-show-bitrot-scrub-info.t\ - tests/bugs/quota/bug-1288474.t\ - tests/bugs/snapshot/bug-1482023-snpashot-issue-with-other-processes-accessing-mounted-path.t\ - tests/basic/gfapi/bug-1241104.t\ - tests/basic/gfapi/glfs_sysrq.t\ - tests/basic/gfapi/glfd-lkowner.t\ - tests/basic/gfapi/upcall-register-api.t\ - tests/basic/gfapi/bug1291259.t\ - tests/basic/gfapi/gfapi-dup.t\ - tests/basic/gfapi/anonymous_fd.t\ - tests/basic/gfapi/gfapi-trunc.t\ - tests/basic/gfapi/glfs_xreaddirplus_r.t\ - tests/basic/gfapi/upcall-cache-invalidate.t\ - tests/basic/gfapi/gfapi-async-calls-test.t\ - tests/basic/gfapi/gfapi-ssl-test.t\ - tests/bugs/glusterd/bug-1245045-remove-brick-validation.t\ - tests/basic/ec/ec-seek.t\ - tests/bugs/glusterd/bug-1345727-bricks-stop-on-no-quorum-validation.t\ - tests/bugs/glusterd/bug-1367478-volume-start-validation-after-glusterd-restart.t\ - tests/basic/meta.t\ - tests/geo-rep/georep-basic-dr-tarssh.t\ - tests/basic/tier/file_with_spaces.t\ - tests/basic/tier/bug-1214222-directories_missing_after_attach_tier.t\ - tests/basic/tier/readdir-during-migration.t\ - tests/basic/tier/ctr-rename-overwrite.t\ - tests/basic/tier/tier_lookup_heal.t\ - tests/basic/tier/record-metadata-heat.t\ - tests/basic/tier/bug-1260185-donot-allow-detach-commit-unnecessarily.t\ - tests/basic/tier/locked_file_migration.t\ - tests/bugs/glusterd/bug-1231437-rebalance-test-in-cluster.t\ - tests/basic/tier/tier-heald.t\ - tests/basic/tier/frequency-counters.t\ - tests/basic/glusterd/arbiter-volume-probe.t\ - tests/basic/tier/tier-snapshot.t\ - tests/basic/glusterd/volfile_server_switch.t\ - tests/geo-rep/georep-basic-dr-rsync.t\ - tests/basic/distribute/rebal-all-nodes-migrate.t\ - tests/basic/jbr/jbr.t\ - tests/basic/volume-snapshot.t\ - tests/basic/afr/granular-esh/cli.t\ - tests/bitrot/bug-1294786.t\ - tests/basic/mgmt_v3-locks.t\ - tests/basic/tier/tierd_check.t\ - tests/basic/volume-snapshot-clone.t\ - tests/bugs/replicate/bug-1290965-detect-bitrotten-objects.t\ - tests/basic/tier/fops-during-migration.t\ - tests/basic/tier/fops-during-migration-pause.t\ - tests/basic/tier/unlink-during-migration.t\ - tests/basic/tier/new-tier-cmds.t\ - tests/basic/tier/tier.t\ - tests/bugs/readdir-ahead/bug-1436090.t\ - tests/basic/tier/legacy-many.t\ - tests/basic/gfapi/gfapi-load-volfile.t + tests/features/lock_revocation.t\ + tests/features/recon.t\ + tests/features/fdl-overflow.t\ + tests/features/fdl.t\ + tests/features/ipc.t\ + tests/bugs/distribute/bug-1247563.t\ + tests/bugs/distribute/bug-1543279.t\ + tests/bugs/distribute/bug-1066798.t\ + tests/bugs/ec/bug-1304988.t\ + tests/bugs/unclassified/bug-1357397.t\ + tests/bugs/quota/bug-1235182.t\ + tests/bugs/fuse/bug-1309462.t\ + tests/bugs/glusterd/bug-1238706-daemons-stop-on-peer-cleanup.t\ + tests/bugs/stripe/bug-1002207.t\ + tests/bugs/stripe/bug-1111454.t\ + tests/bugs/snapshot/bug-1140162-file-snapshot-features-encrypt-opts-validation.t\ + tests/bugs/write-behind/bug-1279730.t\ + tests/bugs/gfapi/bug-1093594.t\ + tests/bugs/replicate/bug-1473026.t\ + tests/bugs/replicate/bug-802417.t\ + tests/basic/inode-leak.t\ + tests/basic/distribute/force-migration.t\ + tests/basic/ec/heal-info.t\ + tests/basic/ec/ec-seek.t\ + tests/basic/jbr/jbr-volgen.t\ + tests/basic/jbr/jbr.t\ + tests/basic/afr/tarissue.t\ + tests/basic/tier/tierd_check.t\ + tests/basic/gfapi/bug1291259.t\ " SMOKE_TESTS=$(echo $SMOKE_TESTS | tr -s ' ' ' ') diff --git a/extras/distributed-testing/distributed-test-runner.py b/extras/distributed-testing/distributed-test-runner.py index 9a74b7ab5c5..5a07e2feab1 100755 --- a/extras/distributed-testing/distributed-test-runner.py +++ b/extras/distributed-testing/distributed-test-runner.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 from __future__ import absolute_import from __future__ import division @@ -28,29 +28,40 @@ CLIENT_TIMEOUT_S = 60 PATCH_FILE_UID = str(uuid.uuid4()) SSH_TIMEOUT_S = 10 MAX_ATTEMPTS = 3 +ADDRESS_FAMILY = 'IPv4' + + +def socket_instance(address_family): + if address_family.upper() == 'ipv4'.upper(): + return socket.socket(socket.AF_INET, socket.SOCK_STREAM) + elif address_family.upper() == 'ipv6'.upper(): + return socket.socket(socket.AF_INET6, socket.SOCK_STREAM) + else: + Log.error("Invalid IP address family") + sys.exit(1) def patch_file(): return "/tmp/%s-patch.tar.gz" % PATCH_FILE_UID # .............................................................................. -# SimpleXMLRPCServer IPv6 Wrapper +# SimpleXMLRPCServer IPvX Wrapper # .............................................................................. -class IPv6SimpleXMLRPCServer(SimpleXMLRPCServer.SimpleXMLRPCServer): +class GeneralXMLRPCServer(SimpleXMLRPCServer.SimpleXMLRPCServer): def __init__(self, addr): SimpleXMLRPCServer.SimpleXMLRPCServer.__init__(self, addr) def server_bind(self): if self.socket: self.socket.close() - self.socket = socket.socket(socket.AF_INET6, socket.SOCK_STREAM) + self.socket = socket_instance(args.address_family) self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) SimpleXMLRPCServer.SimpleXMLRPCServer.server_bind(self) -class IPv6HTTPConnection(httplib.HTTPConnection): +class HTTPConnection(httplib.HTTPConnection): def __init__(self, host): self.host = host httplib.HTTPConnection.__init__(self, host) @@ -62,12 +73,12 @@ class IPv6HTTPConnection(httplib.HTTPConnection): self.sock.settimeout(old_timeout) -class IPv6Transport(xmlrpclib.Transport): +class IPTransport(xmlrpclib.Transport): def __init__(self, *args, **kwargs): xmlrpclib.Transport.__init__(self, *args, **kwargs) def make_connection(self, host): - return IPv6HTTPConnection(host) + return HTTPConnection(host) # .............................................................................. @@ -236,7 +247,7 @@ class TestServer: def init(self): Log.debug("Starting xmlrpc server on port %s" % self.port) - self.rpc = IPv6SimpleXMLRPCServer(("", self.port)) + self.rpc = GeneralXMLRPCServer(("", self.port)) self.rpc.register_instance(Handlers(self.scratchdir)) def serve(self): @@ -372,14 +383,17 @@ class Handlers: return self.shell.call("make install") == 0 @synchronized - def prove(self, id, test, timeout, valgrind=False, asan_noleaks=True): + def prove(self, id, test, timeout, valgrind="no", asan_noleaks=True): assert id == self.client_id self.shell.cd(self.gluster_root) env = "DEBUG=1 " - if valgrind: + if valgrind == "memcheck" or valgrind == "yes": cmd = "valgrind" cmd += " --tool=memcheck --leak-check=full --track-origins=yes" cmd += " --show-leak-kinds=all -v prove -v" + elif valgrind == "drd": + cmd = "valgrind" + cmd += " --tool=drd -v prove -v" elif asan_noleaks: cmd = "prove -v" env += "ASAN_OPTIONS=detect_leaks=0 " @@ -419,7 +433,7 @@ class RPCConnection((threading.Thread)): def _connect(self): url = "http://%s:%s" % (self.host, self.port) - self.proxy = xmlrpclib.ServerProxy(url, transport=IPv6Transport()) + self.proxy = xmlrpclib.ServerProxy(url, transport=IPTransport()) return self.proxy.hello(self.cb.id) def disconnect(self): @@ -816,8 +830,9 @@ parser.add_argument("--port", help="server port to listen", type=int, default=DEFAULT_PORT) # test role parser.add_argument("--tester", help="start tester", action="store_true") -parser.add_argument("--valgrind", help="run tests under valgrind", - action="store_true") +parser.add_argument("--valgrind[=memcheck,drd]", + help="run tests with valgrind tool 'memcheck' or 'drd'", + default="no") parser.add_argument("--asan", help="test with asan enabled", action="store_true") parser.add_argument("--asan-noleaks", help="test with asan but no mem leaks", @@ -836,6 +851,8 @@ parser.add_argument("--test-timeout", default=TEST_TIMEOUT_S) # general parser.add_argument("-v", help="verbose", action="store_true") +parser.add_argument("--address_family", help="IPv6 or IPv4 to use", + default=ADDRESS_FAMILY) args = parser.parse_args() diff --git a/extras/distributed-testing/distributed-test.sh b/extras/distributed-testing/distributed-test.sh index 1ceff033cba..8f1e0310f33 100755 --- a/extras/distributed-testing/distributed-test.sh +++ b/extras/distributed-testing/distributed-test.sh @@ -7,6 +7,7 @@ TESTS='all' FLAKY=$KNOWN_FLAKY_TESTS BROKEN=$BROKEN_TESTS TEST_TIMEOUT_S=900 +ADDRESS_FAMILY='IPv4' FLAGS="" @@ -20,7 +21,7 @@ function print_env { } function cleanup { - rm -f /tmp/test-*.log + rm -f /tmp/test*.log } function usage { @@ -30,13 +31,14 @@ function usage { [--hosts <hosts>] [-n <parallelism>] [--tests <tests>] [--id-rsa <ssh private key>] + [--address_family <IPv4 or IPv6>] " } function parse_args () { args=`getopt \ -o hvn: \ - --long help,verbose,valgrind,asan,asan-noleaks,all,\ + --long help,verbose,address_family:,valgrind,asan,asan-noleaks,all,\ smoke,flaky,broken,hosts:,tests:,id-rsa:,test-timeout: \ -n 'fb-remote-test.sh' -- "$@"` @@ -51,6 +53,7 @@ smoke,flaky,broken,hosts:,tests:,id-rsa:,test-timeout: \ case "$1" in -h | --help) usage ; exit 1 ;; -v | --verbose) FLAGS="$FLAGS -v" ; shift ;; + --address_family) ADDRESS_FAMILY=$2; shift 2 ;; --valgrind) FLAGS="$FLAGS --valgrind" ; shift ;; --asan-noleaks) FLAGS="$FLAGS --asan-noleaks"; shift ;; --asan) FLAGS="$FLAGS --asan" ; shift ;; @@ -83,7 +86,8 @@ function main { "extras/distributed-testing/distributed-test-runner.py" $FLAGS --tester \ --n "$N" --hosts "$HOSTS" --tests "$TESTS" \ - --flaky_tests "$FLAKY $BROKEN" --test-timeout "$TEST_TIMEOUT_S" + --flaky_tests "$FLAKY $BROKEN" --test-timeout "$TEST_TIMEOUT_S" \ + --address_family "$ADDRESS_FAMILY" exit $? } |
