Page MenuHomeFreeBSD

D44744.diff
No OneTemporary

D44744.diff

diff --git a/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc b/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc
--- a/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc
+++ b/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc
@@ -134,6 +134,7 @@
MOCK_CONST_METHOD0(PoolGUID, Guid());
MOCK_CONST_METHOD0(State, vdev_state());
MOCK_CONST_METHOD0(PhysicalPath, string());
+ MOCK_CONST_METHOD2(Name, string(zpool_handle_t * zhp, bool verbose));
};
MockVdev::MockVdev(nvlist_t *vdevConfig)
@@ -431,6 +432,8 @@
m_vdev = new MockVdev(m_vdevConfig);
ON_CALL(*m_vdev, GUID())
.WillByDefault(::testing::Return(Guid(123)));
+ ON_CALL(*m_vdev, Name(::testing::_, ::testing::_))
+ .WillByDefault(::testing::Return(string("/dev/da999")));
ON_CALL(*m_vdev, PoolGUID())
.WillByDefault(::testing::Return(Guid(456)));
ON_CALL(*m_vdev, State())
diff --git a/cddl/usr.sbin/zfsd/vdev.h b/cddl/usr.sbin/zfsd/vdev.h
--- a/cddl/usr.sbin/zfsd/vdev.h
+++ b/cddl/usr.sbin/zfsd/vdev.h
@@ -130,7 +130,7 @@
nvlist_t *Config() const;
Vdev Parent();
Vdev RootVdev();
- std::string Name(zpool_handle_t *, bool verbose) const;
+ virtual std::string Name(zpool_handle_t *, bool verbose) const;
bool IsSpare();
bool IsAvailableSpare() const;
bool IsActiveSpare() const;

File Metadata

Mime Type
text/plain
Expires
Sat, Jan 11, 5:55 AM (18 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15751056
Default Alt Text
D44744.diff (1 KB)

Event Timeline