tests: run nfs tests only if --enable-gnfs is provided

Fixes: bz#1665358
Change-Id: Idbf88ec3ac683733b32c313377eeb72f2819bf0d
Signed-off-by: Amar Tumballi <amarts@redhat.com>
This commit is contained in:
Amar Tumballi 2019-01-11 11:57:07 +05:30 committed by Niels de Vos
parent 06061aaa44
commit 99b3ab0cf3
59 changed files with 139 additions and 2 deletions

View File

@ -1349,6 +1349,7 @@ if test "x${with_server}" = "xyes" -a "x$enable_gnfs" = "xyes"; then
BUILD_GNFS="yes"
fi
AM_CONDITIONAL([BUILD_GNFS], [test x$BUILD_GNFS = xyes])
AC_SUBST(BUILD_GNFS)
dnl end gnfs section
dnl Check for userspace-rcu

View File

@ -2,6 +2,14 @@
# Copyright (c) 2013-2014 Red Hat, Inc. <http://www.redhat.com>
#
# As many tests are designed to take values of variables from 'env.rc',
# it is good to source the file. While it is also required to source the
# file individually in each tests (as it should be possible to run the
# tests separately), exporting variables from env.rc is not harmful if
# done here
source ./tests/env.rc
export TZ=UTC
force="no"
head="yes"
@ -14,6 +22,8 @@ result_output="/tmp/gluster_regression.txt"
section_separator="========================================"
run_timeout=200
kill_after_time=5
nfs_tests=$RUN_NFS_TESTS
# Option below preserves log tarballs for each run of a test separately
# named: <test>-iteration-<n>.tar
# If set to any other value, then log tarball is just named after the test and
@ -257,6 +267,7 @@ function match()
# G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=123456
# G_TESTDEF_TEST_STATUS_NETBSD7=KNOWN_ISSUE,BUG=4444444
# G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=123456;555555
# G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TESTS,BUG=1385758
# You can change status of test to enabled or delete the line only if all the
# bugs are closed or modified or if the patch fixes it.
function get_test_status ()
@ -365,6 +376,14 @@ function run_tests()
echo
continue
fi
if [[ $(get_test_status $t) == "NFS_TEST" ]] && \
[[ $nfs_tests == "no" ]]
then
echo "Skipping nfs test file $t"
echo $section_separator$section_separator
echo
continue
fi
total_run_tests=$((total_run_tests+1))
echo "[$(date +%H:%M:%S)] Running tests in file $t"
starttime="$(date +%s)"
@ -493,7 +512,7 @@ function run_head_tests()
}
function parse_args () {
args=`getopt frcbkphHo:t: "$@"`
args=`getopt frcbkphHno:t: "$@"`
set -- $args
while [ $# -gt 0 ]; do
case "$1" in
@ -507,6 +526,7 @@ function parse_args () {
-p) skip_preserve_logs="no" ;;
-o) result_output="$2"; shift;;
-t) run_timeout="$2"; shift;;
-n) nfs_tests="no";;
--) shift; break;;
esac
shift

View File

@ -4,6 +4,9 @@
. $(dirname $0)/../../volume.rc
. $(dirname $0)/../../afr.rc
. $(dirname $0)/../../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
#Check that mounting fails when only arbiter brick is up.

View File

@ -4,6 +4,8 @@
. $(dirname $0)/../../volume.rc
. $(dirname $0)/../../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
TESTS_EXPECTED_IN_LOOP=10
cleanup;

View File

@ -3,6 +3,8 @@
. $(dirname $0)/../volume.rc
. $(dirname $0)/../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
TEST glusterd

View File

@ -3,6 +3,8 @@
. $(dirname $0)/../../include.rc
. $(dirname $0)/../../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup
TEST glusterd

View File

@ -3,6 +3,8 @@
. $(dirname $0)/../include.rc
. $(dirname $0)/../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
# Our mount timeout must be as long as the time for a regular configuration
# change to be acted upon *plus* AUTH_REFRESH_TIMEOUT, not one replacing the
# other. Otherwise this process races vs. the one making the change we're

View File

@ -3,8 +3,9 @@
. $(dirname $0)/../include.rc
. $(dirname $0)/../nfs.rc
cleanup;
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
## Start and create a volume
TEST glusterd

View File

@ -4,6 +4,8 @@
. $(dirname $0)/../volume.rc
. $(dirname $0)/../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
# These hashes are a result of calling SuperFastHash
# on the corresponding folder names.
NAMESPACE_HASH=28153613

View File

@ -4,6 +4,8 @@
. $(dirname $0)/../volume.rc
. $(dirname $0)/../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
TEST glusterd

View File

@ -5,6 +5,8 @@
. $(dirname $0)/../nfs.rc
. $(dirname $0)/../fileio.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
QDD=$(dirname $0)/quota

View File

@ -4,6 +4,8 @@
. $(dirname $0)/../volume.rc
. $(dirname $0)/../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
QDD=$(dirname $0)/quota
# compile the test write program and run it

View File

@ -6,6 +6,8 @@
. $(dirname $0)/../dht.rc
. $(dirname $0)/../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
QDD=$(dirname $0)/quota

View File

@ -4,6 +4,8 @@
. $(dirname $0)/../volume.rc
. $(dirname $0)/../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
TEST glusterd

View File

@ -6,6 +6,8 @@
. $(dirname $0)/../fileio.rc
. $(dirname $0)/../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
function check_readonly()
{
$@ 2>&1 | grep -q 'Read-only file system'

View File

@ -4,6 +4,8 @@
. $(dirname $0)/../volume.rc
. $(dirname $0)/../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
function gluster_client_list_status () {

View File

@ -4,6 +4,8 @@
. $(dirname $0)/../volume.rc
. $(dirname $0)/../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
STUB_SOURCE=$(dirname $0)/br-stub.c
STUB_EXEC=$(dirname $0)/br-stub

View File

@ -5,6 +5,8 @@
. $(dirname $0)/../nfs.rc
. $(dirname $0)/../fileio.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
TESTS_EXPECTED_IN_LOOP=16

View File

@ -3,6 +3,8 @@
. $(dirname $0)/../../volume.rc
. $(dirname $0)/../../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
TEST glusterd

View File

@ -4,6 +4,8 @@
. $(dirname $0)/../volume.rc
. $(dirname $0)/../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup
TEST glusterd

View File

@ -3,6 +3,8 @@
. $(dirname $0)/../../include.rc
. $(dirname $0)/../../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
TEST glusterd

View File

@ -4,6 +4,8 @@
. $(dirname $0)/../../volume.rc
. $(dirname $0)/../../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
create_files () {
for i in {1..10}; do
orig=$(printf %s/file%04d $1 $i)

View File

@ -4,6 +4,8 @@
. $(dirname $0)/../../volume.rc
. $(dirname $0)/../../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
QDD=$(dirname $0)/quota

View File

@ -4,6 +4,8 @@
. $(dirname $0)/../../volume.rc
. $(dirname $0)/../../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
BRICK_COUNT=3
FILE_COUNT=100
FILE_COUNT_TIME=5

View File

@ -4,6 +4,8 @@
. $(dirname $0)/../../volume.rc
. $(dirname $0)/../../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
function check_dir()
{
local count

View File

@ -4,6 +4,8 @@
. $(dirname $0)/../../volume.rc
. $(dirname $0)/../../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
## Start glusterd

View File

@ -4,6 +4,8 @@
. $(dirname $0)/../../nfs.rc
. $(dirname $0)/../../volume.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
TEST glusterd

View File

@ -3,6 +3,8 @@
. $(dirname $0)/../../include.rc
. $(dirname $0)/../../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
TEST glusterd

View File

@ -4,6 +4,8 @@
. $(dirname $0)/../../nfs.rc
. $(dirname $0)/../../volume.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
# 1-8

View File

@ -4,6 +4,8 @@
. $(dirname $0)/../../volume.rc
. $(dirname $0)/../../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
function file_count()

View File

@ -4,6 +4,8 @@
. $(dirname $0)/../../volume.rc
. $(dirname $0)/../../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
TEST glusterd

View File

@ -4,6 +4,8 @@
. $(dirname $0)/../../volume.rc
. $(dirname $0)/../../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup
# prepare the users and groups

View File

@ -7,6 +7,7 @@
. $(dirname $0)/../../volume.rc
. $(dirname $0)/../../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
TEST glusterd

View File

@ -2,6 +2,9 @@
. $(dirname $0)/../../include.rc
. $(dirname $0)/../../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
TEST glusterd

View File

@ -3,6 +3,8 @@
. $(dirname $0)/../../include.rc
. $(dirname $0)/../../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
## Start and create a volume

View File

@ -3,6 +3,8 @@
. $(dirname $0)/../../include.rc
. $(dirname $0)/../../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
TEST glusterd

View File

@ -5,6 +5,8 @@
# Based on: bug-904065.t
#
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
# count the lines of a file, return 0 if the file does not exist
function count_lines()
{

View File

@ -4,6 +4,8 @@
. $(dirname $0)/../../volume.rc
. $(dirname $0)/../../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
NFS_SOURCE=$(dirname $0)/bug-1210338.c

View File

@ -4,6 +4,8 @@
. $(dirname $0)/../../nfs.rc
. $(dirname $0)/../../volume.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
case $OSTYPE in
NetBSD)
echo "Skip test on ACL which are not available on NetBSD" >&2

View File

@ -4,6 +4,8 @@
. $(dirname $0)/../../nfs.rc
. $(dirname $0)/../../volume.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
TEST glusterd

View File

@ -7,6 +7,8 @@
# sufficient.
#
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
# count the lines of a file, return 0 if the file does not exist
function count_lines()
{

View File

@ -4,6 +4,8 @@
. $(dirname $0)/../../volume.rc
. $(dirname $0)/../../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
TEST glusterd

View File

@ -4,6 +4,8 @@
. $(dirname $0)/../../volume.rc
. $(dirname $0)/../../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
#This script checks that nfs mount does not fail lookup on files with split-brain
cleanup;

View File

@ -4,6 +4,8 @@
. $(dirname $0)/../../volume.rc
. $(dirname $0)/../../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
TEST glusterd

View File

@ -10,6 +10,7 @@
. $(dirname $0)/../../volume.rc
. $(dirname $0)/../../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
TEST glusterd

View File

@ -8,6 +8,8 @@
. $(dirname $0)/../../volume.rc
. $(dirname $0)/../../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup
TEST glusterd

View File

@ -17,6 +17,8 @@
. $(dirname $0)/../../volume.rc
. $(dirname $0)/../../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
QDD=$(dirname $0)/quota

View File

@ -4,6 +4,8 @@
. $(dirname $0)/../../volume.rc
. $(dirname $0)/../../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
function rename_loop()
{
local i=0

View File

@ -4,6 +4,8 @@
. $(dirname $0)/../../volume.rc
. $(dirname $0)/../../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
TEST glusterd

View File

@ -3,6 +3,9 @@
. $(dirname $0)/../../include.rc
. $(dirname $0)/../../volume.rc
. $(dirname $0)/../../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
TEST glusterd

View File

@ -4,6 +4,8 @@
. $(dirname $0)/../../nfs.rc
. $(dirname $0)/../../volume.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
function recreate {

View File

@ -3,6 +3,8 @@
. $(dirname $0)/../../include.rc
. $(dirname $0)/../../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
TEST glusterd

View File

@ -3,6 +3,9 @@
. $(dirname $0)/../../include.rc
. $(dirname $0)/../../nfs.rc
. $(dirname $0)/../../volume.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup
#1

View File

@ -4,6 +4,8 @@
. $(dirname $0)/../../nfs.rc
. $(dirname $0)/../../volume.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
#1

View File

@ -5,6 +5,8 @@
. $(dirname $0)/../../volume.rc
. $(dirname $0)/../../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
CURDIR=`pwd`

View File

@ -4,6 +4,8 @@
. $(dirname $0)/../../volume.rc
. $(dirname $0)/../../snapshot.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
# This function returns a value "Y" if user can execute
# the given command. Else it will return "N"
# @arg-1 : Name of the user

View File

@ -4,6 +4,8 @@
. $(dirname $0)/../../nfs.rc
. $(dirname $0)/../../volume.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
## Start and create a volume

View File

@ -37,3 +37,6 @@ export GLUSTER_CMD_DIR
GLUSTER_LIBEXECDIR=@GLUSTERFS_LIBEXECDIR@
export GLUSTER_LIBEXECDIR
RUN_NFS_TESTS=@BUILD_GNFS@
export RUN_NFS_TESTS

View File

@ -4,6 +4,8 @@
. $(dirname $0)/../volume.rc
. $(dirname $0)/../nfs.rc
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
cleanup;
XXHSUM_SOURCE="$(dirname $0)/../../contrib/xxhash/xxhsum.c $(dirname $0)/../../contrib/xxhash/xxhash.c"