From: Sandeep Patil <sspatil@google.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] android: access02: fix the executable shell path
Date: Mon, 28 Aug 2017 15:31:00 -0700 [thread overview]
Message-ID: <20170828223100.66766-1-sspatil@google.com> (raw)
The test generated script used the hardcoded "/bin/sh" shell path
that doesn't exist on Android system. So fix that by using
"_PATH_BSHELL" variable defined in paths.h for both bionic and glibc.
Signed-off-by: Sandeep Patil <sspatil@google.com>
---
FWIW, I tested this both with an Android system as well as on an x86, ubuntu
system to make sure this works with glibc as well as bionic.
testcases/kernel/syscalls/access/access02.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/testcases/kernel/syscalls/access/access02.c b/testcases/kernel/syscalls/access/access02.c
index 0154b83a4..78449ca0b 100644
--- a/testcases/kernel/syscalls/access/access02.c
+++ b/testcases/kernel/syscalls/access/access02.c
@@ -38,6 +38,7 @@
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
+#include <paths.h>
#include "tst_test.h"
#define FNAME_F "file_f"
@@ -187,7 +188,7 @@ static void setup(void)
SAFE_TOUCH(FNAME_R, 0444, NULL);
SAFE_TOUCH(FNAME_W, 0222, NULL);
SAFE_TOUCH(FNAME_X, 0555, NULL);
- SAFE_FILE_PRINTF(FNAME_X, "#!/bin/sh\n");
+ SAFE_FILE_PRINTF(FNAME_X, "#!%s\n", _PATH_BSHELL);
SAFE_SYMLINK(FNAME_F, SNAME_F);
SAFE_SYMLINK(FNAME_R, SNAME_R);
--
2.14.1.342.g6490525c54-goog
next reply other threads:[~2017-08-28 22:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-28 22:31 Sandeep Patil [this message]
2017-08-29 12:08 ` [LTP] [PATCH] android: access02: fix the executable shell path Cyril Hrubis
2017-08-29 15:04 ` Petr Vorel
2017-08-29 15:09 ` Petr Vorel
2017-09-05 21:49 ` 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=20170828223100.66766-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