/* * 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 nanosleep() sets errno to EINVAL if rqtp contained a * nanosecond value < 0 or >= 1,000 million */ #include #include #include #include "posixtest.h" #define NUMTESTS 7 int main(int argc, char *argv[]) { struct timespec tssleepfor, tsstorage; int sleepnsec[NUMTESTS] = {-1, -5, -1000000000, 1000000000, 1000000001, 2000000000, 2000000000 }; int i; int failure = 0; tssleepfor.tv_sec=0; for (i=0; i