mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
6d0d254312
fstest_dir is set after _cleanup() is defined and _require_test is called. If _require_test fails (due to some unrelated bug in tested FS), _cleanup will attempt to remove $fstest_dir.*, which expands to .* This has the unfortunate effect of removing xfstests' .git and .gitignore. Here is the 074.out.bad file for this case: QA output created by 074 mount: permission denied common/rc: retrying test device mount with external set mount: permission denied common/rc: could not mount /dev/pmem0 on /mnt rm: refusing to remove '.' or '..' directory: skipping '.' rm: refusing to remove '.' or '..' directory: skipping '..' ---- The only other test which could face the same problem is generic/285. However, that test defines _cleanup after the _require* calls, and so on _require_test failure, 285.out.bad contains the harmless: ./common/rc: line 1: _cleanup: command not found Signed-off-by: Omer Zilberberg <omzg@plexistor.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>