Commit Graph

7 Commits

Author SHA1 Message Date
Dave Chinner 0c1a95d067 fstests: convert remaining tests to SPDX license tags
Fully scripted conversion, see script in initial SPDX license commit
message.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
2018-06-09 11:35:53 +10:00
zhangyi (F) 3ba014aaba overlay: skip check for tests finished with corrupt filesystem
No post-test check of the overlay dirs is required if case leaves
corrupt filesystem after test. We shoud use _require_scratch_nocheck()
instead of _require_scratch() in these cases.

Signed-off-by: zhangyi (F) <yi.zhang@huawei.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2018-03-01 23:02:06 +08:00
Amir Goldstein 371f7f52f2 overlay: create helper _overlay_scratch_mount_dirs()
A helper to mount with same options/mnt/dev of scratch mount, but
optionally with different lower/upper/work dirs.
use instead of _overlay_mount_dirs() in all tests where applicable.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-10-10 15:44:18 +08:00
Amir Goldstein a21f34f87f overlay/031: fix test with inodes index enabled
When overlayfs is configured with CONFIG_OVERLAY_FS_INDEX=y,
workdir from previous overlay mount cannot be reused in a new
overlay mount that uses a different upper dir.

Fix the test to use a different workdir when mounting with a
different upper dir.

This change has no effect on older kernels and overlay
configured without CONFIG_OVERLAY_FS_INDEX.

Cc: zhangyi (F) <yi.zhang@huawei.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: zhangyi (F) <yi.zhang@huawei.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-09-20 11:49:40 +08:00
zhangyi (F) bbe93c0e75 overlay/031: add tests of whiteouts in lowerdir and both dirs
In overlay/031, it only cover the test case of whiteouts in
origined upper dir. This patch add two cases cover the other
two situations:

1) Lower origined dir have whiteouts;
2) Both upper and lower origined dirs have whiteouts (although
this case is pass now, still add this to cover all three kinds
of situations).

Signed-off-by: zhangyi (F) <yi.zhang@huawei.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-07-03 20:24:55 +08:00
zhangyi (F) 537d954b7d overlay/031: factor out _create_whiteout() helper
Factor out helper for create an leftover whiteout,
this is common to repeat test of whiteout check in
different underlaying directories.

Signed-off-by: zhangyi (F) <yi.zhang@huawei.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-07-03 09:41:47 +08:00
zhangyi (F) 10ad750169 overlay: test whiteout check in impure dir
The unmerged and impure upper directories may contain invalid
whiteouts when we umount && modify lowerdir(e.g. clean up dir) and
remount overlay. This may lead to whiteouts exposure and rmdir
failure.

This case test impure dir's whiteouts check in ovl_iterate() and
ovl_remove_xxx().

Signed-off-by: zhangyi (F) <yi.zhang@huawei.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-06-19 18:26:09 +08:00