1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* 3 * Copyright (c) International Business Machines Corp., 2001 4 * 07/2001 Ported by Wayne Boyer 5 */ 6 7 /*\ 8 * [Description] 9 * 10 * Call close(-1) and expects it to return EBADF. 11 */ 12 13 #include <stdio.h> 14 #include <errno.h> 15 #include <sys/stat.h> 16 #include "tst_test.h" 17 run(void)18static void run(void) 19 { 20 TST_EXP_FAIL(close(-1), EBADF); 21 } 22 23 static struct tst_test test = { 24 .test_all = run, 25 }; 26