Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107108397
D44744.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D44744.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D44744: zfsd: fix unit tests after 89f4f91dbfdcabe65bc7476bc5f13dfb837870fe
Attached
Detach File
Event Timeline
Log In to Comment