1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* 3 * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. 4 */ 5 /*\ 6 * [Description] 7 * 8 * This is a Phase I test for the times(2) system call. It is intended to 9 * provide a limited exposure of the system call. 10 */ 11 12 #include <sys/times.h> 13 #include <errno.h> 14 #include "tst_test.h" 15 verify_times(void)16static void verify_times(void) 17 { 18 struct tms mytimes; 19 20 TEST(times(&mytimes)); 21 22 if (TST_RET == -1) 23 tst_res(TFAIL | TTERRNO, "times failed"); 24 else 25 tst_res(TPASS, "times(&mytimes) returned %ld", TST_RET); 26 } 27 28 static struct tst_test test = { 29 .test_all = verify_times, 30 }; 31