Project

General

Profile

Bug #5767

fix several problems with zfs test suite

Added by Matthew Ahrens over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Category:
zfs - Zettabyte File System
Start date:
2015-03-28
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

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:
log_ {must,must_not}
/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.

History

#1

Updated by Electric Monk over 4 years ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

git commit 52244c0958bdf281ca42932b449f644b4decfdc2

commit  52244c0958bdf281ca42932b449f644b4decfdc2
Author: John Wren Kennedy <john.kennedy@delphix.com>
Date:   2015-04-26T22:22:15.000Z

    5767 fix several problems with zfs test suite
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: Christopher Siden <christopher.siden@delphix.com>
    Approved by: Gordon Ross <gwr@nexenta.com>

Also available in: Atom PDF