Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150029971
D52914.1791507114.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D52914.1791507114.diff
View Options
Index: sys/aio/aio_test.c
===================================================================
--- sys/aio/aio_test.c
+++ sys/aio/aio_test.c
@@ -845,6 +845,7 @@
}
}
}
+ unlink(MDUNIT_LINK);
close(mdctl_fd);
}
@@ -1822,6 +1823,17 @@
seed = random();
buflen = 512 * (max_buf_aio + 1);
+
+ /*
+ * Limit buflen to MD device size to prevent short writes.
+ * The test's goal is to verify vectored AIO with iovcnt > max_buf_aio,
+ * not to test writes exceeding device capacity.
+ */
+ if (buflen > GLOBAL_MAX) {
+ buflen = GLOBAL_MAX;
+ max_buf_aio = (GLOBAL_MAX / 512) - 1;
+ }
+
buffer = malloc(buflen);
aio_fill_buffer(buffer, buflen, seed);
iov = calloc(max_buf_aio + 1, sizeof(struct iovec));
@@ -1846,7 +1858,9 @@
atf_tc_fail("aio failed: %s", strerror(errno));
if (len != buflen)
- atf_tc_fail("aio short write (%jd)", (intmax_t)len);
+ atf_tc_fail("aio short write: got %jd, expected: %jd "
+ "(max_buf_aio=%d, iovcnt=%zu)",
+ (intmax_t)len, (intmax_t)buflen, max_buf_aio, aio.aio_iovcnt);
bzero(&aio, sizeof(aio));
aio.aio_fildes = fd;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Oct 9, 12:51 AM (10 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30247504
Default Alt Text
D52914.1791507114.diff (1 KB)
Attached To
Mode
D52914: tests/sys/aio: Fix vectored_big_iovcnt flaky test failure
Attached
Detach File
Event Timeline
Log In to Comment