diff --git a/tests/runfiles/linux.run b/tests/runfiles/linux.run index 482a6ae5f0..42a82e4b38 100644 --- a/tests/runfiles/linux.run +++ b/tests/runfiles/linux.run @@ -428,16 +428,11 @@ tests = ['large_dnode_001_pos', 'large_dnode_002_pos', 'large_dnode_003_pos', #pre = #post = -# DISABLED: -# history_001_pos - export commands missing from history -# history_003_pos - nested pool -# history_006_neg - needs investigation -# history_007_pos - needs investigation -# history_008_pos - needs investigation -# history_010_pos - needs investigation [tests/functional/history] -tests = ['history_002_pos', 'history_004_pos', 'history_005_neg', - 'history_009_pos'] +tests = ['history_001_pos', 'history_002_pos', 'history_003_pos', + 'history_004_pos', 'history_005_neg', 'history_006_neg', + 'history_007_pos', 'history_008_pos', 'history_009_pos', + 'history_010_pos'] [tests/functional/inheritance] tests = ['inherit_001_pos'] diff --git a/tests/zfs-tests/tests/functional/history/Makefile.am b/tests/zfs-tests/tests/functional/history/Makefile.am index b96c6e6396..861f412994 100644 --- a/tests/zfs-tests/tests/functional/history/Makefile.am +++ b/tests/zfs-tests/tests/functional/history/Makefile.am @@ -13,10 +13,7 @@ dist_pkgdata_SCRIPTS = \ history_007_pos.ksh \ history_008_pos.ksh \ history_009_pos.ksh \ - history_010_pos.ksh - - -EXTRA_DIST = \ + history_010_pos.ksh \ i386.migratedpool.DAT.Z \ i386.orig_history.txt \ sparc.migratedpool.DAT.Z \ diff --git a/tests/zfs-tests/tests/functional/history/history_001_pos.ksh b/tests/zfs-tests/tests/functional/history/history_001_pos.ksh index e5a5c8327b..e63d5ac505 100755 --- a/tests/zfs-tests/tests/functional/history/history_001_pos.ksh +++ b/tests/zfs-tests/tests/functional/history/history_001_pos.ksh @@ -92,10 +92,21 @@ for i in 0 2; do $ZPOOL history $MPOOL > $TMP_HISTORY 2>/dev/null $DIFF $OLD_HISTORY $TMP_HISTORY | $GREP "^> " | $SED 's/^> //g' > \ $NEW_HISTORY - $GREP "$($ECHO "$cmd1" | $SED 's/\/usr\/sbin\///g')" $NEW_HISTORY \ - >/dev/null 2>&1 || log_fail "Didn't find \"$cmd1\" in pool history" - $GREP "$($ECHO "$cmd2" | $SED 's/\/usr\/sbin\///g')" $NEW_HISTORY \ - >/dev/null 2>&1 || log_fail "Didn't find \"$cmd2\" in pool history" + if is_linux; then + $GREP "$($ECHO "$cmd1" | $SED 's/^.*\/\(zpool .*\).*$/\1/')" \ + $NEW_HISTORY >/dev/null 2>&1 || \ + log_fail "Didn't find \"$cmd1\" in pool history" + $GREP "$($ECHO "$cmd2" | $SED 's/^.*\/\(zpool .*\).*$/\1/')" \ + $NEW_HISTORY >/dev/null 2>&1 || \ + log_fail "Didn't find \"$cmd2\" in pool history" + else + $GREP "$($ECHO "$cmd1" | $SED 's/\/usr\/sbin\///g')" \ + $NEW_HISTORY >/dev/null 2>&1 || \ + log_fail "Didn't find \"$cmd1\" in pool history" + $GREP "$($ECHO "$cmd2" | $SED 's/\/usr\/sbin\///g')" \ + $NEW_HISTORY >/dev/null 2>&1 || \ + log_fail "Didn't find \"$cmd2\" in pool history" + fi done run_and_verify -p "$MPOOL" "$ZPOOL split $MPOOL ${MPOOL}_split" diff --git a/tests/zfs-tests/tests/functional/history/history_common.kshlib b/tests/zfs-tests/tests/functional/history/history_common.kshlib index e1f1d06d27..640666ca13 100644 --- a/tests/zfs-tests/tests/functional/history/history_common.kshlib +++ b/tests/zfs-tests/tests/functional/history/history_common.kshlib @@ -109,8 +109,13 @@ function verify_long hname=$hname:$($ZONENAME) fi - $GREP "$cmd \[user $uid ($user) on $hname\]" $NEW_HISTORY >/dev/null \ - 2>&1 + typeset suffix="" + if [ is_linux ]; then + suffix=":linux" + fi + + $GREP "$cmd \[user $uid ($user) on $hname$suffix\]" \ + $NEW_HISTORY >/dev/null 2>&1 if [[ $? != 0 ]]; then log_note "Couldn't find long information for \"$cmd\"" return 1