From: Sandeep Patil <sspatil@google.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] android: pty01: Fix pty01 test for Android.
Date: Mon, 28 Aug 2017 11:26:10 -0700 [thread overview]
Message-ID: <20170828182610.49079-1-sspatil@google.com> (raw)
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 __ANDROID__ 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..9fdbf0841 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 / Android. */
+#ifndef __ANDROID__
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 reply other threads:[~2017-08-28 18:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-28 18:26 Sandeep Patil [this message]
2017-08-28 18:32 ` [LTP] [PATCH] android: pty01: Fix pty01 test for Android enh
2017-08-29 0:19 ` Sandeep Patil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170828182610.49079-1-sspatil@google.com \
--to=sspatil@google.com \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox