Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test case: zpool_upgrade_002_pos, zpool_upgrade_004_pos #4034

Closed
lukasz-virtualo opened this issue Nov 23, 2015 · 7 comments
Closed

Test case: zpool_upgrade_002_pos, zpool_upgrade_004_pos #4034

lukasz-virtualo opened this issue Nov 23, 2015 · 7 comments
Labels
Component: Test Suite Indicates an issue with the test framework or a test case

Comments

@lukasz-virtualo
Copy link

Situational problem description

Created an auxiliary zpool comprising of a single device to use as a temporary space for large snapshots which are transferred periodically between data centers (using rsync). The "snapshot dataset" had some snapshots of its own to keep old files for reference and had been configured like so:

zpool set listsnapshots=on <poolname>
zfs set atimes=off <poolname>
zfs set checksum=sha256 <poolname>
zfs set copies=2 <poolname>
zfs set mountpoint=none <poolname>
zfs create -o mountpoint=/path/to/zfs/mountpoint <poolname>/<zfsname>
ssh <remotesystem> 'zfs send -D -i @<snapshot1name> <poolname>/<zfsname>@<snapshot2name> >/path/to/zfsmountpoint/<poolname>-<zfsname>@<snapshot1name>-<snapshot2name>.zfssnapshot'
rsync -axz --inplace --protect-args --delete-delay <remotesystem>:/path/to/zfs/mountpoint/  /path/to/zfs/mountpoint/
zfs snapshot <poolname>/<zfsname>@<snapshotname>

Then the drive started getting bad blocks. Those were temporarily fixed using hdparm --write-sector. Of course that resulted in data errors in the zpool, which then I have planned to remedy by destroying the zpool and creating it anew and then downloading the remote snapshot again (the required redundancy for scrubbing the errors away was not available by design, at least not in this case as the setting copies=2 did not prove safe enough).
Unfortunately, a kernel panic occurs every time a zpool destroy <poolname> is issued.

Reproduction

  1. Have a zpool with data errors both in user files and the zpool itself.
    • possible factor: a sublevel zfs with at least a single snapshot
  2. Execute zpool destroy <poolname>.

Specifications

  • system: Debian 8.2 (Jessie)
  • kernel: Linux s4 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u6 (2015-11-09) x86_64 GNU/Linux
  • relevant packages:

ii debian-zfs 7~jessie amd64 Native ZFS filesystem metapackage for Debian.
ii libzfs2 0.6.5.2-2 amd64 Native ZFS filesystem library for Linux
ii libzpool2 0.6.5.2-2 amd64 Native ZFS pool library for Linux
ii spl 0.6.5-1 amd64 Solaris Porting Layer user-space utilities for Linux
ii spl-dkms 0.6.5-1 all Solaris Porting Layer kernel modules for Linux
ii zfs-dkms 0.6.5.2-2 all Native ZFS filesystem kernel modules for Linux
ii zfsonlinux 6 all archive.zfsonlinux.org trust package
ii zfsutils 0.6.5.2-2 amd64 command-line tools to manage ZFS filesystems

Symptoms

  • Immediately visible on console:

kernel:[ 340.019231] VERIFY3(0 == rt->rt_space) failed (0 == 69632)
kernel:[ 340.019275] PANIC at range_tree.c:153:range_tree_destroy()

  • /var/log/kern.log:

Nov 23 09:26:53 s4 kernel: [ 340.019231] VERIFY3(0 == rt->rt_space) failed (0 == 69632)
Nov 23 09:26:53 s4 kernel: [ 340.019275] PANIC at range_tree.c:153:range_tree_destroy()
Nov 23 09:26:53 s4 kernel: [ 340.019310] Showing stack for process 8215
Nov 23 09:26:53 s4 kernel: [ 340.019314] CPU: 1 PID: 8215 Comm: zpool Tainted: P O 3.16.0-4-amd64 #1 Debian 3.16.7-ckt11-1+deb8u6
Nov 23 09:26:53 s4 kernel: [ 340.019316] Hardware name: System manufacturer P5K-E/P5K-E, BIOS 1102 06/19/2008
Nov 23 09:26:53 s4 kernel: [ 340.019319] ffff88003653fd60 ffffffff8150b4e5 ffffffffa0c7af93 ffffffffa066ca5f
Nov 23 09:26:53 s4 kernel: [ 340.019323] 0000000000012f00 0000000000000030 ffff88003653fd70 ffff88003653fd10
Nov 23 09:26:53 s4 kernel: [ 340.019326] 2833594649524556 2d7472203d3d2030 636170735f74723e 656c696166202965
Nov 23 09:26:53 s4 kernel: [ 340.019330] Call Trace:
Nov 23 09:26:53 s4 kernel: [ 340.019339] [] ? dump_stack+0x41/0x51
Nov 23 09:26:53 s4 kernel: [ 340.019355] [] ? spl_panic+0xbf/0xf0 [spl]
Nov 23 09:26:53 s4 kernel: [ 340.019360] [] ? free_block+0x196/0x1c0
Nov 23 09:26:53 s4 kernel: [ 340.019389] [] ? range_tree_destroy+0x64/0x70 [zfs]
Nov 23 09:26:53 s4 kernel: [ 340.019411] [] ? metaslab_fini+0x150/0x200 [zfs]
Nov 23 09:26:53 s4 kernel: [ 340.019434] [] ? vdev_metaslab_fini+0x51/0x80 [zfs]
Nov 23 09:26:53 s4 kernel: [ 340.019455] [] ? vdev_free+0x59/0x2a0 [zfs]
Nov 23 09:26:53 s4 kernel: [ 340.019476] [] ? vdev_free+0x3b/0x2a0 [zfs]
Nov 23 09:26:53 s4 kernel: [ 340.019498] [] ? spa_unload+0xbf/0x250 [zfs]
Nov 23 09:26:53 s4 kernel: [ 340.019520] [] ? spa_export_common+0x15f/0x3e0 [zfs]
Nov 23 09:26:53 s4 kernel: [ 340.019539] [] ? zfs_ioc_pool_destroy+0x1a/0x40 [zfs]
Nov 23 09:26:53 s4 kernel: [ 340.019557] [] ? zfsdev_ioctl+0x489/0x4c0 [zfs]
Nov 23 09:26:53 s4 kernel: [ 340.019561] [] ? do_vfs_ioctl+0x2cf/0x4b0
Nov 23 09:26:53 s4 kernel: [ 340.019565] [] ? SyS_ioctl+0x81/0xa0
Nov 23 09:26:53 s4 kernel: [ 340.019569] [] ? system_call_fast_compare_end+0x10/0x15

  • both the original zpool destroy and every subsequent process accessing the zpool enters uninterruptible sleep state (D+) indefinitely
  • the zpool status -v command (prior to kernel panic ofcourse) lists the errors like so:
    • /path/to/file
    • <0xffffffffffffffff>:<0x8>

Possible fix

Ofcourse this does not address the kernel panic issue:

  1. Shutdown,
  2. Disconnect the faulty device,
  3. Boot up,
  4. Destroy zpool of the non-existent device (or rather have it automatically removed from cache on boot),
  5. Reconnect and wipe the drive (zpool labelclear).
@ilovezfs
Copy link
Contributor

@behlendorf @lundman @grwilson @ahrens

We're seeing this on OS X as well.
openzfsonosx/zfs#361

There's been some discussion of it already here: http://lists.open-zfs.org/pipermail/developer/2015-August/001553.html

I'm wondering if it's a regression caused by
https://www.illumos.org/issues/5347
illumos/illumos-gate@231aab8
905edb4
openzfsonosx/zfs@905edb4

@behlendorf
Copy link
Contributor

For reference I've now seen this failure on occasion when running the zpool_upgrade tests.

@behlendorf behlendorf added the Component: Test Suite Indicates an issue with the test framework or a test case label Jul 27, 2016
@behlendorf behlendorf added this to the 0.7.0 milestone Sep 13, 2016
@behlendorf
Copy link
Contributor

This is occurred more frequently in the automated testing. Resolving it would significantly reduce the number of testing failures. As previously noted zpool_upgrade_004_pos is particularly good at triggering it.

behlendorf added a commit to behlendorf/zfs that referenced this issue Sep 16, 2016
This test cause frequently triggers issue openzfs#4034.  Disable this
test case until the root cause of this issue has been addressed.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#4034
behlendorf added a commit that referenced this issue Sep 16, 2016
This test cause frequently triggers issue #4034.  Disable this
test case until the root cause of this issue has been addressed.

Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #4034 
Closes #5120
@behlendorf behlendorf changed the title kernel panic on zpool destroy (zpool has data errors) PANIC at range_tree.c:153:range_tree_destroy() Oct 11, 2016
@behlendorf
Copy link
Contributor

This issue is also triggered by zpool_upgrade_002_pos.

behlendorf added a commit to behlendorf/zfs that referenced this issue Oct 24, 2016
This test cause frequently triggers issue openzfs#4034.  Disable this
test case until the root cause of this issue has been addressed.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#4034
@grwilson
Copy link
Member

@behlendorf I have a fix that I will upstream for this issue. Disabling the test is a suitable workaround.

@behlendorf
Copy link
Contributor

@grwilson that's great news, I'll watch for it.

behlendorf added a commit that referenced this issue Oct 24, 2016
This test case frequently triggers issue #4034.  There exists a
fix for this which is in the process of being upstreamed.  Until
that fix is available disable the test case.

Reviewed by: George Wilson <george.wilson@delphix.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #5329 
Issue #4034
@behlendorf behlendorf changed the title PANIC at range_tree.c:153:range_tree_destroy() Test case: zpool_upgrade_002_pos, zpool_upgrade_004_pos Jan 24, 2017
@behlendorf behlendorf removed this from the 0.7.0 milestone Jan 25, 2017
behlendorf added a commit to behlendorf/zfs that referenced this issue May 9, 2017
Enable additional test cases, in most cases this required a few
minor modifications to the test scripts.  In a few cases a real
bug was uncovered and fixed.  And in a handful of cases where pools
are layered on pools the test case will be skipped until this is
supported.  Details below for each test case.

* zpool_add_004_pos - Skip test on Linux until adding zvols to pools
  is fully supported and deadlock free.

* zpool_add_005_pos.ksh - Skip dumpadm portion of the test which isn't
  relevant for Linux.  The find_vfstab_dev, find_mnttab_dev, and
  save_dump_dev functions were updated accordingly for Linux.

* zpool_add_006_pos - Update test case such that it doesn't depend
  on nested pools.  Switch to truncate from mkfile to reduce space
  requirements and speed up the test case.

* zpool_clear_001_pos - Speed up test case by filling filesystem to
  25% capacity.

* zpool_create_002_pos, zpool_create_004_pos - Use sparse files for
  file vdevs in order to avoid increasing the partition size.

* zpool_create_006_pos - 6ba1ce9 allows raidz+mirror configs with
  similar redundancy.  Updating the valid_args and forced_args cases.

* zpool_create_008_pos - Disable overlapping partition portion.

* zpool_create_011_neg - Fix to correctly create the extra partition.
  Modified zpool_vdev.c to use fstat64_blk() wrapper which includes
  the st_size even for block devices.

* zpool_create_012_neg - Updated to properly find swap devices.

* zpool_create_014_neg, zpool_create_015_neg - Updated to use
  swap_setup() and swap_cleanup() wrappers which do the right thing
  on Linux and Illumos.  Removed '-n' option which successed under
  Linux due to differences in the inuse checks.

* zpool_create_016_pos.ksh - Skipped test case isn't useful.

* zpool_create_020_pos - Added missing / to cleanup() function.
  Remove cache file prior to test to ensure a clean environment
  and avoid false positives.

* zpool_destroy_001_pos - Removed test case which creates a pool on
  a zvol.  This is more likely to deadlock under Linux and has never
  been completely supported on any platform.

* zpool_destroy_002_pos - 'zpool destroy -f' is unsupported on Linux.
  Mount point must not be busy in order to unmount them.

* zfs_destroy_001_pos - Handle EBUSY error which can occur with
  volumes when racing with udev.

* zpool_expand_001_pos, zpool_expand_003_neg - Skip test on Linux
  until adding zvols to pools is fully supported and deadlock free.
  The test could be modified to use loopback devices but it would
  be preerable to use the test case as is for improved coverage.

* zpool_export_004_pos - Updated test case to such that it doesn't
  depend on nested pools.  Normal file vdev under /var/tmp are fine.

* zpool_import_all_001_pos - Updated to skip partition 1, which is
  known as slice 2, on Illumos.  This prevents overwritting the
  default TESTPOOL which was causing the failure.

* zpool_import_002_pos, zpool_import_012_pos - No changes needed.

* zpool_remove_003_pos - No changes needed

* zpool_upgrade_002_pos, zpool_upgrade_004_pos - Root cause addressed
  by upstream OpenZFS commit 3b7f360.

* zpool_upgrade_007_pos - Disabled in test case due to known failure.
  Opened issue openzfs#6112

* zvol_misc_002_pos - Updated to to use ext2.

* zvol_misc_001_neg, zvol_misc_003_neg, zvol_misc_004_pos,
  zvol_misc_005_neg, zvol_misc_006_pos - Moved to skip list, thesei
  test case could be updated to use Linux's crash dump facility.

* zvol_swap_* - Updated to use swap_setup/swap_cleanup helpers.
  File creation switched from /tmp to /var/tmp.  Enabled minimal
  useful tests for Linux, skip test cases which aren't applicable.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#3484
Issue openzfs#5634
Issue openzfs#2437
Issue openzfs#5202
Issue openzfs#4034
Issue openzfs#6095
behlendorf added a commit to behlendorf/zfs that referenced this issue May 9, 2017
Enable additional test cases, in most cases this required a few
minor modifications to the test scripts.  In a few cases a real
bug was uncovered and fixed.  And in a handful of cases where pools
are layered on pools the test case will be skipped until this is
supported.  Details below for each test case.

* zpool_add_004_pos - Skip test on Linux until adding zvols to pools
  is fully supported and deadlock free.

* zpool_add_005_pos.ksh - Skip dumpadm portion of the test which isn't
  relevant for Linux.  The find_vfstab_dev, find_mnttab_dev, and
  save_dump_dev functions were updated accordingly for Linux.

* zpool_add_006_pos - Update test case such that it doesn't depend
  on nested pools.  Switch to truncate from mkfile to reduce space
  requirements and speed up the test case.

* zpool_clear_001_pos - Speed up test case by filling filesystem to
  25% capacity.

* zpool_create_002_pos, zpool_create_004_pos - Use sparse files for
  file vdevs in order to avoid increasing the partition size.

* zpool_create_006_pos - 6ba1ce9 allows raidz+mirror configs with
  similar redundancy.  Updating the valid_args and forced_args cases.

* zpool_create_008_pos - Disable overlapping partition portion.

* zpool_create_011_neg - Fix to correctly create the extra partition.
  Modified zpool_vdev.c to use fstat64_blk() wrapper which includes
  the st_size even for block devices.

* zpool_create_012_neg - Updated to properly find swap devices.

* zpool_create_014_neg, zpool_create_015_neg - Updated to use
  swap_setup() and swap_cleanup() wrappers which do the right thing
  on Linux and Illumos.  Removed '-n' option which successed under
  Linux due to differences in the inuse checks.

* zpool_create_016_pos.ksh - Skipped test case isn't useful.

* zpool_create_020_pos - Added missing / to cleanup() function.
  Remove cache file prior to test to ensure a clean environment
  and avoid false positives.

* zpool_destroy_001_pos - Removed test case which creates a pool on
  a zvol.  This is more likely to deadlock under Linux and has never
  been completely supported on any platform.

* zpool_destroy_002_pos - 'zpool destroy -f' is unsupported on Linux.
  Mount point must not be busy in order to unmount them.

* zfs_destroy_001_pos - Handle EBUSY error which can occur with
  volumes when racing with udev.

* zpool_expand_001_pos, zpool_expand_003_neg - Skip test on Linux
  until adding zvols to pools is fully supported and deadlock free.
  The test could be modified to use loopback devices but it would
  be preerable to use the test case as is for improved coverage.

* zpool_export_004_pos - Updated test case to such that it doesn't
  depend on nested pools.  Normal file vdev under /var/tmp are fine.

* zpool_import_all_001_pos - Updated to skip partition 1, which is
  known as slice 2, on Illumos.  This prevents overwritting the
  default TESTPOOL which was causing the failure.

* zpool_import_002_pos, zpool_import_012_pos - No changes needed.

* zpool_remove_003_pos - No changes needed

* zpool_upgrade_002_pos, zpool_upgrade_004_pos - Root cause addressed
  by upstream OpenZFS commit 3b7f360.

* zpool_upgrade_007_pos - Disabled in test case due to known failure.
  Opened issue openzfs#6112

* zvol_misc_002_pos - Updated to to use ext2.

* zvol_misc_001_neg, zvol_misc_003_neg, zvol_misc_004_pos,
  zvol_misc_005_neg, zvol_misc_006_pos - Moved to skip list, thesei
  test case could be updated to use Linux's crash dump facility.

* zvol_swap_* - Updated to use swap_setup/swap_cleanup helpers.
  File creation switched from /tmp to /var/tmp.  Enabled minimal
  useful tests for Linux, skip test cases which aren't applicable.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#3484
Issue openzfs#5634
Issue openzfs#2437
Issue openzfs#5202
Issue openzfs#4034
Issue openzfs#6095
behlendorf added a commit to behlendorf/zfs that referenced this issue May 10, 2017
Enable additional test cases, in most cases this required a few
minor modifications to the test scripts.  In a few cases a real
bug was uncovered and fixed.  And in a handful of cases where pools
are layered on pools the test case will be skipped until this is
supported.  Details below for each test case.

* zpool_add_004_pos - Skip test on Linux until adding zvols to pools
  is fully supported and deadlock free.

* zpool_add_005_pos.ksh - Skip dumpadm portion of the test which isn't
  relevant for Linux.  The find_vfstab_dev, find_mnttab_dev, and
  save_dump_dev functions were updated accordingly for Linux.

* zpool_add_006_pos - Update test case such that it doesn't depend
  on nested pools.  Switch to truncate from mkfile to reduce space
  requirements and speed up the test case.

* zpool_clear_001_pos - Speed up test case by filling filesystem to
  25% capacity.

* zpool_create_002_pos, zpool_create_004_pos - Use sparse files for
  file vdevs in order to avoid increasing the partition size.

* zpool_create_006_pos - 6ba1ce9 allows raidz+mirror configs with
  similar redundancy.  Updating the valid_args and forced_args cases.

* zpool_create_008_pos - Disable overlapping partition portion.

* zpool_create_011_neg - Fix to correctly create the extra partition.
  Modified zpool_vdev.c to use fstat64_blk() wrapper which includes
  the st_size even for block devices.

* zpool_create_012_neg - Updated to properly find swap devices.

* zpool_create_014_neg, zpool_create_015_neg - Updated to use
  swap_setup() and swap_cleanup() wrappers which do the right thing
  on Linux and Illumos.  Removed '-n' option which successed under
  Linux due to differences in the inuse checks.

* zpool_create_016_pos.ksh - Skipped test case isn't useful.

* zpool_create_020_pos - Added missing / to cleanup() function.
  Remove cache file prior to test to ensure a clean environment
  and avoid false positives.

* zpool_destroy_001_pos - Removed test case which creates a pool on
  a zvol.  This is more likely to deadlock under Linux and has never
  been completely supported on any platform.

* zpool_destroy_002_pos - 'zpool destroy -f' is unsupported on Linux.
  Mount point must not be busy in order to unmount them.

* zfs_destroy_001_pos - Handle EBUSY error which can occur with
  volumes when racing with udev.

* zpool_expand_001_pos, zpool_expand_003_neg - Skip test on Linux
  until adding zvols to pools is fully supported and deadlock free.
  The test could be modified to use loopback devices but it would
  be preerable to use the test case as is for improved coverage.

* zpool_export_004_pos - Updated test case to such that it doesn't
  depend on nested pools.  Normal file vdev under /var/tmp are fine.

* zpool_import_all_001_pos - Updated to skip partition 1, which is
  known as slice 2, on Illumos.  This prevents overwritting the
  default TESTPOOL which was causing the failure.

* zpool_import_002_pos, zpool_import_012_pos - No changes needed.

* zpool_remove_003_pos - No changes needed

* zpool_upgrade_002_pos, zpool_upgrade_004_pos - Root cause addressed
  by upstream OpenZFS commit 3b7f360.

* zpool_upgrade_007_pos - Disabled in test case due to known failure.
  Opened issue openzfs#6112

* zvol_misc_002_pos - Updated to to use ext2.

* zvol_misc_001_neg, zvol_misc_003_neg, zvol_misc_004_pos,
  zvol_misc_005_neg, zvol_misc_006_pos - Moved to skip list, thesei
  test case could be updated to use Linux's crash dump facility.

* zvol_swap_* - Updated to use swap_setup/swap_cleanup helpers.
  File creation switched from /tmp to /var/tmp.  Enabled minimal
  useful tests for Linux, skip test cases which aren't applicable.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#3484
Issue openzfs#5634
Issue openzfs#2437
Issue openzfs#5202
Issue openzfs#4034
Issue openzfs#6095
behlendorf added a commit to behlendorf/zfs that referenced this issue May 11, 2017
Enable additional test cases, in most cases this required a few
minor modifications to the test scripts.  In a few cases a real
bug was uncovered and fixed.  And in a handful of cases where pools
are layered on pools the test case will be skipped until this is
supported.  Details below for each test case.

* zpool_add_004_pos - Skip test on Linux until adding zvols to pools
  is fully supported and deadlock free.

* zpool_add_005_pos.ksh - Skip dumpadm portion of the test which isn't
  relevant for Linux.  The find_vfstab_dev, find_mnttab_dev, and
  save_dump_dev functions were updated accordingly for Linux.  Add
  O_EXCL to the in-use check to prevent the -f (force) option from
  working for mounted filesystems and improve the resulting error.

* zpool_add_006_pos - Update test case such that it doesn't depend
  on nested pools.  Switch to truncate from mkfile to reduce space
  requirements and speed up the test case.

* zpool_clear_001_pos - Speed up test case by filling filesystem to
  25% capacity.

* zpool_create_002_pos, zpool_create_004_pos - Use sparse files for
  file vdevs in order to avoid increasing the partition size.

* zpool_create_006_pos - 6ba1ce9 allows raidz+mirror configs with
  similar redundancy.  Updating the valid_args and forced_args cases.

* zpool_create_008_pos - Disable overlapping partition portion.

* zpool_create_011_neg - Fix to correctly create the extra partition.
  Modified zpool_vdev.c to use fstat64_blk() wrapper which includes
  the st_size even for block devices.

* zpool_create_012_neg - Updated to properly find swap devices.

* zpool_create_014_neg, zpool_create_015_neg - Updated to use
  swap_setup() and swap_cleanup() wrappers which do the right thing
  on Linux and Illumos.  Removed '-n' option which successed under
  Linux due to differences in the inuse checks.

* zpool_create_016_pos.ksh - Skipped test case isn't useful.

* zpool_create_020_pos - Added missing / to cleanup() function.
  Remove cache file prior to test to ensure a clean environment
  and avoid false positives.

* zpool_destroy_001_pos - Removed test case which creates a pool on
  a zvol.  This is more likely to deadlock under Linux and has never
  been completely supported on any platform.

* zpool_destroy_002_pos - 'zpool destroy -f' is unsupported on Linux.
  Mount point must not be busy in order to unmount them.

* zfs_destroy_001_pos - Handle EBUSY error which can occur with
  volumes when racing with udev.

* zpool_expand_001_pos, zpool_expand_003_neg - Skip test on Linux
  until adding zvols to pools is fully supported and deadlock free.
  The test could be modified to use loopback devices but it would
  be preerable to use the test case as is for improved coverage.

* zpool_export_004_pos - Updated test case to such that it doesn't
  depend on nested pools.  Normal file vdev under /var/tmp are fine.

* zpool_import_all_001_pos - Updated to skip partition 1, which is
  known as slice 2, on Illumos.  This prevents overwritting the
  default TESTPOOL which was causing the failure.

* zpool_import_002_pos, zpool_import_012_pos - No changes needed.

* zpool_remove_003_pos - No changes needed

* zpool_upgrade_002_pos, zpool_upgrade_004_pos - Root cause addressed
  by upstream OpenZFS commit 3b7f360.

* zpool_upgrade_007_pos - Disabled in test case due to known failure.
  Opened issue openzfs#6112

* zvol_misc_002_pos - Updated to to use ext2.

* zvol_misc_001_neg, zvol_misc_003_neg, zvol_misc_004_pos,
  zvol_misc_005_neg, zvol_misc_006_pos - Moved to skip list, thesei
  test case could be updated to use Linux's crash dump facility.

* zvol_swap_* - Updated to use swap_setup/swap_cleanup helpers.
  File creation switched from /tmp to /var/tmp.  Enabled minimal
  useful tests for Linux, skip test cases which aren't applicable.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#3484
Issue openzfs#5634
Issue openzfs#2437
Issue openzfs#5202
Issue openzfs#4034
Issue openzfs#6095
behlendorf added a commit to behlendorf/zfs that referenced this issue May 11, 2017
Enable additional test cases, in most cases this required a few
minor modifications to the test scripts.  In a few cases a real
bug was uncovered and fixed.  And in a handful of cases where pools
are layered on pools the test case will be skipped until this is
supported.  Details below for each test case.

* zpool_add_004_pos - Skip test on Linux until adding zvols to pools
  is fully supported and deadlock free.

* zpool_add_005_pos.ksh - Skip dumpadm portion of the test which isn't
  relevant for Linux.  The find_vfstab_dev, find_mnttab_dev, and
  save_dump_dev functions were updated accordingly for Linux.  Add
  O_EXCL to the in-use check to prevent the -f (force) option from
  working for mounted filesystems and improve the resulting error.

* zpool_add_006_pos - Update test case such that it doesn't depend
  on nested pools.  Switch to truncate from mkfile to reduce space
  requirements and speed up the test case.

* zpool_clear_001_pos - Speed up test case by filling filesystem to
  25% capacity.

* zpool_create_002_pos, zpool_create_004_pos - Use sparse files for
  file vdevs in order to avoid increasing the partition size.

* zpool_create_006_pos - 6ba1ce9 allows raidz+mirror configs with
  similar redundancy.  Updating the valid_args and forced_args cases.

* zpool_create_008_pos - Disable overlapping partition portion.

* zpool_create_011_neg - Fix to correctly create the extra partition.
  Modified zpool_vdev.c to use fstat64_blk() wrapper which includes
  the st_size even for block devices.

* zpool_create_012_neg - Updated to properly find swap devices.

* zpool_create_014_neg, zpool_create_015_neg - Updated to use
  swap_setup() and swap_cleanup() wrappers which do the right thing
  on Linux and Illumos.  Removed '-n' option which successed under
  Linux due to differences in the inuse checks.

* zpool_create_016_pos.ksh - Skipped test case isn't useful.

* zpool_create_020_pos - Added missing / to cleanup() function.
  Remove cache file prior to test to ensure a clean environment
  and avoid false positives.

* zpool_destroy_001_pos - Removed test case which creates a pool on
  a zvol.  This is more likely to deadlock under Linux and has never
  been completely supported on any platform.

* zpool_destroy_002_pos - 'zpool destroy -f' is unsupported on Linux.
  Mount point must not be busy in order to unmount them.

* zfs_destroy_001_pos - Handle EBUSY error which can occur with
  volumes when racing with udev.

* zpool_expand_001_pos, zpool_expand_003_neg - Skip test on Linux
  until adding zvols to pools is fully supported and deadlock free.
  The test could be modified to use loopback devices but it would
  be preerable to use the test case as is for improved coverage.

* zpool_export_004_pos - Updated test case to such that it doesn't
  depend on nested pools.  Normal file vdev under /var/tmp are fine.

* zpool_import_all_001_pos - Updated to skip partition 1, which is
  known as slice 2, on Illumos.  This prevents overwritting the
  default TESTPOOL which was causing the failure.

* zpool_import_002_pos, zpool_import_012_pos - No changes needed.

* zpool_remove_003_pos - No changes needed

* zpool_upgrade_002_pos, zpool_upgrade_004_pos - Root cause addressed
  by upstream OpenZFS commit 3b7f360.

* zpool_upgrade_007_pos - Disabled in test case due to known failure.
  Opened issue openzfs#6112

* zvol_misc_002_pos - Updated to to use ext2.

* zvol_misc_001_neg, zvol_misc_003_neg, zvol_misc_004_pos,
  zvol_misc_005_neg, zvol_misc_006_pos - Moved to skip list, thesei
  test case could be updated to use Linux's crash dump facility.

* zvol_swap_* - Updated to use swap_setup/swap_cleanup helpers.
  File creation switched from /tmp to /var/tmp.  Enabled minimal
  useful tests for Linux, skip test cases which aren't applicable.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#3484
Issue openzfs#5634
Issue openzfs#2437
Issue openzfs#5202
Issue openzfs#4034
Issue openzfs#6095
behlendorf added a commit that referenced this issue May 11, 2017
Enable additional test cases, in most cases this required a few
minor modifications to the test scripts.  In a few cases a real
bug was uncovered and fixed.  And in a handful of cases where pools
are layered on pools the test case will be skipped until this is
supported.  Details below for each test case.

* zpool_add_004_pos - Skip test on Linux until adding zvols to pools
  is fully supported and deadlock free.

* zpool_add_005_pos.ksh - Skip dumpadm portion of the test which isn't
  relevant for Linux.  The find_vfstab_dev, find_mnttab_dev, and
  save_dump_dev functions were updated accordingly for Linux.  Add
  O_EXCL to the in-use check to prevent the -f (force) option from
  working for mounted filesystems and improve the resulting error.

* zpool_add_006_pos - Update test case such that it doesn't depend
  on nested pools.  Switch to truncate from mkfile to reduce space
  requirements and speed up the test case.

* zpool_clear_001_pos - Speed up test case by filling filesystem to
  25% capacity.

* zpool_create_002_pos, zpool_create_004_pos - Use sparse files for
  file vdevs in order to avoid increasing the partition size.

* zpool_create_006_pos - 6ba1ce9 allows raidz+mirror configs with
  similar redundancy.  Updating the valid_args and forced_args cases.

* zpool_create_008_pos - Disable overlapping partition portion.

* zpool_create_011_neg - Fix to correctly create the extra partition.
  Modified zpool_vdev.c to use fstat64_blk() wrapper which includes
  the st_size even for block devices.

* zpool_create_012_neg - Updated to properly find swap devices.

* zpool_create_014_neg, zpool_create_015_neg - Updated to use
  swap_setup() and swap_cleanup() wrappers which do the right thing
  on Linux and Illumos.  Removed '-n' option which succeeds under
  Linux due to differences in the in-use checks.

* zpool_create_016_pos.ksh - Skipped test case isn't useful.

* zpool_create_020_pos - Added missing / to cleanup() function.
  Remove cache file prior to test to ensure a clean environment
  and avoid false positives.

* zpool_destroy_001_pos - Removed test case which creates a pool on
  a zvol.  This is more likely to deadlock under Linux and has never
  been completely supported on any platform.

* zpool_destroy_002_pos - 'zpool destroy -f' is unsupported on Linux.
  Mount point must not be busy in order to unmount them.

* zfs_destroy_001_pos - Handle EBUSY error which can occur with
  volumes when racing with udev.

* zpool_expand_001_pos, zpool_expand_003_neg - Skip test on Linux
  until adding zvols to pools is fully supported and deadlock free.
  The test could be modified to use loop-back devices but it would
  be preferable to use the test case as is for improved coverage.

* zpool_export_004_pos - Updated test case to such that it doesn't
  depend on nested pools.  Normal file vdev under /var/tmp are fine.

* zpool_import_all_001_pos - Updated to skip partition 1, which is
  known as slice 2, on Illumos.  This prevents overwriting the
  default TESTPOOL which was causing the failure.

* zpool_import_002_pos, zpool_import_012_pos - No changes needed.

* zpool_remove_003_pos - No changes needed

* zpool_upgrade_002_pos, zpool_upgrade_004_pos - Root cause addressed
  by upstream OpenZFS commit 3b7f360.

* zpool_upgrade_007_pos - Disabled in test case due to known failure.
  Opened issue #6112

* zvol_misc_002_pos - Updated to to use ext2.

* zvol_misc_001_neg, zvol_misc_003_neg, zvol_misc_004_pos,
  zvol_misc_005_neg, zvol_misc_006_pos - Moved to skip list, these
  test case could be updated to use Linux's crash dump facility.

* zvol_swap_* - Updated to use swap_setup/swap_cleanup helpers.
  File creation switched from /tmp to /var/tmp.  Enabled minimal
  useful tests for Linux, skip test cases which aren't applicable.

Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: loli10K <ezomori.nozomu@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #3484
Issue #5634
Issue #2437
Issue #5202
Issue #4034
Closes #6095
@behlendorf
Copy link
Contributor

Closing. This is being tracked as #6141

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Test Suite Indicates an issue with the test framework or a test case
Projects
None yet
Development

No branches or pull requests

4 participants