<div dir="auto">(should be __BIONIC__ rather than __ANDROID__ since this will be true for host bionic too.)</div><div class="gmail_extra"><br><div class="gmail_quote">On Aug 28, 2017 11:26, "Sandeep Patil" <<a href="mailto:sspatil@google.com">sspatil@google.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The test fails because 'grantpt()' is a no-op in bionic and doesn't set<br>
the /dev/pts/X mode to '020600' as expected by the test. The change<br>
skips that check if __ANDROID__ is defined so the rest of the test(s)<br>
can proceed and detect other failures if any.<br>
<br>
Signed-off-by: Sandeep Patil <<a href="mailto:sspatil@google.com">sspatil@google.com</a>><br>
---<br>
testcases/kernel/pty/pty01.c | 3 +++<br>
1 file changed, 3 insertions(+)<br>
<br>
diff --git a/testcases/kernel/pty/pty01.c b/testcases/kernel/pty/pty01.c<br>
index cbcc65c97..9fdbf0841 100644<br>
--- a/testcases/kernel/pty/pty01.c<br>
+++ b/testcases/kernel/pty/pty01.c<br>
@@ -99,9 +99,12 @@ static int test1(void)<br>
tst_brkm(TBROK, NULL, "uid mismatch");<br>
}<br>
<br>
+ /* grantpt() is a no-op in bionic / Android. */<br>
+#ifndef __ANDROID__<br>
if (st.st_mode != (S_IFCHR | S_IRUSR | S_IWUSR | S_IWGRP)) {<br>
tst_brkm(TBROK, NULL, "mode mismatch (mode=%o)", st.st_mode);<br>
}<br>
+#endif<br>
<br>
slavefd = open(slavename, O_RDWR);<br>
if (slavefd >= 0) {<br>
--<br>
2.14.1.342.g6490525c54-goog<br>
<br>
</blockquote></div></div>