Skip to content

Commit ba3210a

Browse files
committed
Update used xfstests
1 parent b896fe3 commit ba3210a

File tree

4 files changed

+25
-63
lines changed

4 files changed

+25
-63
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ run-xfstests: s3proxy.jar xfstests
77
./test/run-xfstests.sh
88

99
xfstests:
10-
git clone --depth=1 -b v2023.01.01 https://github.com/kdave/xfstests
10+
git clone --depth=1 https://github.com/kdave/xfstests
1111
cd xfstests && patch -p1 -l < ../test/xfstests.diff
1212

1313
s3proxy.jar:

test/run-xfstests.sh

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,14 @@ sudo apt-get -y install s3cmd
1717
s3cmd --signature-v2 --no-ssl --host-bucket= --access_key=foo --secret_key=bar --host=http://localhost:$PROXY_PORT mb s3://testbucket
1818
s3cmd --signature-v2 --no-ssl --host-bucket= --access_key=foo --secret_key=bar --host=http://localhost:$PROXY_PORT mb s3://testbucket2
1919

20-
cat >xfstests/local.config <<EOF
21-
FSTYP=fuse.geesefs
22-
TEST_DIR=/tmp/geesefs
23-
TEST_DEV=testbucket:
24-
TEST_FS_MOUNT_OPTS="-o allow_other -o--retry-interval=5s -o--log-file=/tmp/geesefs.log -o--endpoint=http://localhost:$PROXY_PORT"
25-
MOUNT_OPTIONS="-o allow_other -o--retry-interval=5s -o--log-file=/tmp/geesefs.log -o--endpoint=http://localhost:$PROXY_PORT"
26-
SCRATCH_DEV=testbucket2:
27-
SCRATCH_MNT=/tmp/geesefs2
28-
UMOUNT_PROG=$(pwd)/xfstests/sync_unmount.py
29-
EOF
30-
31-
cp `dirname $0`/sync_unmount.py xfstests/
20+
sed 's/\/home\/geesefs/$(pwd)/' <test/xfstests.config >xfstests/local.config
21+
22+
cp test/sync_unmount.py xfstests/
3223

3324
cd xfstests
3425
sudo apt-get -y install xfslibs-dev uuid-dev libtool-bin \
3526
e2fsprogs automake gcc libuuid1 quota attr make \
3627
libacl1-dev libaio-dev xfsprogs libgdbm-dev gawk fio dbench \
3728
uuid-runtime python3 sqlite3 libcap-dev
3829
make -j8
39-
sudo -E ./check generic/001 generic/005 generic/006 generic/007 generic/011 generic/013 generic/014
30+
sudo -E ./check -fuse generic/001 generic/005 generic/006 generic/007 generic/011 generic/013 generic/014

test/xfstests.config

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# local.config example for xfstests
2-
FSTYP=fuse.geesefs
3-
TEST_DIR=/home/testdir
4-
TEST_DEV=testbucket:
5-
TEST_FS_MOUNT_OPTS="-o allow_other -o--debug_fuse -o--retry-interval=5s -o--log-file=/root/xfstests/geesefs.log"
6-
MOUNT_OPTIONS="-o allow_other -o--debug_fuse -o--retry-interval=5s -o--log-file=/root/xfstests/geesefs.log"
7-
SCRATCH_DEV=testbucket2:
8-
SCRATCH_MNT=/home/testdir2
9-
UMOUNT_PROG=/root/xfstests/sync_unmount
1+
export TEST_DEV=testbucket
2+
export TEST_DIR=/tmp/geesefs
3+
export SCRATCH_DEV=testbucket2
4+
export SCRATCH_MNT=/tmp/geesefs2
5+
export FSTYP=fuse
6+
export FUSE_SUBTYP=.geesefs
7+
export MOUNT_OPTIONS="-o allow_other -o--retry-interval=5s -o--log-file=/tmp/geesefs.log -o--endpoint=http://localhost:8080"
8+
export TEST_FS_MOUNT_OPTS="-o allow_other -o--retry-interval=5s -o--log-file=/tmp/geesefs.log -o--endpoint=http://localhost:8080"
9+
export UMOUNT_PROG=/home/geesefs/xfstests/sync_unmount.py

test/xfstests.diff

Lines changed: 11 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git a/common/config b/common/config
2-
index 164381b7..88ae95b6 100644
2+
index 936ac22..0872664 100644
33
--- a/common/config
44
+++ b/common/config
5-
@@ -120,8 +120,11 @@ export MKFS_PROG="$(type -P mkfs)"
5+
@@ -122,8 +122,11 @@ export MKFS_PROG="$(type -P mkfs)"
66
export MOUNT_PROG="$(type -P mount)"
77
[ "$MOUNT_PROG" = "" ] && _fatal "mount not found"
88

@@ -17,44 +17,15 @@ index 164381b7..88ae95b6 100644
1717
export FSSTRESS_PROG="./ltp/fsstress"
1818
[ ! -x $FSSTRESS_PROG ] && _fatal "fsstress not found or executable"
1919
diff --git a/common/rc b/common/rc
20-
index 154bc2dd..588ed598 100644
20+
index 5c4429e..21f0718 100644
2121
--- a/common/rc
2222
+++ b/common/rc
23-
@@ -774,7 +774,7 @@ _scratch_mkfs()
24-
local mkfs_status
23+
@@ -4545,7 +4545,7 @@ init_rc()
2524

26-
case $FSTYP in
27-
- nfs*|cifs|ceph|overlay|glusterfs|pvfs2|9p|virtiofs)
28-
+ nfs*|cifs|ceph|fuse.geesefs|overlay|glusterfs|pvfs2|9p|virtiofs)
29-
# unable to re-create this fstyp, just remove all files in
30-
# $SCRATCH_MNT to avoid EEXIST caused by the leftover files
31-
# created in previous runs
32-
@@ -1601,6 +1601,15 @@ _require_scratch_nocheck()
33-
_notrun "this test requires a valid \$SCRATCH_MNT"
34-
fi
35-
;;
36-
+ fuse.geesefs)
37-
+ echo $SCRATCH_DEV | grep -q ":" > /dev/null 2>&1
38-
+ if [ -z "$SCRATCH_DEV" -o "$?" != "0" ]; then
39-
+ _notrun "this test requires a valid \$SCRATCH_DEV"
40-
+ fi
41-
+ if [ ! -d "$SCRATCH_MNT" ]; then
42-
+ _notrun "this test requires a valid \$SCRATCH_MNT"
43-
+ fi
44-
+ ;;
45-
pvfs2)
46-
echo $SCRATCH_DEV | grep -q "://" > /dev/null 2>&1
47-
if [ -z "$SCRATCH_DEV" -o "$?" != "0" ]; then
48-
@@ -1798,6 +1807,12 @@ _require_test()
49-
_notrun "this test requires a valid \$TEST_DIR"
50-
fi
51-
;;
52-
+ fuse*)
53-
+ if [ ! -d "$TEST_DIR" ]
54-
+ then
55-
+ _notrun "this test requires a valid \$TEST_DIR"
56-
+ fi
57-
+ ;;
58-
*)
59-
if [ -z "$TEST_DEV" ] || [ "`_is_block_dev "$TEST_DEV"`" = "" ]
60-
then
25+
# Sanity check that TEST partition is not mounted at another mount point
26+
# or as another fs type
27+
- _check_mounted_on TEST_DEV $TEST_DEV TEST_DIR $TEST_DIR $FSTYP || exit 1
28+
+ _check_mounted_on TEST_DEV $TEST_DEV TEST_DIR $TEST_DIR $FSTYP$FUSE_SUBTYP || exit 1
29+
if [ -n "$SCRATCH_DEV" ]; then
30+
# Sanity check that SCRATCH partition is not mounted at another
31+
# mount point, because it is about to be unmounted and formatted.

0 commit comments

Comments
 (0)