diff options
Diffstat (limited to 'net/net/t_raw.c')
-rw-r--r-- | net/net/t_raw.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/net/net/t_raw.c b/net/net/t_raw.c new file mode 100644 index 000000000000..ef3262dfa372 --- /dev/null +++ b/net/net/t_raw.c @@ -0,0 +1,41 @@ +/* $NetBSD: t_raw.c,v 1.1 2011/01/11 10:51:45 pooka Exp $ */ + +#include <sys/socket.h> +#include <sys/stat.h> + +#include <string.h> +#include <stdio.h> +#include <stdlib.h> + +#include <rump/rump.h> +#include <rump/rump_syscalls.h> + +#include <atf-c.h> + +#include "../../h_macros.h" + +ATF_TC(PRU_SENSE); +ATF_TC_HEAD(PRU_SENSE, tc) +{ + + atf_tc_set_md_var(tc, "descr", "Biglock leak with PRU_SENSE on " + "raw sockets (PR kern/44369)"); +} + +ATF_TC_BODY(PRU_SENSE, tc) +{ + struct stat sb; + int s; + + rump_init(); + RL(s = rump_sys_socket(PF_ROUTE, SOCK_RAW, 0)); + /* call PRU_SENSE. unfixed bug causes panic in rump_unschedule() */ + RL(rump_sys_fstat(s, &sb)); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, PRU_SENSE); + return atf_no_error(); +} |