fstest: CrashMonkey 'hard link' tests ported to xfstest
This patch aims to add more tests to the xfstest suite to check
whether the target file system recovers correctly after a crash.
These test cases are generated by CrashMonkey, a
crash-consistency testing framework built at the SASLab at UT Austin.
This patch batches 37 crash-consistency tests into a xfstest test,
each of which checks the hard link behavior under different scenarios.
This test creates hard-links between files in the same directory or
across directories, while allowing fsync of either the files involved,
their parent directories, or unrelated sibling files. After each sub
test, the metadata of the persisted file is checked for the correct
link count. Additionally, each sub test is followed by fsck to check
for inconsistencies. The tests run on a 256MB file system, and
the working directory is cleaned up after every sub test.
Signed-off-by: Jayashree Mohan <jaya@cs.utexas.edu>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>