diff options
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/basic/jbr/jbr.t | 3 | ||||
-rw-r--r-- | tests/fdl.rc | 12 | ||||
-rw-r--r-- | tests/features/fdl-overflow.t | 6 | ||||
-rw-r--r-- | tests/features/fdl.t | 12 | ||||
-rw-r--r-- | tests/features/recon.t | 8 |
5 files changed, 18 insertions, 23 deletions
diff --git a/tests/basic/jbr/jbr.t b/tests/basic/jbr/jbr.t index 283446c9635..ae1609a6e19 100755 --- a/tests/basic/jbr/jbr.t +++ b/tests/basic/jbr/jbr.t @@ -4,6 +4,7 @@ . $(dirname $0)/../../volume.rc . $(dirname $0)/../../cluster.rc . $(dirname $0)/../../snapshot.rc +. $(dirname $0)/../../fdl.rc cleanup; @@ -18,6 +19,8 @@ EXPECT_WITHIN $PROBE_TIMEOUT 2 peer_count; TEST $CLI_1 volume create $V0 replica 3 $H1:$L1 $H2:$L2 $H3:$L3 TEST $CLI_1 volume set $V0 cluster.jbr on +TEST $CLI_1 volume set $V0 cluster.jbr.quorum-percent 100 +TEST $CLI_1 volume set $V0 features.fdl on #TEST $CLI_1 volume set $V0 diagnostics.brick-log-level DEBUG TEST $CLI_1 volume start $V0 diff --git a/tests/fdl.rc b/tests/fdl.rc new file mode 100644 index 00000000000..df58305b923 --- /dev/null +++ b/tests/fdl.rc @@ -0,0 +1,12 @@ +#!/bin/bash + +log_base=$($CLI --print-logdir) +log_id=${B0}/${V0}-0 +log_id=${log_id:1} # Remove initial slash +log_id=${log_id//\//-} # Replace remaining slashes with dashes +FDL_META_FILE=${log_base}/${log_id}-meta-1.jnl +FDL_DATA_FILE=${log_base}/${log_id}-data-1.jnl + +check_logfile() { + [ $(gf_logdump $FDL_META_FILE $FDL_DATA_FILE | grep $1 | wc -l) -ge $2 ] +} diff --git a/tests/features/fdl-overflow.t b/tests/features/fdl-overflow.t index d7633a7ca7d..fd4bb951c5a 100644 --- a/tests/features/fdl-overflow.t +++ b/tests/features/fdl-overflow.t @@ -2,11 +2,7 @@ . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc - -log_base=$($CLI --print-logdir) -log_id=${B0}/${V0}-0 -log_id=${log_id:1} # Remove initial slash -log_id=${log_id//\//-} # Replace remaining slashes with dashes +. $(dirname $0)/../fdl.rc _check_sizes () { local n=0 diff --git a/tests/features/fdl.t b/tests/features/fdl.t index 34d6d78228a..28097a1536a 100644 --- a/tests/features/fdl.t +++ b/tests/features/fdl.t @@ -2,17 +2,7 @@ . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc - -log_base=$($CLI --print-logdir) -log_id=${B0}/${V0}-0 -log_id=${log_id:1} # Remove initial slash -log_id=${log_id//\//-} # Replace remaining slashes with dashes -FDL_META_FILE=${log_base}/${log_id}-meta-1.jnl -FDL_DATA_FILE=${log_base}/${log_id}-data-1.jnl - -check_logfile() { - [ $(gf_logdump $FDL_META_FILE $FDL_DATA_FILE | grep $1 | wc -l) -ge $2 ] -} +. $(dirname $0)/../fdl.rc if [ x"$OSTYPE" = x"NetBSD" ]; then CREAT_OFLAG="creat," diff --git a/tests/features/recon.t b/tests/features/recon.t index 9989f243380..4fdae3bdd0d 100644 --- a/tests/features/recon.t +++ b/tests/features/recon.t @@ -3,13 +3,7 @@ . $(dirname $0)/../traps.rc . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc - -log_base=$($CLI --print-logdir) -log_id=${B0}/${V0}-0 -log_id=${log_id:1} # Remove initial slash -log_id=${log_id//\//-} # Replace remaining slashes with dashes -FDL_META_FILE=${log_base}/${log_id}-meta-1.jnl -FDL_DATA_FILE=${log_base}/${log_id}-data-1.jnl +. $(dirname $0)/../fdl.rc tmpdir=$(mktemp -d -t ${0##*/}.XXXXXX) push_trapfunc "rm -rf $tmpdir" |