Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162638569
D57787.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
D57787.diff
View Options
diff --git a/tests/sys/fs/fusefs/destroy.cc b/tests/sys/fs/fusefs/destroy.cc
--- a/tests/sys/fs/fusefs/destroy.cc
+++ b/tests/sys/fs/fusefs/destroy.cc
@@ -61,7 +61,21 @@
struct statfs statbuf;
for (int retry = 100; retry > 0; retry--) {
- ASSERT_EQ(0, statfs("mountpoint", &statbuf)) << strerror(errno);
+ if (0 != statfs("mountpoint", &statbuf)) {
+ switch (errno) {
+ case ENOENT:
+ case EBADF:
+ /*
+ * statfs will sometimes transiently return
+ * these errors while an unmount is in
+ * progress. Retry.
+ */
+ nap();
+ continue;
+ default:
+ FAIL() << "statfs:" << strerror(errno);
+ }
+ }
if (strcmp("fusefs", statbuf.f_fstypename) != 0 &&
strcmp("/dev/fuse", statbuf.f_mntfromname) != 0)
return;
diff --git a/tests/sys/fs/fusefs/mockfs.cc b/tests/sys/fs/fusefs/mockfs.cc
--- a/tests/sys/fs/fusefs/mockfs.cc
+++ b/tests/sys/fs/fusefs/mockfs.cc
@@ -1071,6 +1071,8 @@
if (out.expected_errno) {
ASSERT_EQ(-1, r);
ASSERT_EQ(out.expected_errno, errno) << strerror(errno);
+ } else if (m_quit && errno == EBADF) {
+ /* Daemon is in the process of shutting down */
} else {
if (r <= 0 && errno == EINVAL) {
printf("Failed to write response. unique=%" PRIu64
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 16, 7:27 AM (18 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35129381
Default Alt Text
D57787.diff (1 KB)
Attached To
Mode
D57787: fusefs: fix two intermittency bugs in the destroy tests
Attached
Detach File
Event Timeline
Log In to Comment