From dbfa19db5be57886f14ee06ef66debec81fcce44 Mon Sep 17 00:00:00 2001 From: Ankur Srivastava <88029242+ankurs-delphix@users.noreply.github.com> Date: Mon, 10 Jan 2022 21:36:35 +0530 Subject: [PATCH] DOSE-442 zpool export tests (#83) --- tests/runfiles/object_store.run | 22 +++++++++++++++++++ tests/test-runner/bin/zts-report.py.in | 13 +++++++++++ .../cli_root/zpool_export/zpool_export.kshlib | 1 + .../zpool_export/zpool_export_004_pos.ksh | 4 ++++ .../tests/functional/inuse/setup.ksh | 4 ++++ .../largest_pool/largest_pool_001_pos.ksh | 3 +++ .../log_spacemap/log_spacemap_import_logs.ksh | 4 ++++ 7 files changed, 51 insertions(+) diff --git a/tests/runfiles/object_store.run b/tests/runfiles/object_store.run index 5b8fd0ead732..602667af9337 100644 --- a/tests/runfiles/object_store.run +++ b/tests/runfiles/object_store.run @@ -447,3 +447,25 @@ tags = ['functional', 'cli_user', 'misc'] [tests/functional/large_files] tests = ['large_files_001_pos', 'large_files_002_pos'] tags = ['functional', 'large_files'] + +[tests/functional/cli_root/zpool_export] +tests = ['zpool_export_001_pos', 'zpool_export_002_pos', + 'zpool_export_003_neg', 'zpool_export_004_pos'] +tags = ['functional', 'cli_root', 'zpool_export'] + +[tests/functional/largest_pool] +tests = ['largest_pool_001_pos'] +pre = +post = +tags = ['functional', 'largest_pool'] + +[tests/functional/inuse] +tests = ['inuse_004_pos', 'inuse_005_pos', 'inuse_008_pos', 'inuse_009_pos'] +post = +tags = ['functional', 'inuse'] + +[tests/functional/log_spacemap] +tests = ['log_spacemap_import_logs'] +pre = +post = +tags = ['functional', 'log_spacemap'] diff --git a/tests/test-runner/bin/zts-report.py.in b/tests/test-runner/bin/zts-report.py.in index 41e2569dc981..0a8fb4acfe64 100755 --- a/tests/test-runner/bin/zts-report.py.in +++ b/tests/test-runner/bin/zts-report.py.in @@ -330,6 +330,19 @@ if os.environ.get('ZTS_OBJECT_STORE') == 'true': 'cli_user/misc/zpool_online_001_neg': ['SKIP', object_store_skip], 'cli_user/misc/zpool_remove_001_neg': ['SKIP', object_store_skip], 'cli_user/misc/zpool_replace_001_neg': ['SKIP', object_store_skip], + 'cli_root/zpool_export/zpool_export_004_pos': + ['SKIP', object_store_skip], + 'inuse/setup': ['SKIP', object_store_skip], + 'inuse/inuse_001_pos': ['SKIP', object_store_skip], + 'inuse/inuse_003_pos': ['SKIP', object_store_skip], + 'inuse/inuse_004_pos': ['SKIP', object_store_skip], + 'inuse/inuse_005_pos': ['SKIP', object_store_skip], + 'inuse/inuse_006_pos': ['SKIP', object_store_skip], + 'inuse/inuse_007_pos': ['SKIP', object_store_skip], + 'inuse/inuse_008_pos': ['SKIP', object_store_skip], + 'inuse/inuse_009_pos': ['SKIP', object_store_skip], + 'log_spacemap/log_spacemap_import_logs': ['SKIP', object_store_skip], + }) # diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_export/zpool_export.kshlib b/tests/zfs-tests/tests/functional/cli_root/zpool_export/zpool_export.kshlib index 5484f20674d5..728fb37a9ca7 100644 --- a/tests/zfs-tests/tests/functional/cli_root/zpool_export/zpool_export.kshlib +++ b/tests/zfs-tests/tests/functional/cli_root/zpool_export/zpool_export.kshlib @@ -28,5 +28,6 @@ function zpool_export_cleanup { [[ -d $TESTDIR0 ]] && log_must rm -rf $TESTDIR0 + import_pool -p $TESTPOOL default_cleanup } diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_export/zpool_export_004_pos.ksh b/tests/zfs-tests/tests/functional/cli_root/zpool_export/zpool_export_004_pos.ksh index 9be3f23c4fda..0fbe070d3740 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zpool_export/zpool_export_004_pos.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zpool_export/zpool_export_004_pos.ksh @@ -48,6 +48,10 @@ # 10. Import the pool. # +if use_object_store; then + log_unsupported "Not supported for object store run." +fi + verify_runnable "global" log_assert "Verify zpool export succeed or fail with spare." diff --git a/tests/zfs-tests/tests/functional/inuse/setup.ksh b/tests/zfs-tests/tests/functional/inuse/setup.ksh index 962a0c98dc7e..28e92dcd1bf5 100755 --- a/tests/zfs-tests/tests/functional/inuse/setup.ksh +++ b/tests/zfs-tests/tests/functional/inuse/setup.ksh @@ -31,6 +31,10 @@ . $STF_SUITE/include/libtest.shlib +if use_object_store; then + log_unsupported "Not supported with object store run." +fi + verify_runnable "global" log_pass diff --git a/tests/zfs-tests/tests/functional/largest_pool/largest_pool_001_pos.ksh b/tests/zfs-tests/tests/functional/largest_pool/largest_pool_001_pos.ksh index b59af6f20cd3..e273eee8525e 100755 --- a/tests/zfs-tests/tests/functional/largest_pool/largest_pool_001_pos.ksh +++ b/tests/zfs-tests/tests/functional/largest_pool/largest_pool_001_pos.ksh @@ -118,6 +118,9 @@ log_onexit cleanup # ----------------------------------------------------------------------- typeset str typeset -i ret + +use_object_store && VOLSIZES="2pb 5pb 10pb" + for volsize in $VOLSIZES; do log_note "Create a pool which will contain a volume device" create_pool -p $TESTPOOL2 -d "$DISKS" diff --git a/tests/zfs-tests/tests/functional/log_spacemap/log_spacemap_import_logs.ksh b/tests/zfs-tests/tests/functional/log_spacemap/log_spacemap_import_logs.ksh index fca0e8e4a1b4..cafec8f6fa22 100755 --- a/tests/zfs-tests/tests/functional/log_spacemap/log_spacemap_import_logs.ksh +++ b/tests/zfs-tests/tests/functional/log_spacemap/log_spacemap_import_logs.ksh @@ -44,6 +44,10 @@ # 7. Reset tunables. # +if use_object_store; then + log_unsupported "Not supported for object store run." +fi + verify_runnable "global" function cleanup