Message ID | 20190506153836.232148-1-paullawrence@google.com |
---|---|
State | Accepted |
Delegated to: | Petr Vorel |
Headers | show |
Series | ANDROID: Fix ioctl03 test for Android | expand |
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?"); >
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
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.
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
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?");
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(+)