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: Support creating a zpool in a zpool #3484

Closed
ColinIanKing opened this issue Jun 10, 2015 · 4 comments
Closed

Test case: Support creating a zpool in a zpool #3484

ColinIanKing opened this issue Jun 10, 2015 · 4 comments
Labels
Component: Test Suite Indicates an issue with the test framework or a test case

Comments

@ColinIanKing
Copy link
Contributor

Distro: Ubuntu 15.04
Kernel: 3.19.0-18-generic
ZFS: 0.6.4.1

Creating a zpool with mirror, raidz1 and raidz2 vdevs hangs when the vdevs are inside a larger zfs filesystem. The zpool create just hangs indefinitely and after 2 minutes I see a hung task message.

Example output:

  • POOL_SIZE=1G
  • VDEVS_SIZE=64M
  • TMP=/var/tmp/test-zfs
  • rm -rf /var/tmp/test-zfs
  • mkdir -p /var/tmp/test-zfs
  • truncate -s 1G /var/tmp/test-zfs/pool
  • zpool create pool /var/tmp/test-zfs/pool
  • zfs create pool/vdevs
  • export vdev0=/pool/vdevs/vdev0
  • truncate -s 64M /pool/vdevs/vdev0
  • export vdev1=/pool/vdevs/vdev1
  • truncate -s 64M /pool/vdevs/vdev1
  • export vdev2=/pool/vdevs/vdev2
  • truncate -s 64M /pool/vdevs/vdev2
  • export vdev3=/pool/vdevs/vdev3
  • truncate -s 64M /pool/vdevs/vdev3
  • export vdev4=/pool/vdevs/vdev4
  • truncate -s 64M /pool/vdevs/vdev4
  • export vdev5=/pool/vdevs/vdev5
  • truncate -s 64M /pool/vdevs/vdev5
  • export vdev6=/pool/vdevs/vdev6
  • truncate -s 64M /pool/vdevs/vdev6
  • export vdev7=/pool/vdevs/vdev7
  • truncate -s 64M /pool/vdevs/vdev7
  • zpool create test -f /pool/vdevs/vdev0 mirror /pool/vdevs/vdev1 /pool/vdevs/vdev2 raidz1 /pool/vdevs/vdev3 /pool/vdevs/vdev4 raidz2 /pool/vdevs/vdev5 /pool/vdevs/vdev6 /pool/vdevs/vdev7
  • and hangs *

Below is the script that can reproduce the problem:

#!/bin/sh -x

POOL_SIZE=1G
VDEVS_SIZE=64M
TMP=/var/tmp/test-zfs
rm -rf $TMP
mkdir -p $TMP

truncate -s $POOL_SIZE $TMP/pool
zpool create pool $TMP/pool
zfs create pool/vdevs

for I in 0 1 2 3 4 5 6 7
do
        export vdev$I=/pool/vdevs/vdev$I
        truncate -s $VDEVS_SIZE /pool/vdevs/vdev$I
done

zpool create test -f $vdev0 mirror $vdev1 $vdev2 raidz1 $vdev3 $vdev4 raidz2 $vdev5 $vdev6 $vdev7
zpool destroy test
zpool destroy pool
rm $TMP/pool

Below is the kernel log:

[  360.140100] INFO: task vdev_file_taskq:1139 blocked for more than 120 seconds.
[  360.140156]       Tainted: P           OE  3.19.0-18-generic #18-Ubuntu
[  360.140207] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  360.140252] vdev_file_taskq D ffff8800bad0bc28     0  1139      2 0x00000000
[  360.140255]  ffff8800bad0bc28 ffff88013a7e93a0 0000000000014200 ffff8800bad0bfd8
[  360.140258]  0000000000014200 ffff88013a408000 ffff88013a7e93a0 ffff8800bad0bc38
[  360.140259]  ffff8800bafb3180 ffff8800bafb3000 ffff8800bafb3188 ffff8800bafb3028
[  360.140261] Call Trace:
[  360.140268]  [<ffffffff817c4f99>] schedule+0x29/0x70
[  360.140275]  [<ffffffffc064bd05>] cv_wait_common+0xe5/0x120 [spl]
[  360.140278]  [<ffffffff810b6380>] ? wait_woken+0x90/0x90
[  360.140283]  [<ffffffffc064bd55>] __cv_wait+0x15/0x20 [spl]
[  360.140316]  [<ffffffffc076f07b>] zil_commit.part.11+0x7b/0x7f0 [zfs]
[  360.140321]  [<ffffffffc064cc17>] ? tsd_hash_search.isra.1+0x77/0xa0 [spl]
[  360.140325]  [<ffffffffc064ce89>] ? tsd_set+0x1e9/0x2e0 [spl]
[  360.140328]  [<ffffffff817c7426>] ? mutex_lock+0x16/0x40
[  360.140360]  [<ffffffffc076f807>] zil_commit+0x17/0x20 [zfs]
[  360.140386]  [<ffffffffc076563f>] zfs_fsync+0x7f/0x100 [zfs]
[  360.140412]  [<ffffffffc077b30a>] zpl_fsync+0x6a/0xa0 [zfs]
[  360.140416]  [<ffffffff81225239>] vfs_fsync+0x29/0x40
[  360.140420]  [<ffffffffc0649800>] vn_fsync+0x50/0x60 [spl]
[  360.140444]  [<ffffffffc07342e2>] vdev_file_io_fsync+0x32/0x50 [zfs]
[  360.140448]  [<ffffffffc06483a6>] taskq_thread+0x1a6/0x350 [spl]
[  360.140450]  [<ffffffff810a1de0>] ? wake_up_state+0x20/0x20
[  360.140453]  [<ffffffffc0648200>] ? taskq_cancel_id+0x120/0x120 [spl]
[  360.140456]  [<ffffffff81094739>] kthread+0xc9/0xe0
[  360.140459]  [<ffffffff81094670>] ? kthread_create_on_node+0x1c0/0x1c0
[  360.140462]  [<ffffffff817c9858>] ret_from_fork+0x58/0x90
[  360.140464]  [<ffffffff81094670>] ? kthread_create_on_node+0x1c0/0x1c0
[  360.140466] INFO: task vdev_file_taskq:1140 blocked for more than 120 seconds.
[  360.140515]       Tainted: P           OE  3.19.0-18-generic #18-Ubuntu
[  360.140559] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  360.140609] vdev_file_taskq D ffff8800bad0fc28     0  1140      2 0x00000000
[  360.140612]  ffff8800bad0fc28 ffff88013a7ef5c0 0000000000014200 ffff8800bad0ffd8
[  360.140613]  0000000000014200 ffff8800bab4a740 ffff88013a7ef5c0 ffff8800bad0fc38
[  360.140615]  ffff8800bafb3180 ffff8800bafb3000 ffff8800bafb3188 ffff8800bafb3028
[  360.140617] Call Trace:
[  360.140620]  [<ffffffff817c4f99>] schedule+0x29/0x70
[  360.140624]  [<ffffffffc064bd05>] cv_wait_common+0xe5/0x120 [spl]
[  360.140627]  [<ffffffff810b6380>] ? wait_woken+0x90/0x90
[  360.140631]  [<ffffffffc064bd55>] __cv_wait+0x15/0x20 [spl]
[  360.140658]  [<ffffffffc076f07b>] zil_commit.part.11+0x7b/0x7f0 [zfs]
[  360.140663]  [<ffffffffc064cc17>] ? tsd_hash_search.isra.1+0x77/0xa0 [spl]
[  360.140667]  [<ffffffffc064ce89>] ? tsd_set+0x1e9/0x2e0 [spl]
[  360.140670]  [<ffffffff817c7426>] ? mutex_lock+0x16/0x40
[  360.140700]  [<ffffffffc076f807>] zil_commit+0x17/0x20 [zfs]
[  360.140725]  [<ffffffffc076563f>] zfs_fsync+0x7f/0x100 [zfs]
[  360.140751]  [<ffffffffc077b30a>] zpl_fsync+0x6a/0xa0 [zfs]
[  360.140753]  [<ffffffff81225239>] vfs_fsync+0x29/0x40
[  360.140757]  [<ffffffffc0649800>] vn_fsync+0x50/0x60 [spl]
[  360.140781]  [<ffffffffc07342e2>] vdev_file_io_fsync+0x32/0x50 [zfs]
[  360.140785]  [<ffffffffc06483a6>] taskq_thread+0x1a6/0x350 [spl]
[  360.140787]  [<ffffffff810a1de0>] ? wake_up_state+0x20/0x20
[  360.140790]  [<ffffffffc0648200>] ? taskq_cancel_id+0x120/0x120 [spl]
[  360.140793]  [<ffffffff81094739>] kthread+0xc9/0xe0
[  360.140795]  [<ffffffff81094670>] ? kthread_create_on_node+0x1c0/0x1c0
[  360.140802]  [<ffffffff817c9858>] ret_from_fork+0x58/0x90
[  360.140804]  [<ffffffff81094670>] ? kthread_create_on_node+0x1c0/0x1c0
@FransUrbo
Copy link
Contributor

Creating a zpool with mirror, raidz1 and raidz2 vdevs hangs when the vdevs are inside a larger zfs filesystem. The zpool create just hangs indefinitely and after 2 minutes I see a hung task message.

This is, unfortunately, a known problem. You can't create a Z pool on/inside a(nother) Z pool.

Cause is unknown as far as I know. There should be other issues regarding this 'somewhere'.

@ColinIanKing
Copy link
Contributor Author

OK, well, the zfs-tests seem to use it too, for example, it breaks on zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_006_pos - (these are the Linux flavour of the tests), so I was thinking it would at least not hang.

@FransUrbo
Copy link
Contributor

OK, well, the zfs-tests seem to use it too, for example,

Yes, I know. I ported that from Illumos :). This is one of quite a number of reasons why we're not actively using zfs-test yet.

@behlendorf
Copy link
Contributor

This in fact is the biggest reason we're not running the test suite on at least one of the automated builders. The zfs-test suite does do this but even under illumos it's not 100% deadlock free. It's just far less likely because they use a dynamic system_taskq to handle the IO which can have up to 64 threads. That makes a deadlock due to taskq ordering far far far less likely (but possible).

That said I'd love to see this issue solved either by:

  • Ideally making this usage safe under Linux, or
  • rewriting the offending test cases to not create nested pools

Coincidentally enough I'll be proposing patches either latter today or this week to add dynamic taskq support to ZoL. This should allow us to adapt the illumos way of handling this which may be good enough for most purposes.

@behlendorf behlendorf added the Component: Test Suite Indicates an issue with the test framework or a test case label Dec 9, 2016
@behlendorf behlendorf changed the title zpool create with mirror, raidz1 and raidz2 hangs Support creating a zpool in a zpool Dec 9, 2016
@behlendorf behlendorf changed the title Support creating a zpool in a zpool Test case: Support creating a zpool in a zpool Jan 24, 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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
Reviewed-by: loli10K <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #3484
Issue #5634
Issue #2437
Issue #5202
Issue #4034
Closes #6095
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

3 participants