public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] testcase: kernel: ioctl: Handle ENOENT error
@ 2018-05-29 15:53 =?unknown-8bit?q?Myl=C3=A8ne?= Josserand
  2018-06-05 11:02 ` Cyril Hrubis
  0 siblings, 1 reply; 2+ messages in thread
From: =?unknown-8bit?q?Myl=C3=A8ne?= Josserand @ 2018-05-29 15:53 UTC (permalink / raw)
  To: ltp

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 <mylene.josserand@bootlin.com>
---
 testcases/kernel/syscalls/ioctl/ioctl03.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/syscalls/ioctl/ioctl03.c b/testcases/kernel/syscalls/ioctl/ioctl03.c
index 0ae3cb244..b1b50edb4 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl03.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl03.c
@@ -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");
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [LTP] [PATCH] testcase: kernel: ioctl: Handle ENOENT error
  2018-05-29 15:53 [LTP] [PATCH] testcase: kernel: ioctl: Handle ENOENT error =?unknown-8bit?q?Myl=C3=A8ne?= Josserand
@ 2018-06-05 11:02 ` Cyril Hrubis
  0 siblings, 0 replies; 2+ messages in thread
From: Cyril Hrubis @ 2018-06-05 11:02 UTC (permalink / raw)
  To: ltp

Hi!
> 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.

Pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-05 11:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-29 15:53 [LTP] [PATCH] testcase: kernel: ioctl: Handle ENOENT error =?unknown-8bit?q?Myl=C3=A8ne?= Josserand
2018-06-05 11:02 ` Cyril Hrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox