/* * Copyright (c) 2002, Intel Corporation. All rights reserved. * Created by: julie.n.fleischer REMOVE-THIS AT intel DOT com * This file is licensed under the GPL license. For the full content * of this license, see the COPYING file at the top level of this * source tree. * Test that clock_nanosleep() sets errno to EINVAL if rqtp contained a * nanosecond value < 0 or >= 1,000 million */ #include #include #include #include #include "posixtest.h" #define NUMINVALIDTESTS 9 static int invalid_tests[NUMINVALIDTESTS] = { INT32_MIN, INT32_MAX, 2147483647, -2147483647, -1073743192, 1073743192, -1, 1000000000, 1000000001 }; int main(int argc, char *argv[]) { struct timespec tssleep; int i; int failure = 0; tssleep.tv_sec=0; for (i=0; i