pollts(2) is supposed to return -1 in particular and not a random
non-zero value in case of an error.
This commit is contained in:
parent
01de9909d6
commit
860f8e7937
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: t_pollts.c,v 1.3 2011/06/01 03:39:45 jruoho Exp $ */
|
/* $NetBSD: t_pollts.c,v 1.4 2011/06/01 19:32:50 tron Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2011 The NetBSD Foundation, Inc.
|
* Copyright (c) 2011 The NetBSD Foundation, Inc.
|
||||||
@ -131,13 +131,13 @@ ATF_TC_BODY(pollts_err, tc)
|
|||||||
timeout.tv_nsec = 0;
|
timeout.tv_nsec = 0;
|
||||||
|
|
||||||
errno = 0;
|
errno = 0;
|
||||||
ATF_REQUIRE_ERRNO(EFAULT, pollts((void *)-1, 1, &timeout, NULL) != 0);
|
ATF_REQUIRE_ERRNO(EFAULT, pollts((void *)-1, 1, &timeout, NULL) == -1);
|
||||||
|
|
||||||
timeout.tv_sec = -1;
|
timeout.tv_sec = -1;
|
||||||
timeout.tv_nsec = -1;
|
timeout.tv_nsec = -1;
|
||||||
|
|
||||||
errno = 0;
|
errno = 0;
|
||||||
ATF_REQUIRE_ERRNO(EINVAL, pollts(&pfd, 1, &timeout, NULL) != 0);
|
ATF_REQUIRE_ERRNO(EINVAL, pollts(&pfd, 1, &timeout, NULL) == -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
ATF_TC(pollts_sigmask);
|
ATF_TC(pollts_sigmask);
|
||||||
|
Loading…
Reference in New Issue
Block a user