Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Feb 2018 00:23:13 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r329293 - projects/zfsd/head/tests/sys/cddl/zfs/tests/zvol/zvol_ENOSPC
Message-ID:  <201802150023.w1F0NDAs027780@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: asomers
Date: Thu Feb 15 00:23:13 2018
New Revision: 329293
URL: https://svnweb.freebsd.org/changeset/base/329293

Log:
  Fix a cleanup timeout in zvol_ENOSPC_001_pos
  
  Kyua has a hardcoded 60s timeout in the cleanup phase, and unmounting a full
  UFS filesystem is apparently a slow prospect.  Move the unmount into the test's
  body.
  
  Sponsored by:	Spectra Logic Corp

Modified:
  projects/zfsd/head/tests/sys/cddl/zfs/tests/zvol/zvol_ENOSPC/cleanup.ksh
  projects/zfsd/head/tests/sys/cddl/zfs/tests/zvol/zvol_ENOSPC/zvol_ENOSPC_001_pos.ksh

Modified: projects/zfsd/head/tests/sys/cddl/zfs/tests/zvol/zvol_ENOSPC/cleanup.ksh
==============================================================================
--- projects/zfsd/head/tests/sys/cddl/zfs/tests/zvol/zvol_ENOSPC/cleanup.ksh	Thu Feb 15 00:21:53 2018	(r329292)
+++ projects/zfsd/head/tests/sys/cddl/zfs/tests/zvol/zvol_ENOSPC/cleanup.ksh	Thu Feb 15 00:23:13 2018	(r329293)
@@ -32,11 +32,6 @@
 
 verify_runnable "global"
 
-ismounted $TESTDIR ufs
-(( $? == 0 )) && log_must $UMOUNT -f $TESTDIR
-
-[[ -e $TESTDIR ]] && $RM -rf $TESTDIR
-
 default_zvol_cleanup
 
 log_pass

Modified: projects/zfsd/head/tests/sys/cddl/zfs/tests/zvol/zvol_ENOSPC/zvol_ENOSPC_001_pos.ksh
==============================================================================
--- projects/zfsd/head/tests/sys/cddl/zfs/tests/zvol/zvol_ENOSPC/zvol_ENOSPC_001_pos.ksh	Thu Feb 15 00:21:53 2018	(r329292)
+++ projects/zfsd/head/tests/sys/cddl/zfs/tests/zvol/zvol_ENOSPC/zvol_ENOSPC_001_pos.ksh	Thu Feb 15 00:23:13 2018	(r329293)
@@ -60,7 +60,11 @@ verify_runnable "global"
 
 function cleanup
 {
-	$RM -rf $TESTDIR/*
+	# unmounting the UFS filesystem can take more than 60s, and Kyua has a
+	# hardcoded 60s limit for the cleanup phase.  So we must unmount the
+	# filesystem here rather than cleanup.ksh.
+	ismounted $TESTDIR ufs && log_must $UMOUNT -f $TESTDIR
+	$RMDIR $TESTDIR
 }
 
 log_assert "A zvol volume will return ENOSPC when the underlying pool " \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802150023.w1F0NDAs027780>