zfs/tests/zfs-tests/include
Aleksa Sarai 669683c4cb
ZTS: switch to rsync for directory diffs
While "diff -r" is the most straightforward way of comparing directory
trees for differences, it has two major issues:

 * File metadata is not compared, which means that subtle bugs may be
   missed even if a test is written that exercises the buggy behaviour.
 * diff(1) doesn't know how to compare special files -- it assumes they
   are always different, which means that a test using diff(1) on
   special files will always fail (resulting in such tests not being
   added).

rsync can be used in a very similar manner to diff (with the -ni flags),
but has the additional benefit of being able to detect and resolve many
more differences between directory trees. In addition, rsync has a
standard set of features and flags while diffs feature set depends on
whether you're using GNU or BSD binutils.

Note that for several of the test cases we expect that file timestamps
will not match. For example, the ctime for a file creation or modify
event is stored in the intent log but not the mtime. Thus when replaying
the log the correct ctime is set but the current mtime is used. This is
the expected behavior, so to prevent these tests from failing, there's a
replay_directory_diff function which ignores those kinds of changes.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Closes #12588
2022-03-01 10:05:32 -08:00
..
.gitignore Add zpool events tests 2017-05-22 12:34:42 -04:00
Makefile.am Centralize variable substitution 2020-07-14 17:33:44 -07:00
blkdev.shlib ZTS: normalize on use of `sync_pool` and `sync_all_pools` 2022-01-06 10:57:09 -08:00
commands.cfg ZTS: switch to rsync for directory diffs 2022-03-01 10:05:32 -08:00
default.cfg.in Add `--enable-asan` and `--enable-ubsan` switches 2022-02-03 14:35:38 -08:00
libtest.shlib ZTS: switch to rsync for directory diffs 2022-03-01 10:05:32 -08:00
math.shlib ZTS: Make bc conditional use compatible with new BSD bc 2020-07-09 17:49:02 -07:00
properties.shlib Add zstd support to zfs 2020-08-20 10:30:06 -07:00
tunables.cfg log xattr=sa create/remove/update to ZIL 2022-02-22 13:06:43 -08:00
zpool_script.shlib zfs-tests: fix warnings when packaging some .shlib files 2019-05-24 14:12:14 -07:00