26c26
< * $FreeBSD: head/tools/regression/netipx/ipxsocket/ipxsocket.c 157139 2006-03-26 01:58:39Z rwatson $
---
> * $FreeBSD: head/tools/regression/netipx/ipxsocket/ipxsocket.c 157146 2006-03-26 15:49:35Z rwatson $
31c31,33
< * PF_IPX sockets.
---
> * PF_IPX sockets. Run with various waits in order to make sure that the
> * various IPX/SPX timers have a chance to walk the pcb lists and hit the
> * sockets.
41a44,52
> static int
> maybe_sleep(int sec)
> {
>
> if (sec == 0)
> return (0);
> return (sleep(sec));
> }
>
45c56
< int s;
---
> int delay, s;
47,51c58,65
< s = socket(PF_IPX, SOCK_DGRAM, 0);
< if (s < 0)
< warn("socket(PF_IPX, SOCK_DGRAM, 0)");
< else
< close(s);
---
> for (delay = 0; delay < 5; delay++) {
> s = socket(PF_IPX, SOCK_DGRAM, 0);
> if (s < 0)
> warn("socket(PF_IPX, SOCK_DGRAM, 0)");
> else {
> maybe_sleep(delay);
> close(s);
> }
53,57c67,73
< s = socket(PF_IPX, SOCK_STREAM, 0);
< if (s < 0)
< warn("socket(PF_IPX, SOCK_STREAM, 0)");
< else
< close(s);
---
> s = socket(PF_IPX, SOCK_STREAM, 0);
> if (s < 0)
> warn("socket(PF_IPX, SOCK_STREAM, 0)");
> else {
> maybe_sleep(delay);
> close(s);
> }
59,63c75,81
< s = socket(PF_IPX, SOCK_SEQPACKET, 0);
< if (s < 0)
< warn("socket(PF_IPX, SOCK_SEQPACKET, 0)");
< else
< close(s);
---
> s = socket(PF_IPX, SOCK_SEQPACKET, 0);
> if (s < 0)
> warn("socket(PF_IPX, SOCK_SEQPACKET, 0)");
> else {
> maybe_sleep(delay);
> close(s);
> }
65,69c83,90
< s = socket(PF_IPX, SOCK_RAW, 0);
< if (s < 0)
< warn("socket(PF_IPX, SOCK_RAW, 0)");
< else
< close(s);
---
> s = socket(PF_IPX, SOCK_RAW, 0);
> if (s < 0)
> warn("socket(PF_IPX, SOCK_RAW, 0)");
> else {
> maybe_sleep(delay);
> close(s);
> }
> }
< * $FreeBSD: head/tools/regression/netipx/ipxsocket/ipxsocket.c 157139 2006-03-26 01:58:39Z rwatson $
---
> * $FreeBSD: head/tools/regression/netipx/ipxsocket/ipxsocket.c 157146 2006-03-26 15:49:35Z rwatson $
31c31,33
< * PF_IPX sockets.
---
> * PF_IPX sockets. Run with various waits in order to make sure that the
> * various IPX/SPX timers have a chance to walk the pcb lists and hit the
> * sockets.
41a44,52
> static int
> maybe_sleep(int sec)
> {
>
> if (sec == 0)
> return (0);
> return (sleep(sec));
> }
>
45c56
< int s;
---
> int delay, s;
47,51c58,65
< s = socket(PF_IPX, SOCK_DGRAM, 0);
< if (s < 0)
< warn("socket(PF_IPX, SOCK_DGRAM, 0)");
< else
< close(s);
---
> for (delay = 0; delay < 5; delay++) {
> s = socket(PF_IPX, SOCK_DGRAM, 0);
> if (s < 0)
> warn("socket(PF_IPX, SOCK_DGRAM, 0)");
> else {
> maybe_sleep(delay);
> close(s);
> }
53,57c67,73
< s = socket(PF_IPX, SOCK_STREAM, 0);
< if (s < 0)
< warn("socket(PF_IPX, SOCK_STREAM, 0)");
< else
< close(s);
---
> s = socket(PF_IPX, SOCK_STREAM, 0);
> if (s < 0)
> warn("socket(PF_IPX, SOCK_STREAM, 0)");
> else {
> maybe_sleep(delay);
> close(s);
> }
59,63c75,81
< s = socket(PF_IPX, SOCK_SEQPACKET, 0);
< if (s < 0)
< warn("socket(PF_IPX, SOCK_SEQPACKET, 0)");
< else
< close(s);
---
> s = socket(PF_IPX, SOCK_SEQPACKET, 0);
> if (s < 0)
> warn("socket(PF_IPX, SOCK_SEQPACKET, 0)");
> else {
> maybe_sleep(delay);
> close(s);
> }
65,69c83,90
< s = socket(PF_IPX, SOCK_RAW, 0);
< if (s < 0)
< warn("socket(PF_IPX, SOCK_RAW, 0)");
< else
< close(s);
---
> s = socket(PF_IPX, SOCK_RAW, 0);
> if (s < 0)
> warn("socket(PF_IPX, SOCK_RAW, 0)");
> else {
> maybe_sleep(delay);
> close(s);
> }
> }