aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/sys/aio/aio_test.c12
-rw-r--r--tests/sys/fs/tarfs/tarfs_test.sh6
-rw-r--r--tests/sys/netinet/so_reuseport_lb_test.c5
3 files changed, 15 insertions, 8 deletions
diff --git a/tests/sys/aio/aio_test.c b/tests/sys/aio/aio_test.c
index b9f8e7062203..def8a9d548d6 100644
--- a/tests/sys/aio/aio_test.c
+++ b/tests/sys/aio/aio_test.c
@@ -775,7 +775,7 @@ ATF_TC_BODY(pipe_waitcomplete, tc)
aio_pipe_test(waitcomplete, NULL);
}
-#define MD_LEN GLOBAL_MAX
+#define DEVICE_IO_LEN GLOBAL_MAX
#define MDUNIT_LINK "mdunit_link"
static int
@@ -794,7 +794,7 @@ aio_md_setup(void)
mdio.md_version = MDIOVERSION;
mdio.md_type = MD_MALLOC;
mdio.md_options = MD_AUTOUNIT | MD_COMPRESS;
- mdio.md_mediasize = GLOBAL_MAX;
+ mdio.md_mediasize = 1024 * 1024; /* 1 MB, enough for max_buf_aio up to 2047 */
mdio.md_sectorsize = 512;
strlcpy(buf, __func__, sizeof(buf));
mdio.md_label = buf;
@@ -856,7 +856,7 @@ aio_md_test(completion comp, struct sigevent *sev, bool vectored)
int fd;
fd = aio_md_setup();
- aio_context_init(&ac, fd, fd, MD_LEN);
+ aio_context_init(&ac, fd, fd, DEVICE_IO_LEN);
if (vectored) {
aio_writev_test(&ac, comp, sev);
aio_readv_test(&ac, comp, sev);
@@ -1846,7 +1846,9 @@ ATF_TC_BODY(vectored_big_iovcnt, tc)
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;
@@ -1995,7 +1997,7 @@ aio_zvol_test(completion comp, struct sigevent *sev, bool vectored,
int fd;
fd = aio_zvol_setup(unique);
- aio_context_init(&ac, fd, fd, MD_LEN);
+ aio_context_init(&ac, fd, fd, DEVICE_IO_LEN);
if (vectored) {
aio_writev_test(&ac, comp, sev);
aio_readv_test(&ac, comp, sev);
diff --git a/tests/sys/fs/tarfs/tarfs_test.sh b/tests/sys/fs/tarfs/tarfs_test.sh
index 20baadfea5c5..d4de71271985 100644
--- a/tests/sys/fs/tarfs/tarfs_test.sh
+++ b/tests/sys/fs/tarfs/tarfs_test.sh
@@ -67,9 +67,9 @@ tarfs_basic_body() {
mktar "${tarball}"
atf_check mount -rt tarfs "${tarball}" "${mnt}"
atf_check -o match:"^${tarball} on ${mnt} \(tarfs," mount
- atf_check_equal "$(stat -f%d,%i "${mnt}"/sparse_file)" "$(stat -f%d,%i "${mnt}"/hard_link)"
- atf_check_equal "$(stat -f%d,%i "${mnt}"/sparse_file)" "$(stat -L -f%d,%i "${mnt}"/short_link)"
- atf_check_equal "$(stat -f%d,%i "${mnt}"/sparse_file)" "$(stat -L -f%d,%i "${mnt}"/long_link)"
+ atf_check test "${mnt}"/sparse_file -ef "${mnt}"/hard_link
+ atf_check test "${mnt}"/sparse_file -ef "${mnt}"/short_link
+ atf_check test "${mnt}"/sparse_file -ef "${mnt}"/long_link
atf_check -o inline:"${sum}\n" sha256 -q "${mnt}"/sparse_file
atf_check -o inline:"2,40755\n" stat -f%l,%p "${mnt}"/directory
atf_check -o inline:"1,100644\n" stat -f%l,%p "${mnt}"/file
diff --git a/tests/sys/netinet/so_reuseport_lb_test.c b/tests/sys/netinet/so_reuseport_lb_test.c
index fa9d6e425884..0479bd070ca6 100644
--- a/tests/sys/netinet/so_reuseport_lb_test.c
+++ b/tests/sys/netinet/so_reuseport_lb_test.c
@@ -375,6 +375,11 @@ ATF_TC_BODY(concurrent_add, tc)
usleep(20000);
}
+
+ for (size_t j = nitems(threads); j > 0; j--) {
+ ATF_REQUIRE(pthread_cancel(threads[j - 1]) == 0);
+ ATF_REQUIRE(pthread_join(threads[j - 1], NULL) == 0);
+ }
}
/*