testcase: kernel: ioctl: Handle ENOENT error
PATCH 1/1 testcase: kernel: ioctl: Handle ENOENT error
In case the folder /dev/net is not available, the error returned is ENOENT and not ENODEV.
Handle this case to return a TCONF instead of a TFAIL.
Signed-off-by Mylène Josserand <[email protected]>
--- testcases/kernel/syscalls/ioctl/ioctl03.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/syscalls/ioctl/ioctl03.c +1 -1
@@ -80,7 +80,7 @@ static void verify_features(void)int netfd =open ("/dev/net/tun" ,O_RDWR );if (netfd ==-1 ) { -if (errno ==ENODEV ) +if (errno ==ENODEV || errno ==ENOENT )tst_brk (TCONF ,"TUN support is missing?" );tst_brk (TBROK |TERRNO ,"opening /dev/net/tun failed" );
Signature · 1 line
2.11.0
PATCH 1/1 testcase: kernel: ioctl: Handle ENOENT error
Hi!
Quoted 3 lines
In case the folder
/dev/netis not available, the error returned is ENOENT and not ENODEV.
Handle this case to return a TCONF instead of a TFAIL.
Pushed, thanks.
Signature · 2 lines
Cyril Hrubis [email protected]