-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathREADME
137 lines (111 loc) · 6 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
Sigmund is a non-regression utility designed to test filesystems
WRITE THE CONFIGURATION FILE
============================
In sigmund's root directory, edit the run_test.rc file
It will look like this:
# Used for pseudofs tests
EXPORTDIR=/etc/ganesha
FSAL=gpfs
EXPORTFILE=gpfs.ganesha.exports.conf
SERVERHOSTNAME=ganesha.domain.com
FS_DIR=/fs0
TEST_ROOT_DIR=/mnt/sigmund_root
GANVERSION=2.0
TEST_DIR=/mnt/sigmund
BUILD_TEST_DIR=/tmp/sigmund
##### Variables to be used by module allfs #####
# Path to cthon04 test's suite
CTHON04_DIR=/opt/cthon04
GIT_CLONE_URL=/opt/nfs-ganesha/.git
# Non-root user that will run part of the test
TEST_USER=phil
# Primary group for the TEST_USER
GROUP1=users
# One of the alternate group for TEST_USER
GROUP2=ganesha
Important variables are
- TEST_USER: the user whose identity will be used to run the tests
- GROUP1: Primary group for TEST_USER
- GROUP2: one of the secondary groups (or alternate groups) for TEST_USER
- SERVERHOSTNAME: hostname or ip of the ganesha server that the local machine can ssh to for setting up tests.
- FS_DIR: Location of filesystem on the Ganesha server which is being exported as ${TEST_DIR}. This is used for creating export entries.
- TEST_ROOT_DIR: the directory where Sigmund pseudofs tests will be run. This directory must be the "/" export and must be a pseudofs node.
- TEST_DIR: the directory, inside the mount point to be tested, were Sigmund will be run. Make sure that TEST_USERcan read and write in it
- BUILD_TEST_DIR: a temporary directory where a few C programs will be generated. Make sure that TEST_USERcan read and write in it
- CTHON04_DIR: the directory where ctho04 was installed. TEST_USER must be abe to read/execute in it.
- GIT_CLONE_URL : a git repository that TEST_USERcan read (even in a read-only way). I recommend a local repo for generating a bigger stress to the filesystem
BUILD THE ANCILLARY TESTS
=========================
Build tests's program by running ./build_test.sh
RUN THE TESTS
=============
--- Behaviour ---
Sigmund is designed to be run on top of various filesystems. Each type of FS to be tested is a "behavior".
Behavior can be easily added to Sigmund by adding a file in the behavior/ directory in Sigmund's source tree.
Currently supported behaviors currently are:
- 9p
- ext4
- lustre
- nfs
Regarding the chose behavior, some tests will be run of not. For example, xattr tests won't run on nfs but will on 9p and lustre.
--- Running the tests ---
Running the tests can do it in three way:
- running it in verbose mode : use "./sigmund.sh behavior"
- running it in verbose mode with extra JUnit report. This is designed for integration in jenkins : "./sigmund.sh behavior -j"
- running it in quiet mode : use "./sigmund.sh behavior -q"
When in quiet mode, ouput will look like this:
# ./sigmund.sh ext4 -q
test1m : ALLFS: copy file with 444 mode [ OK ]
test1g : ALLFS: traverse 700 dirs with altgroups [ OK ]
test2r : ALLFS: rm -rf of wide namespace [ OK ]
test3b : ALLFS: cthon04's basic tests [ OK ]
test3g : ALLFS: cthon04's general tests [ OK ]
test3s : ALLFS: cthon04's special tests [ OK ]
test3l : ALLFS: cthon04's lock tests [ OK ]
test4g : ALLFS: git clone a local repository [ OK ]
test4s : ALLFS: Tar calls utimes on symlink [ OK ]
test4r : ALLFS: Use mmap() to read a file [ OK ]
test4w : ALLFS: Use mmap() to write a file [ OK ]
test21f : XATTR: simple xattr set/get : file [ OK ]
test21d : XATTR: simple xattr set/get : directory [ OK ]
test21s : XATTR: simple xattr set/get : symlink [ OK ]
test22f : XATTR: xattr creation/deletion : file [ OK ]
test22d : XATTR: xattr creation/deletion : directory [ OK ]
test22s : XATTR: xattr creation/deletion : symlink [ OK ]
test23f : XATTR: mulitple sets + 1 check : file [ OK ]
test23d : XATTR: mulitple sets + 1 check : directory [ OK ]
test23s : XATTR: mulitple sets + 1 check : symlink [ OK ]
All tests passed (20 successful, 0 skipped)
You can restrict t a subset of the tests by setting the ONLY variable.
# ONLY=1,3,4s ./sigmund.sh ext4 -q
test1m : ALLFS: copy file with 444 mode [ OK ]
test1g : ALLFS: traverse 700 dirs with altgroups [ OK ]
test3b : ALLFS: cthon04's basic tests [ OK ]
test3g : ALLFS: cthon04's general tests [ OK ]
test3s : ALLFS: cthon04's special tests [ OK ]
test3l : ALLFS: cthon04's lock tests [ OK ]
test4s : ALLFS: Tar calls utimes on symlink [ OK ]
All tests passed (7 successful, 0 skipped)
The EXCLUDE variable can be used to selct tests as well. EXCLUDE is kind of "negative ONLY".
Tests listed in EXCLUDE won't be run.
Example : do not run test2 and test4w
# EXCLUDE=2,4w ./sigmund.sh ext4 -q
test1m : ALLFS: copy file with 444 mode [ OK ]
test1g : ALLFS: traverse 700 dirs with altgroups [ OK ]
test3b : ALLFS: cthon04's basic tests [ OK ]
test3g : ALLFS: cthon04's general tests [ OK ]
test3s : ALLFS: cthon04's special tests [ OK ]
test3l : ALLFS: cthon04's lock tests [ OK ]
test4g : ALLFS: git clone a local repository [ OK ]
test4s : ALLFS: Tar calls utimes on symlink [ OK ]
test4r : ALLFS: Use mmap() to read a file [ OK ]
test21f : XATTR: simple xattr set/get : file [ OK ]
test21d : XATTR: simple xattr set/get : directory [ OK ]
test21s : XATTR: simple xattr set/get : symlink [ OK ]
test22f : XATTR: xattr creation/deletion : file [ OK ]
test22d : XATTR: xattr creation/deletion : directory [ OK ]
test22s : XATTR: xattr creation/deletion : symlink [ OK ]
test23f : XATTR: mulitple sets + 1 check : file [ OK ]
test23d : XATTR: mulitple sets + 1 check : directory [ OK ]
test23s : XATTR: mulitple sets + 1 check : symlink [ OK ]
0 tests FAILED, 18 successful, 0 skipped