ZTS: Various test case fixes

* devices_001_pos and devices_002_neg - Failing after FreeBSD ZTS
  merged due to missing 'function' keyword for create_dev_file_linux.

* pool_state - Occasionally fails due to an insufficient delay
  before checking 'zpool status'.  Increasing the delay from 1 to 3
  seconds resolved the issue in local testing.

* procfs_list_basic - Fails when run in-tree because the logged
  command is actually 'lt-zfs'.  Updated the regex accordingly.

Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Reviewed-by: Kjeld Schouten <kjeld@schouten-lebbing.nl>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #9748
This commit is contained in:
Brian Behlendorf 2019-12-19 15:32:56 -08:00 committed by GitHub
parent 523fc80069
commit 5e8ac05590
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -202,7 +202,7 @@ function create_dev_file_illumos
return 0
}
create_dev_file_linux
function create_dev_file_linux
{
typeset filetype=$1
typeset filename=$2

View File

@ -137,7 +137,7 @@ remove_disk $SDISK
# background since the command will hang when the pool gets suspended. The
# command will resume and exit after we restore the missing disk later on.
zpool scrub $TESTPOOL2 &
sleep 1 # Give the scrub some time to run before we check if it fails
sleep 3 # Give the scrub some time to run before we check if it fails
log_must check_all $TESTPOOL2 "SUSPENDED"

View File

@ -48,7 +48,7 @@ function cleanup
function count_snap_cmds
{
typeset expected_count=$1
count=$(grep "command: zfs snapshot $FS@testsnapshot" | wc -l)
count=$(grep -E "command: (lt-)?zfs snapshot $FS@testsnapshot" | wc -l)
log_must eval "[[ $count -eq $expected_count ]]"
}