Project

General

Profile

Actions

Feature #11962

closed

Port ZoL zfs diff tests to illumos

Added by Jason King almost 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
tests
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

ZoL includes several tests of the 'zfs diff' command. We should port these to illumos.

Actions #1

Updated by Jason King almost 3 years ago

commit b59b22972db5913000ca157c24a254182df8d957
Author: LOLi <>
Date: Thu Sep 28 22:04:14 2017 +0200

Add 'zfs diff' coverage to the ZFS Test Suite
This change adds four new tests to the ZTS:
  • zfs_diff_changes: verify type of changes diplayed (-, +, R and M)
  • zfs_diff_cliargs: verify command line options and arguments
  • zfs_diff_timestamp: verify 'zfs diff -t'
  • zfs_diff_types: verify type of objects (files, dirs, pipes...)
Reviewed-by: Brian Behlendorf &lt;&gt;
Reviewed-by: John Wren Kennedy &lt;&gt;
Signed-off-by: loli10K &lt;&gt;
Closes #6686

commit 21a4f5cc867b4f166704df84985edc048caa2578
Author: Tony Hutter <>
Date: Wed Apr 4 10:16:47 2018 -0700

Fedora 28: Fix misc bounds check compiler warnings
Fix a bunch of (mostly) sprintf/snprintf truncation compiler
warnings that show up on Fedora 28 (GCC 8.0.1).
Reviewed-by: Brian Behlendorf &lt;&gt;

commit 2c24b5b1487646f68960f25e13a1b0df645d4f49
Author: Tom Caputi <>
Date: Tue May 1 14:24:20 2018 -0400

Fix issues found with zfs diff
Two deadlocks / ASSERT failures were introduced in a2c2ed1b which
would occur whenever arc_buf_fill() failed to decrypt a block of
data. This occurred because the call to arc_buf_destroy() which
was responsible for cleaning up the newly created buffer would
attempt to take out the hdr lock that it was already holding. This
was resolved by calling the underlying functions directly without
retaking the lock.
In addition, the dmu_diff() code did not properly ensure that keys
were loaded and mapped before begining dataset traversal. It turns
out that this code does not need to look at any encrypted values,
so the code was altered to perform raw IO only.
Reviewed by: Matthew Ahrens &lt;&gt;
Reviewed-by: Brian Behlendorf &lt;&gt;
Actions #2

Updated by Jason King almost 3 years ago

Comparing ZoL and illumos-gate -- it appears that modulo the zfs diff test additions, we already have the changes in commit 2c24b5b1487646f68960f25e13a1b0df645d4f49 as part of the zfs crypto port.

Actions #3

Updated by Jason King over 2 years ago

To test, I built illumos-gate with these changes, then installed a BE from the resulting build. I made sure the new tests and updated runfiles were present. I ran the zfs test suite w/ the updated run files, making sure that the new tests ran successfully.

A few non zfs-diff tests did fail:
Test: /opt/zfs-tests/tests/functional/acl/nontrivial/zfs_acl_chmod_inherit_003_pos (run as root) [01:48] [FAIL]
Test: /opt/zfs-tests/tests/functional/cli_root/zfs_property/zfs_written_property_001_pos (run as root) [00:15] [FAIL]
Test: /opt/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_008_pos (run as root) [02:03] [FAIL]
Test: /opt/zfs-tests/tests/functional/cli_root/zpool_expand/zpool_expand_001_pos (run as root) [00:31] [FAIL]
Test: /opt/zfs-tests/tests/functional/cli_root/zpool_initialize/zpool_initialize_verify_initialized (run as root) [00:06] [FAIL]
Test: /opt/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_multiple_copies (run as root) [00:11] [FAIL]
Test: /opt/zfs-tests/tests/functional/inheritance/inherit_001_pos (run as root) [00:05] [FAIL]
Test: /opt/zfs-tests/tests/functional/mdb/mdb_001_pos (run as root) [00:03] [FAIL]
Test: /opt/zfs-tests/tests/functional/no_space/enospc_002_pos (run as root) [01:39] [FAIL]
Test: /opt/zfs-tests/tests/functional/redundancy/redundancy_003_pos (run as root) [01:46] [FAIL]
Test: /opt/zfs-tests/tests/functional/refreserv/refreserv_004_pos (run as root) [00:05] [FAIL]
Test: /opt/zfs-tests/tests/functional/removal/removal_with_add (run as root) [00:35] [FAIL]
Test: /opt/zfs-tests/tests/functional/rsend/rsend_008_pos (run as root) [00:02] [FAIL]
Test: /opt/zfs-tests/tests/functional/rsend/send_encrypted_props (run as root) [00:25] [FAIL]
Test: /opt/zfs-tests/tests/functional/vdev_zaps/vdev_zaps_007_pos (run as root) [00:08] [FAIL]

however those seem to be unrelated -- even after rebooting and running by themselves, they still fail, and the failures all look to be unrelated (e.g. rsend_008_pos fails because the zfs command trips an assertion). I'll try to follow up with tickets for the failures to help others out.

Actions #5

Updated by Electric Monk over 2 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit a629ded1d7b2e67c2028ccbc5ba9099328cc4e1b

commit  a629ded1d7b2e67c2028ccbc5ba9099328cc4e1b
Author: LOLi <loli10K@users.noreply.github.com>
Date:   2019-11-25T22:15:58.000Z

    11962 Port ZoL zfs diff tests to illumos
    Portions contributed by: Tony Hutter <hutter2@llnl.gov>
    Portions contributed by: Tom Caputi <tcaputi@datto.com>
    Portions contributed by: Jason King <jason.king@joyent.com>
    Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
    Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF