| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: t_fd.c,v 1.3 2011/08/15 15:19:08 gson Exp $ */ | | 1 | /* $NetBSD: t_fd.c,v 1.4 2011/08/25 18:46:01 hannken Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 2011 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 2011 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * Redistribution and use in source and binary forms, with or without | | 7 | * Redistribution and use in source and binary forms, with or without |
8 | * modification, are permitted provided that the following conditions | | 8 | * modification, are permitted provided that the following conditions |
9 | * are met: | | 9 | * are met: |
10 | * 1. Redistributions of source code must retain the above copyright | | 10 | * 1. Redistributions of source code must retain the above copyright |
11 | * notice, this list of conditions and the following disclaimer. | | 11 | * notice, this list of conditions and the following disclaimer. |
12 | * 2. Redistributions in binary form must reproduce the above copyright | | 12 | * 2. Redistributions in binary form must reproduce the above copyright |
13 | * notice, this list of conditions and the following disclaimer in the | | 13 | * notice, this list of conditions and the following disclaimer in the |
14 | * documentation and/or other materials provided with the distribution. | | 14 | * documentation and/or other materials provided with the distribution. |
| @@ -124,23 +124,23 @@ ATF_TC_BODY(sigio, tc) | | | @@ -124,23 +124,23 @@ ATF_TC_BODY(sigio, tc) |
124 | sin.sin_len = sizeof(sin); | | 124 | sin.sin_len = sizeof(sin); |
125 | sin.sin_family = AF_INET; | | 125 | sin.sin_family = AF_INET; |
126 | sin.sin_port = htons(12345); | | 126 | sin.sin_port = htons(12345); |
127 | RL(rump_sys_bind(ls, (struct sockaddr *)&sin, sizeof(sin))); | | 127 | RL(rump_sys_bind(ls, (struct sockaddr *)&sin, sizeof(sin))); |
128 | RL(rump_sys_listen(ls, 5)); | | 128 | RL(rump_sys_listen(ls, 5)); |
129 | | | 129 | |
130 | RL(cs = rump_sys_socket(PF_INET, SOCK_STREAM, 0)); | | 130 | RL(cs = rump_sys_socket(PF_INET, SOCK_STREAM, 0)); |
131 | sin.sin_addr.s_addr = inet_addr("127.0.0.1"); | | 131 | sin.sin_addr.s_addr = inet_addr("127.0.0.1"); |
132 | | | 132 | |
133 | ATF_REQUIRE_EQ(sigcnt, 0); | | 133 | ATF_REQUIRE_EQ(sigcnt, 0); |
134 | RL(rump_sys_connect(cs, (struct sockaddr *)&sin, sizeof(sin))); | | 134 | RL(rump_sys_connect(cs, (struct sockaddr *)&sin, sizeof(sin))); |
135 | sc = sigcnt; | | 135 | sc = sigcnt; |
136 | printf("sigcnt after connect: %d\n", sc); | | 136 | printf("sigcnt after connect: %d\n", sc); |
137 | ATF_REQUIRE_EQ(sc, 1); | | 137 | ATF_REQUIRE(sc >= 1); |
138 | } | | 138 | } |
139 | | | 139 | |
140 | ATF_TP_ADD_TCS(tp) | | 140 | ATF_TP_ADD_TCS(tp) |
141 | { | | 141 | { |
142 | ATF_TP_ADD_TC(tp, bigenough); | | 142 | ATF_TP_ADD_TC(tp, bigenough); |
143 | ATF_TP_ADD_TC(tp, sigio); | | 143 | ATF_TP_ADD_TC(tp, sigio); |
144 | | | 144 | |
145 | return atf_no_error(); | | 145 | return atf_no_error(); |
146 | } | | 146 | } |