fix several problems with zfs test suite
Fix several problems with the zfs test suite:
1. new failure in user_property_001_pos
The problem is that random_string can return a zero length string if
you call it with something like ((RANDOM % 512)
2. is_mp() function in libtest uses psrinfo with the -p flag
For the purposes of zfstest, we don't care about physical cpus, so we
should drop the flag.
3. add test cases for SEEK_HOLE
4. file_trunc is misused almost everyplace in zfstest
file_trunc is typically used to provide background IO, usually like this:
while [[ $i -lt $iters ]]; do log_note "Invoking $FILE_TRUNC with: $options_display" $FILE_TRUNC $options $TESTDIR/$TESTFILE.$i & typeset pid=$! $SLEEP 1 if ! $PS -p $pid > /dev/null 2>&1; then log_fail "$FILE_TRUNC $options $TESTDIR/$TESTFILE.$i" fi ... the problem is that with typical $options, it exits in less than a second
just over 20% of the time, causing false failures in the online_offline
and replacement tests.
5. readonly_001_pos has false failures from log_must
The problem stems from statements of this form:
/usr/bin/echo 'y' | command
Sometimes the echo will exit 0, but other times it will exit non-zero,
due to the broken pipe. Using eval to enclose the entire pipeline seems
to prevent the false failures.
6. zfstest needs a test for sending readonly pools
7. speed up some tests that would time out
Specifically zpool_add_006_pos and zpool_create_004_pos.
8. zpool list -v doesn't print spares
It also doesn't correctly identify log devices.
Updated by Electric Monk over 4 years ago
- % Done changed from 0 to 100
- Status changed from New to Closed
commit 52244c0958bdf281ca42932b449f644b4decfdc2 Author: John Wren Kennedy <email@example.com> Date: 2015-04-26T22:22:15.000Z 5767 fix several problems with zfs test suite Reviewed by: Matthew Ahrens <firstname.lastname@example.org> Reviewed by: Christopher Siden <email@example.com> Approved by: Gordon Ross <firstname.lastname@example.org>