svn commit: r305286 - in stable/11/cddl/usr.sbin/zfsd: . tests

Dimitry Andric dim at FreeBSD.org
Fri Sep 2 17:07:54 UTC 2016


Author: dim
Date: Fri Sep  2 17:07:52 2016
New Revision: 305286
URL: https://svnweb.freebsd.org/changeset/base/305286

Log:
  MFC r305013:
  
  Add an empty virtual destructor to zfsd's Vdev class.  This is needed
  because the class has virtual functions, and the compiler-generated
  default destructor is non-virtual.
  
  Reviewed by:	asomers
  
  MFC r305016:
  
  Fix the zfsd unittest:
  * TESTSDIR is supposed to be under cddl/usr.sbin, not cddl/sbin
  * DevdCtl::EventBuffer no longer exists, so remove its forward
    declaration

Modified:
  stable/11/cddl/usr.sbin/zfsd/tests/Makefile
  stable/11/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc
  stable/11/cddl/usr.sbin/zfsd/vdev.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/cddl/usr.sbin/zfsd/tests/Makefile
==============================================================================
--- stable/11/cddl/usr.sbin/zfsd/tests/Makefile	Fri Sep  2 10:13:51 2016	(r305285)
+++ stable/11/cddl/usr.sbin/zfsd/tests/Makefile	Fri Sep  2 17:07:52 2016	(r305286)
@@ -4,7 +4,7 @@ SRCDIR=${.CURDIR}/../../../..
 .include "${.CURDIR}/../Makefile.common"
 .PATH:	${.CURDIR}/..
 
-TESTSDIR?=	${TESTSBASE}/cddl/sbin/zfsd
+TESTSDIR?=	${TESTSBASE}/cddl/usr.sbin/zfsd
 
 PLAIN_TESTS_CXX=	zfsd_unittest
 SRCS.zfsd_unittest:=		${SRCS:Nzfsd_main.cc}

Modified: stable/11/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc
==============================================================================
--- stable/11/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc	Fri Sep  2 10:13:51 2016	(r305285)
+++ stable/11/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc	Fri Sep  2 17:07:52 2016	(r305286)
@@ -72,7 +72,6 @@ using std::string;
 using std::stringstream;
 
 using DevdCtl::Event;
-using DevdCtl::EventBuffer;
 using DevdCtl::EventFactory;
 using DevdCtl::EventList;
 using DevdCtl::Guid;

Modified: stable/11/cddl/usr.sbin/zfsd/vdev.h
==============================================================================
--- stable/11/cddl/usr.sbin/zfsd/vdev.h	Fri Sep  2 10:13:51 2016	(r305285)
+++ stable/11/cddl/usr.sbin/zfsd/vdev.h	Fri Sep  2 17:07:52 2016	(r305286)
@@ -108,6 +108,12 @@ public:
 	 * \brief No-op copy constructor for nonexistent vdevs.
 	 */
 	Vdev();
+
+	/**
+	 * \brief No-op virtual destructor, since this class has virtual
+	 *        functions.
+	 */
+	virtual ~Vdev();
 	bool			DoesNotExist()	const;
 
 	/**
@@ -145,6 +151,10 @@ private:
 extern Vdev NonexistentVdev;
 
 //- Vdev Inline Public Methods ------------------------------------------------
+inline Vdev::~Vdev()
+{
+}
+
 inline DevdCtl::Guid
 Vdev::PoolGUID() const
 {


More information about the svn-src-stable mailing list