diff options
author | Marcel Telka <[email protected]> | 2016-10-19 10:50:39 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-02-13 11:28:54 -0800 |
commit | 94cc33f017b45dfdc137672e8e6feddc5ff56a9e (patch) | |
tree | 724dd7ecdb9dab6dd590a9e6529ac72f04a11d5b /tests | |
parent | a115cf35f8b4a85907e9879a18476e9b89b3c981 (diff) |
OpenZFS 7103 - failed test cli_root/zfs_snapshot/zfs_snapshot_009_pos
Authored by: Marcel Telka <[email protected]>
Reviewed by: - Igor Kozhukhov <[email protected]>
Reviewed by: - Yuri Pankov <[email protected]>
Reviewed by: - John Kennedy <[email protected]>
Approved by: - Matthew Ahrens <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Ported-by: George Melikov <[email protected]>
OpenZFS-issue: https://www.illumos.org/issues/7103
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/3bfdbb4
Closes #5780
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/zfs-tests/tests/functional/cli_root/zfs_snapshot/zfs_snapshot_009_pos.ksh | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs_snapshot/zfs_snapshot_009_pos.ksh b/tests/zfs-tests/tests/functional/cli_root/zfs_snapshot/zfs_snapshot_009_pos.ksh index 1a26ef00c..ff0cdf129 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zfs_snapshot/zfs_snapshot_009_pos.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zfs_snapshot/zfs_snapshot_009_pos.ksh @@ -26,6 +26,8 @@ . $STF_SUITE/include/libtest.shlib +ZFS_MAX_DATASET_NAME_LEN=256 + function cleanup { for ds in $datasets; do @@ -36,14 +38,18 @@ function cleanup datasets="$TESTPOOL/$TESTFS1 $TESTPOOL/$TESTFS2 $TESTPOOL/$TESTFS3" +# We subtract 3 for slash (/), at (@), and the terminating nul (\0) +SNAPSHOT_XXX=$(printf 'x%.0s' \ + {1..$(($ZFS_MAX_DATASET_NAME_LEN - ${#TESTPOOL} - ${#TESTFS1} - 3))}) + invalid_args=("$TESTPOOL/$TESTFS1@now $TESTPOOL/$TESTFS2@now \ $TESTPOOL/$TESTFS@blah?" "$TESTPOOL/$TESTFS1@blah* \ $TESTPOOL/$TESTFS2@blah? $TESTPOOL/$TESTFS3@blah%" \ - "$TESTPOOL/$TESTFS1@$($PYTHON -c 'print "x" * 300') $TESTPOOL/$TESTFS2@300 \ + "$TESTPOOL/$TESTFS1@x$SNAPSHOT_XXX $TESTPOOL/$TESTFS2@300 \ $TESTPOOL/$TESTFS3@300") valid_args=("$TESTPOOL/$TESTFS1@snap $TESTPOOL/$TESTFS2@snap \ - $TESTPOOL/$TESTFS3@snap" "$TESTPOOL/$TESTFS1@$($PYTHON -c 'print "x" * 200')\ + $TESTPOOL/$TESTFS3@snap" "$TESTPOOL/$TESTFS1@$SNAPSHOT_XXX \ $TESTPOOL/$TESTFS2@2 $TESTPOOL/$TESTFS3@s") log_assert "verify zfs supports multiple consistent snapshots" @@ -89,12 +95,17 @@ for ds in $datasets; do "the filesystem" done +# We subtract 3 + 7 + 7 + 1 = 18 for three slashes (/), strlen("TESTFSA") == 7, +# strlen("TESTFSB") == 7, and the terminating nul (\0) +DATASET_XXX=$(printf 'x%.0s' \ + {1..$(($ZFS_MAX_DATASET_NAME_LEN - ${#TESTPOOL} - ${#TESTFS3} - 18))}) + log_note "verify multiple snapshot with -r option" log_must $ZFS create $TESTPOOL/TESTFS4 -log_must $ZFS create -p $TESTPOOL/$TESTFS3/TESTFSA$($PYTHON -c 'print "x" * 210')/TESTFSB +log_must $ZFS create -p $TESTPOOL/$TESTFS3/TESTFSA$DATASET_XXX/TESTFSB log_mustnot $ZFS snapshot -r $TESTPOOL/$TESTFS1@snap1 $TESTPOOL/$TESTFS2@snap1 \ $TESTPOOL/$TESTFS3@snap1 $TESTPOOL/TESTFS4@snap1 -log_must $ZFS rename $TESTPOOL/$TESTFS3/TESTFSA$($PYTHON -c 'print "x" * 210') \ +log_must $ZFS rename $TESTPOOL/$TESTFS3/TESTFSA$DATASET_XXX \ $TESTPOOL/$TESTFS3/TESTFSA log_must $ZFS snapshot -r $TESTPOOL/$TESTFS1@snap1 $TESTPOOL/$TESTFS2@snap1 \ $TESTPOOL/$TESTFS3@snap1 $TESTPOOL/TESTFS4@snap1 |