Commit Graph

6 Commits

Author SHA1 Message Date
Masayoshi Mizuma 2fb853cd58 fstests: add _require_command check to killall
Some tests use killall command, but killall may not exist.
We should check whether killall exists or not.

Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2016-06-15 15:44:49 +08:00
Ari Sundholm a4b6920548 generic/310: killall does not need pathnames
Only the executable name is required and this allows busybox
killall to be used.

Signed-off-by: Ari Sundholm <ari@tuxera.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
2014-09-29 13:09:07 +10:00
Lukas Czerner 83ef157def common: Check fs consistency on TEST_DEV only when needed
Currently we're checking file system consistency on TEST_DEV after every
successful test run even though the TEST_DEV might not even be used in
that test.

Fix it by introducing _require_test to for the test ti indicate that
it's about to use TEST_DEV.

Also add _require_test to the new script so that this requirement is a
default.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
2014-08-13 11:08:41 +10:00
Dave Chinner 97540f14f7 xfstests: 310 fails with existing directory error
Test 310 fails with:

mkdir: cannot create directory `/mnt/test/tmp': File exists

$TEST_DIR is persistent, so test directories need to be created with
"mkdir -p" so they don't fail if the directory already exists.

Many other things need fixing, too.
	- Tests should define directories they use on $TEST_DIR by
	  their sequence number, not generic names.

	- Use a variable for the directory the test runs in
	  ($SEQ_DIR, in this case) to avoid having to manually code
	  it everywhere.

	- New binaries need to be added to .gitignore.

	- Return status for shell functions is 0 for success,
	  non-zero for failure.

	- Setting status=0 if there is no failure in the first test
	  means that even if the second test fails, the test will
	  still pass. Change the test to use "_fatal" when a kernel
	  bug is detected, and only set status=0 when the entire
	  test has finished.

	- reduce the default runtime by to roughly a minute and
	  scale it with the stress load factor variables. In most
	  cases, this test is never going to hit problems (as
	  they've already been fixed) so running it for ~4 minutes
	  is mostly a waste of time...

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2013-05-03 09:22:12 -05:00
Zhao Hongjiang 45ed7bb0a4 xfstests: capture the failure result of 310
Capture the failure by the way of counting dmesg errors and describe
how the test triggers problems.

Signed-off-by: Zhao Hongjiang <zhaohongjiang@huawei.com>
[eguan@redhat.com fix common file path and other cleanups]
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
[rjohnston@sgi.com> Minor description changes]
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2013-04-23 08:43:55 -05:00
Zhao Hongjiang bbaf78c01b xfstests generic 310: check concurrently of readdir and read on the same directory fd
Check if there are two threads,one keeps calling read() or lseek(), and
the other calling readdir(), both on the same directory fd.

Based on a testcase from Li Zefan <lizefan@huawei.com>.
http://marc.info/?l=linux-kernel&m=136123703211869&w=2

Signed-off-by: Zhao Hongjiang <zhaohongjiang@huawei.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
[rjohnston@sgi.com minor white space fixes and test renumbering]
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2013-04-05 12:25:29 -05:00