Page MenuHomeFreeBSD

D57787.diff
No OneTemporary

D57787.diff

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

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)

Event Timeline