Project

General

Profile

Bug #11245

zfstest rename_dirs_001_pos RENAME_DIRS is undefined

Added by Mike Gerdts over 1 year ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
zfs - Zettabyte File System
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

rename_dirs_001_pos contains the following after stripping comments:

. $STF_SUITE/include/libtest.shlib
...
cd $TESTDIR
mkdir -p 1/2/3/4/5 a/b/c/d/e

$RENAME_DIRS &

sleep 500
typeset -i retval=1
pgrep $RENAME_DIRS >/dev/null 2>&1
retval=$?
if (( $retval == 0 )); then
        pkill -9 $RENAME_DIRS >/dev/null 2>&1
fi

log_pass "ZFS handle race directory rename operation as expected." 

However, RENAME_DIRS is never defined.

$ (cd $(git root)/usr/src/test/zfs-tests && git ls-files | xargs grep RENAME_DIRS)
tests/functional/rename_dirs/rename_dirs_001_pos.ksh:$RENAME_DIRS &
tests/functional/rename_dirs/rename_dirs_001_pos.ksh:pgrep $RENAME_DIRS >/dev/null 2>&1
tests/functional/rename_dirs/rename_dirs_001_pos.ksh:   pkill -9 $RENAME_DIRS >/dev/null 2>&1

So, this test backgrounds nothing, sleeps 500 seconds, then declares success.

History

#1

Updated by Mike Gerdts over 1 year ago

illumos lacks any history of what RENAME_DIRS used to be.

$ git log -p $(git root)/usr/src/test/zfs-tests | grep RENAME_DIRS
 $RENAME_DIRS &
-$PGREP $RENAME_DIRS >/dev/null 2>&1
+pgrep $RENAME_DIRS >/dev/null 2>&1
-    $PKILL -9 $RENAME_DIRS >/dev/null 2>&1
+    pkill -9 $RENAME_DIRS >/dev/null 2>&1
+$RENAME_DIRS &
+$PGREP $RENAME_DIRS >/dev/null 2>&1
+    $PKILL -9 $RENAME_DIRS >/dev/null 2>&1

Since this is the only test in tests/functional/rename_dirs, the entire directory could be whacked without losing coverage.

#2

Updated by Mike Gerdts over 1 year ago

  • Assignee set to Mike Gerdts
  • Difficulty changed from Medium to Bite-size
#3

Updated by John Kennedy over 1 year ago

$RENAME_DIRS should have been changed to "rename_dir" in 7290.

#4

Updated by Mike Gerdts over 1 year ago

  • Subject changed from zfstest rename_dirs_001_pos is pointless and always passes 500 sec later to zfstest rename_dirs_001_pos RENAME_DIRS is undefined
  • Assignee deleted (Mike Gerdts)

As John mentions, ripping this test out is the wrong approach.

Also available in: Atom PDF