* [LTP] [PATCH v2] android: pty01: Fix pty01 test for Android.
@ 2017-08-29 0:26 Sandeep Patil
2017-08-29 9:08 ` Petr Vorel
0 siblings, 1 reply; 7+ messages in thread
From: Sandeep Patil @ 2017-08-29 0:26 UTC (permalink / raw)
To: ltp
The test fails because 'grantpt()' is a no-op in bionic and doesn't set
the /dev/pts/X mode to '020600' as expected by the test. The change
skips that check if __BIONIC__ is defined so the rest of the test(s)
can proceed and detect other failures if any.
Signed-off-by: Sandeep Patil <sspatil@google.com>
---
v1->v2
------
- Change the check from __ANDROID__ to __BIONIC__
testcases/kernel/pty/pty01.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/testcases/kernel/pty/pty01.c b/testcases/kernel/pty/pty01.c
index cbcc65c97..283612d55 100644
--- a/testcases/kernel/pty/pty01.c
+++ b/testcases/kernel/pty/pty01.c
@@ -99,9 +99,12 @@ static int test1(void)
tst_brkm(TBROK, NULL, "uid mismatch");
}
+ /* grantpt() is a no-op in bionic. */
+#ifndef __BIONIC__
if (st.st_mode != (S_IFCHR | S_IRUSR | S_IWUSR | S_IWGRP)) {
tst_brkm(TBROK, NULL, "mode mismatch (mode=%o)", st.st_mode);
}
+#endif
slavefd = open(slavename, O_RDWR);
if (slavefd >= 0) {
--
2.14.1.342.g6490525c54-goog
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [LTP] [PATCH v2] android: pty01: Fix pty01 test for Android.
2017-08-29 0:26 [LTP] [PATCH v2] android: pty01: Fix pty01 test for Android Sandeep Patil
@ 2017-08-29 9:08 ` Petr Vorel
2017-08-29 15:17 ` enh
0 siblings, 1 reply; 7+ messages in thread
From: Petr Vorel @ 2017-08-29 9:08 UTC (permalink / raw)
To: ltp
> The test fails because 'grantpt()' is a no-op in bionic and doesn't set
> the /dev/pts/X mode to '020600' as expected by the test. The change
> skips that check if __BIONIC__ is defined so the rest of the test(s)
> can proceed and detect other failures if any.
> Signed-off-by: Sandeep Patil <sspatil@google.com>
> ---
> v1->v2
> ------
> - Change the check from __ANDROID__ to __BIONIC__
> testcases/kernel/pty/pty01.c | 3 +++
> 1 file changed, 3 insertions(+)
> diff --git a/testcases/kernel/pty/pty01.c b/testcases/kernel/pty/pty01.c
> index cbcc65c97..283612d55 100644
> --- a/testcases/kernel/pty/pty01.c
> +++ b/testcases/kernel/pty/pty01.c
> @@ -99,9 +99,12 @@ static int test1(void)
> tst_brkm(TBROK, NULL, "uid mismatch");
> }
> + /* grantpt() is a no-op in bionic. */
> +#ifndef __BIONIC__
> if (st.st_mode != (S_IFCHR | S_IRUSR | S_IWUSR | S_IWGRP)) {
> tst_brkm(TBROK, NULL, "mode mismatch (mode=%o)", st.st_mode);
> }
> +#endif
> slavefd = open(slavename, O_RDWR);
> if (slavefd >= 0) {
LGTM (tested on Android API level 16).
I wonder, whether it's really better to use __BIONIC__ instead of __ANDROID__ (works with
both), but assume it is if it's really bionic specific.
Kind regards,
Petr
^ permalink raw reply [flat|nested] 7+ messages in thread
* [LTP] [PATCH v2] android: pty01: Fix pty01 test for Android.
2017-08-29 9:08 ` Petr Vorel
@ 2017-08-29 15:17 ` enh
2017-08-30 7:06 ` Petr Vorel
0 siblings, 1 reply; 7+ messages in thread
From: enh @ 2017-08-29 15:17 UTC (permalink / raw)
To: ltp
On Tue, Aug 29, 2017 at 2:08 AM, Petr Vorel <pvorel@suse.cz> wrote:
>> The test fails because 'grantpt()' is a no-op in bionic and doesn't set
>> the /dev/pts/X mode to '020600' as expected by the test. The change
>> skips that check if __BIONIC__ is defined so the rest of the test(s)
>> can proceed and detect other failures if any.
>
>> Signed-off-by: Sandeep Patil <sspatil@google.com>
>> ---
>> v1->v2
>> ------
>> - Change the check from __ANDROID__ to __BIONIC__
>
>> testcases/kernel/pty/pty01.c | 3 +++
>> 1 file changed, 3 insertions(+)
>
>> diff --git a/testcases/kernel/pty/pty01.c b/testcases/kernel/pty/pty01.c
>> index cbcc65c97..283612d55 100644
>> --- a/testcases/kernel/pty/pty01.c
>> +++ b/testcases/kernel/pty/pty01.c
>> @@ -99,9 +99,12 @@ static int test1(void)
>> tst_brkm(TBROK, NULL, "uid mismatch");
>> }
>
>> + /* grantpt() is a no-op in bionic. */
>> +#ifndef __BIONIC__
>> if (st.st_mode != (S_IFCHR | S_IRUSR | S_IWUSR | S_IWGRP)) {
>> tst_brkm(TBROK, NULL, "mode mismatch (mode=%o)", st.st_mode);
>> }
>> +#endif
>
>> slavefd = open(slavename, O_RDWR);
>> if (slavefd >= 0) {
>
> LGTM (tested on Android API level 16).
>
> I wonder, whether it's really better to use __BIONIC__ instead of __ANDROID__ (works with
> both), but assume it is if it's really bionic specific.
yeah, grantpt unconditionally does nothing in bionic, regardless of
whether you're running on an Android device or a desktop/server Linux
box.
> Kind regards,
> Petr
^ permalink raw reply [flat|nested] 7+ messages in thread
* [LTP] [PATCH v2] android: pty01: Fix pty01 test for Android.
2017-08-29 15:17 ` enh
@ 2017-08-30 7:06 ` Petr Vorel
2017-08-30 15:07 ` enh
0 siblings, 1 reply; 7+ messages in thread
From: Petr Vorel @ 2017-08-30 7:06 UTC (permalink / raw)
To: ltp
Hi,
> > I wonder, whether it's really better to use __BIONIC__ instead of __ANDROID__ (works with
> > both), but assume it is if it's really bionic specific.
> yeah, grantpt unconditionally does nothing in bionic, regardless of
> whether you're running on an Android device or a desktop/server Linux
> box.
OT: I didn't think there would be any use of bionic apart from Android (e.g. Linux /BSD
distro using it), but there is one project (not very active now):
https://github.com/gentoobionic/bionic
Kind regards,
Petr
^ permalink raw reply [flat|nested] 7+ messages in thread
* [LTP] [PATCH v2] android: pty01: Fix pty01 test for Android.
2017-08-30 7:06 ` Petr Vorel
@ 2017-08-30 15:07 ` enh
0 siblings, 0 replies; 7+ messages in thread
From: enh @ 2017-08-30 15:07 UTC (permalink / raw)
To: ltp
On Wed, Aug 30, 2017 at 12:06 AM, Petr Vorel <pvorel@suse.cz> wrote:
> Hi,
>
>> > I wonder, whether it's really better to use __BIONIC__ instead of __ANDROID__ (works with
>> > both), but assume it is if it's really bionic specific.
>
>> yeah, grantpt unconditionally does nothing in bionic, regardless of
>> whether you're running on an Android device or a desktop/server Linux
>> box.
> OT: I didn't think there would be any use of bionic apart from Android (e.g. Linux /BSD
> distro using it), but there is one project (not very active now):
> https://github.com/gentoobionic/bionic
we're moving towards it internally for more hermetic builds, which is
why we've been running in to a lot of these lately. historically
almost no-one ever made a distinction, and almost always chose
__ANDROID__ for some reason. (even though __linux__ and __BIONIC__ are
usually the more accurate choices.)
> Kind regards,
> Petr
^ permalink raw reply [flat|nested] 7+ messages in thread
* [LTP] [PATCH v2] android: pty01: Fix pty01 test for Android.
2017-08-29 0:21 Sandeep Patil
@ 2017-08-29 0:24 ` Sandeep Patil
0 siblings, 0 replies; 7+ messages in thread
From: Sandeep Patil @ 2017-08-29 0:24 UTC (permalink / raw)
To: ltp
(I have no idea why this didn't go out as a -v2, apologies, please
disregard)
- ssp
On Mon, Aug 28, 2017 at 5:21 PM, Sandeep Patil <sspatil@google.com> wrote:
> The test fails because 'grantpt()' is a no-op in bionic and doesn't set
> the /dev/pts/X mode to '020600' as expected by the test. The change
> skips that check if __BIONIC__ is defined so the rest of the test(s)
> can proceed and detect other failures if any.
>
> Signed-off-by: Sandeep Patil <sspatil@google.com>
> ---
> testcases/kernel/pty/pty01.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/testcases/kernel/pty/pty01.c b/testcases/kernel/pty/pty01.c
> index cbcc65c97..283612d55 100644
> --- a/testcases/kernel/pty/pty01.c
> +++ b/testcases/kernel/pty/pty01.c
> @@ -99,9 +99,12 @@ static int test1(void)
> tst_brkm(TBROK, NULL, "uid mismatch");
> }
>
> + /* grantpt() is a no-op in bionic. */
> +#ifndef __BIONIC__
> if (st.st_mode != (S_IFCHR | S_IRUSR | S_IWUSR | S_IWGRP)) {
> tst_brkm(TBROK, NULL, "mode mismatch (mode=%o)",
> st.st_mode);
> }
> +#endif
>
> slavefd = open(slavename, O_RDWR);
> if (slavefd >= 0) {
> --
> 2.14.1.342.g6490525c54-goog
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20170828/97cde888/attachment.html>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [LTP] [PATCH v2] android: pty01: Fix pty01 test for Android.
@ 2017-08-29 0:21 Sandeep Patil
2017-08-29 0:24 ` Sandeep Patil
0 siblings, 1 reply; 7+ messages in thread
From: Sandeep Patil @ 2017-08-29 0:21 UTC (permalink / raw)
To: ltp
The test fails because 'grantpt()' is a no-op in bionic and doesn't set
the /dev/pts/X mode to '020600' as expected by the test. The change
skips that check if __BIONIC__ is defined so the rest of the test(s)
can proceed and detect other failures if any.
Signed-off-by: Sandeep Patil <sspatil@google.com>
---
testcases/kernel/pty/pty01.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/testcases/kernel/pty/pty01.c b/testcases/kernel/pty/pty01.c
index cbcc65c97..283612d55 100644
--- a/testcases/kernel/pty/pty01.c
+++ b/testcases/kernel/pty/pty01.c
@@ -99,9 +99,12 @@ static int test1(void)
tst_brkm(TBROK, NULL, "uid mismatch");
}
+ /* grantpt() is a no-op in bionic. */
+#ifndef __BIONIC__
if (st.st_mode != (S_IFCHR | S_IRUSR | S_IWUSR | S_IWGRP)) {
tst_brkm(TBROK, NULL, "mode mismatch (mode=%o)", st.st_mode);
}
+#endif
slavefd = open(slavename, O_RDWR);
if (slavefd >= 0) {
--
2.14.1.342.g6490525c54-goog
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-08-30 15:07 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-29 0:26 [LTP] [PATCH v2] android: pty01: Fix pty01 test for Android Sandeep Patil
2017-08-29 9:08 ` Petr Vorel
2017-08-29 15:17 ` enh
2017-08-30 7:06 ` Petr Vorel
2017-08-30 15:07 ` enh
-- strict thread matches above, loose matches on Subject: below --
2017-08-29 0:21 Sandeep Patil
2017-08-29 0:24 ` Sandeep Patil
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.