* [LTP] [PATCH] ANDROID: Fix ioctl03 test for Android
@ 2019-05-06 15:38 Paul Lawrence
2019-05-06 18:06 ` Steve Muckle
0 siblings, 1 reply; 5+ messages in thread
From: Paul Lawrence @ 2019-05-06 15:38 UTC (permalink / raw)
To: ltp
Android has tun file at /dev/tun not /dev/net/tun
Signed-off-by: Paul Lawrence <paullawrence@google.com>
---
testcases/kernel/syscalls/ioctl/ioctl03.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/testcases/kernel/syscalls/ioctl/ioctl03.c b/testcases/kernel/syscalls/ioctl/ioctl03.c
index b1b50edb4..cc9a2edaf 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl03.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl03.c
@@ -79,6 +79,11 @@ static void verify_features(void)
unsigned int features, i;
int netfd = open("/dev/net/tun", O_RDWR);
+
+ /* Android has tun at /dev/tun */
+ if (netfd == -1 && (errno == ENODEV || errno == ENOENT))
+ netfd = open("/dev/tun", O_RDWR);
+
if (netfd == -1) {
if (errno == ENODEV || errno == ENOENT)
tst_brk(TCONF, "TUN support is missing?");
--
2.21.0.1020.gf2820cf01a-goog
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [LTP] [PATCH] ANDROID: Fix ioctl03 test for Android
2019-05-06 15:38 [LTP] [PATCH] ANDROID: Fix ioctl03 test for Android Paul Lawrence
@ 2019-05-06 18:06 ` Steve Muckle
2019-05-06 20:04 ` Petr Vorel
0 siblings, 1 reply; 5+ messages in thread
From: Steve Muckle @ 2019-05-06 18:06 UTC (permalink / raw)
To: ltp
Reviewed-by: Steve Muckle <smuckle@google.com>
On 5/6/19 8:38 AM, 'Paul Lawrence' via kernel-team wrote:
> Android has tun file at /dev/tun not /dev/net/tun
>
> Signed-off-by: Paul Lawrence <paullawrence@google.com>
> ---
> testcases/kernel/syscalls/ioctl/ioctl03.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/testcases/kernel/syscalls/ioctl/ioctl03.c b/testcases/kernel/syscalls/ioctl/ioctl03.c
> index b1b50edb4..cc9a2edaf 100644
> --- a/testcases/kernel/syscalls/ioctl/ioctl03.c
> +++ b/testcases/kernel/syscalls/ioctl/ioctl03.c
> @@ -79,6 +79,11 @@ static void verify_features(void)
> unsigned int features, i;
>
> int netfd = open("/dev/net/tun", O_RDWR);
> +
> + /* Android has tun at /dev/tun */
> + if (netfd == -1 && (errno == ENODEV || errno == ENOENT))
> + netfd = open("/dev/tun", O_RDWR);
> +
> if (netfd == -1) {
> if (errno == ENODEV || errno == ENOENT)
> tst_brk(TCONF, "TUN support is missing?");
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [LTP] [PATCH] ANDROID: Fix ioctl03 test for Android
2019-05-06 18:06 ` Steve Muckle
@ 2019-05-06 20:04 ` Petr Vorel
2019-05-13 9:39 ` Cyril Hrubis
0 siblings, 1 reply; 5+ messages in thread
From: Petr Vorel @ 2019-05-06 20:04 UTC (permalink / raw)
To: ltp
Hi,
> Reviewed-by: Steve Muckle <smuckle@google.com>
Acked-by: Petr Vorel <pvorel@suse.cz>
Thanks for your patch!
I guess this could be merged before release, but
leave the decision for Cyril.
Kind regards,
Petr
^ permalink raw reply [flat|nested] 5+ messages in thread
* [LTP] [PATCH] ANDROID: Fix ioctl03 test for Android
2019-05-06 20:04 ` Petr Vorel
@ 2019-05-13 9:39 ` Cyril Hrubis
2019-05-13 13:23 ` Petr Vorel
0 siblings, 1 reply; 5+ messages in thread
From: Cyril Hrubis @ 2019-05-13 9:39 UTC (permalink / raw)
To: ltp
Hi!
> > Reviewed-by: Steve Muckle <smuckle@google.com>
> Acked-by: Petr Vorel <pvorel@suse.cz>
> Thanks for your patch!
>
> I guess this could be merged before release, but
> leave the decision for Cyril.
This is pretty much safe ack from me as well, so please go ahead and
apply it.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 5+ messages in thread
* [LTP] [PATCH] ANDROID: Fix ioctl03 test for Android
2019-05-13 9:39 ` Cyril Hrubis
@ 2019-05-13 13:23 ` Petr Vorel
0 siblings, 0 replies; 5+ messages in thread
From: Petr Vorel @ 2019-05-13 13:23 UTC (permalink / raw)
To: ltp
Hi,
> > > Reviewed-by: Steve Muckle <smuckle@google.com>
> > Acked-by: Petr Vorel <pvorel@suse.cz>
> > Thanks for your patch!
> > I guess this could be merged before release, but
> > leave the decision for Cyril.
> This is pretty much safe ack from me as well, so please go ahead and
> apply it.
Thanks for info, pushed.
Kind regards,
Petr
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-05-13 13:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-06 15:38 [LTP] [PATCH] ANDROID: Fix ioctl03 test for Android Paul Lawrence
2019-05-06 18:06 ` Steve Muckle
2019-05-06 20:04 ` Petr Vorel
2019-05-13 9:39 ` Cyril Hrubis
2019-05-13 13:23 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox