freebsd-nq/tests/zfs-tests
Ryan Moeller 103bc5b957
ZTS: Fix nonportable use of stat in list_file_blocks
FreeBSD stat uses -f to specify the format string rather than -c.
list_file_blocks in blkdev.shlib uses stat -c %i to get a file's
object ID for zdb.  We already have a library function to do this
portably.

Use get_objnum to get the file's object ID.

Take log_must off of the call to list_free_blocks in
corrupt_blocks_at_level, which had masked the error.  It was not good
to pipe the output of log_must into the while-loop, anyway.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alek Pinchuk <apinchuk@datto.com>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #10572
2020-07-15 21:26:39 -07:00
..
callbacks ZTS: Add a failsafe callback to run after each test 2020-03-10 11:00:56 -07:00
cmd Unconditionally enable debugging for libzpool 2020-07-10 15:30:31 -07:00
include ZTS: Fix nonportable use of stat in list_file_blocks 2020-07-15 21:26:39 -07:00
tests Extend zdb to print inconsistencies in livelists and metaslabs 2020-07-14 17:51:05 -07:00
Makefile.am OpenZFS 7503 - zfs-test should tail ::zfs_dbgmsg on test failure 2017-04-12 13:36:48 -07:00