aboutsummaryrefslogtreecommitdiff
path: root/tools/regression
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2017-06-08 06:13:53 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2017-06-08 06:13:53 +0000
commit62b2dd31afcb0f978ddb4f05bba2343049842e74 (patch)
tree862c8659f6e180187a06c0b86b4927533a285802 /tools/regression
parentf7ff0c669eae49850f30a6b2b3c0b2fb2ed87bd1 (diff)
Notes
Diffstat (limited to 'tools/regression')
-rw-r--r--tools/regression/sockets/accf_data_attach/accf_data_attach.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/regression/sockets/accf_data_attach/accf_data_attach.c b/tools/regression/sockets/accf_data_attach/accf_data_attach.c
index 27f270ba1c46..ba84e9dc2bbf 100644
--- a/tools/regression/sockets/accf_data_attach/accf_data_attach.c
+++ b/tools/regression/sockets/accf_data_attach/accf_data_attach.c
@@ -233,6 +233,20 @@ main(void)
errx(-1, "not ok 11 - accept #2 %s", strerror(errno));
printf("ok 11 - accept\n");
+#if 1
+ /*
+ * XXXGL: this doesn't belong to the test itself, but is known
+ * to examine rarely examined paths in the kernel. Intentionally
+ * leave a socket on the incomplete queue, before the program
+ * exits.
+ */
+ so = socket(PF_INET, SOCK_STREAM, 0);
+ if (so == -1)
+ errx(-1, "not ok 12 - socket: %s", strerror(errno));
+ if (connect(so, (struct sockaddr *)&sin, sizeof(sin)) < 0)
+ errx(-1, "not ok 12 - connect %s", strerror(errno));
+#endif
+
/*
* Step 11: Remove accept filter. After removing the accept filter
* getsockopt() should fail with EINVAL.