1*49cdfc7eSAndroid Build Coastguard Worker // SPDX-License-Identifier: GPL-2.0-only 2*49cdfc7eSAndroid Build Coastguard Worker /* 3*49cdfc7eSAndroid Build Coastguard Worker * Copyright (c) Wipro Technologies Ltd, 2002. All Rights Reserved. 4*49cdfc7eSAndroid Build Coastguard Worker */ 5*49cdfc7eSAndroid Build Coastguard Worker 6*49cdfc7eSAndroid Build Coastguard Worker /*\ 7*49cdfc7eSAndroid Build Coastguard Worker * [Description] 8*49cdfc7eSAndroid Build Coastguard Worker * 9*49cdfc7eSAndroid Build Coastguard Worker * This test is run for option 1 for sysfs(2). 10*49cdfc7eSAndroid Build Coastguard Worker * Translate the filesystem identifier string fsname into a filesystem type index. 11*49cdfc7eSAndroid Build Coastguard Worker */ 12*49cdfc7eSAndroid Build Coastguard Worker 13*49cdfc7eSAndroid Build Coastguard Worker #include <errno.h> 14*49cdfc7eSAndroid Build Coastguard Worker #include <unistd.h> 15*49cdfc7eSAndroid Build Coastguard Worker #include <sys/syscall.h> 16*49cdfc7eSAndroid Build Coastguard Worker #include "tst_test.h" 17*49cdfc7eSAndroid Build Coastguard Worker #include "lapi/syscalls.h" 18*49cdfc7eSAndroid Build Coastguard Worker verify_sysfs01(void)19*49cdfc7eSAndroid Build Coastguard Workerstatic void verify_sysfs01(void) 20*49cdfc7eSAndroid Build Coastguard Worker { 21*49cdfc7eSAndroid Build Coastguard Worker /* option 1, buf holds fs name */ 22*49cdfc7eSAndroid Build Coastguard Worker TST_EXP_POSITIVE(tst_syscall(__NR_sysfs, 1, "proc"), "sysfs(1, 'proc')"); 23*49cdfc7eSAndroid Build Coastguard Worker } 24*49cdfc7eSAndroid Build Coastguard Worker 25*49cdfc7eSAndroid Build Coastguard Worker static struct tst_test test = { 26*49cdfc7eSAndroid Build Coastguard Worker .test_all = verify_sysfs01, 27*49cdfc7eSAndroid Build Coastguard Worker }; 28