1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Copyright (c) Wipro Technologies Ltd, 2002. All Rights Reserved. 4 */ 5 6/*\ 7 * [Description] 8 * 9 * This test case checks whether sysfs(2) system call returns 10 * appropriate error number for invalid option. 11 */ 12 13#include <errno.h> 14#include <sys/syscall.h> 15#include "tst_test.h" 16#include "lapi/syscalls.h" 17 18#define INVALID_OPTION 100 19 20static void verify_sysfs04(void) 21{ 22 TST_EXP_FAIL(tst_syscall(__NR_sysfs, INVALID_OPTION), 23 EINVAL, "sysfs(INVALID_OPTION)"); 24} 25 26static struct tst_test test = { 27 .test_all = verify_sysfs04, 28}; 29