mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-06-25 02:28:01 +03:00

Adopt and extend the OpenZFS ZTS results analysis script for use with ZFS on Linux. This allows for automatic analysis of tests which may be skipped for a variety or reasons or which are not entirely reliable. In addition to the list of 'known' failures, which have been updated for ZFS on Linux, there in a new 'maybe' section. This mapping include tests which might be correctly skipped depending on the test environment. This may be because of a missing dependency or lack of required kernel support. This list also includes tests which normally pass but might on occasion fail for a harmless reason. The script was also extended include a reason for why a given test might be skipped or may fail. The reason will be included after the test in the "results other than PASS that are expected" section. For failures it is preferable to set the reason to the GitHub issue number and for skipped tests several generic reasons are available. You may also specify a custom reason if needed. All tests were added back in to the linux.run file even if they are expected to failed. There is value in running tests which may not pass, the expected results for these tests has been encoded in the new analysis script. All tests which were disabled because they ran more slowly on a 32-bit system have been re-enabled. Developers working on 32-bit systems should assess what it reasonable for their environment. The unnecessary dependency on physical block devices was removed for the checksum, grow_pool, and grow_replicas test groups so they are no longer skipped. Updated the filetest_001_pos test case to run properly now that it is enabled and moved the grow tests in to a single directory. Reviewed-by: Prakash Surya <prakash.surya@delphix.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #7638
58 lines
1.7 KiB
Bash
Executable File
58 lines
1.7 KiB
Bash
Executable File
#!/bin/ksh -p
|
|
#
|
|
# This file and its contents are supplied under the terms of the
|
|
# Common Development and Distribution License ("CDDL"), version 1.0.
|
|
# You may only use this file in accordance with the terms of version
|
|
# 1.0 of the CDDL.
|
|
#
|
|
# A full copy of the text of the CDDL should have accompanied this
|
|
# source. A copy of the CDDL is also available via the Internet at
|
|
# http://www.illumos.org/license/CDDL.
|
|
#
|
|
|
|
#
|
|
# Copyright 2018, loli10K <ezomori.nozomu@gmail.com>. All rights reserved.
|
|
#
|
|
|
|
. $STF_SUITE/include/libtest.shlib
|
|
|
|
#
|
|
# DESCRIPTION:
|
|
# Verify the libzfs_core Python test suite can be run successfully
|
|
#
|
|
# STRATEGY:
|
|
# 1. Run the nvlist and libzfs_core Python unittest
|
|
# 2. Verify the exit code is 0 (no errors)
|
|
#
|
|
|
|
verify_runnable "global"
|
|
|
|
# Verify that the required dependencies for testing are installed.
|
|
python -c "import cffi" 2>/dev/null
|
|
if [ $? -eq 1 ]; then
|
|
log_unsupported "python-cffi not found by Python"
|
|
fi
|
|
|
|
# We don't just try to "import libzfs_core" because we want to skip these tests
|
|
# only if pyzfs was not installed due to missing, build-time, dependencies; if
|
|
# we cannot load "libzfs_core" due to other reasons, for instance an API/ABI
|
|
# mismatch, we want to report it.
|
|
python -c '
|
|
import pkgutil, sys
|
|
sys.exit(pkgutil.find_loader("libzfs_core") is None)'
|
|
if [ $? -eq 1 ]; then
|
|
log_unsupported "libzfs_core not found by Python"
|
|
fi
|
|
|
|
log_assert "Verify the nvlist and libzfs_core Python unittest run successfully"
|
|
|
|
# NOTE: don't use log_must() here because it makes output unreadable
|
|
python -m unittest --verbose \
|
|
libzfs_core.test.test_nvlist.TestNVList \
|
|
libzfs_core.test.test_libzfs_core.ZFSTest
|
|
if [ $? -ne 0 ]; then
|
|
log_fail "Python unittest completed with errors"
|
|
fi
|
|
|
|
log_pass "Python unittest completed without errors"
|