OSDN Git Service
(root)
/
android-x86
/
bionic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3b10ba6
)
Don't fail a test just because we aren't root.
author
Dan Albert
<danalbert@google.com>
Wed, 3 Sep 2014 18:30:21 +0000
(11:30 -0700)
committer
Dan Albert
<danalbert@google.com>
Wed, 3 Sep 2014 18:30:21 +0000
(11:30 -0700)
If the tests are not being run as root, emit a message and don't
continue with the test.
Change-Id: I352e1a4162caaeb18b81b8daf44797009756dcd9
tests/dlext_test.cpp
patch
|
blob
|
history
diff --git
a/tests/dlext_test.cpp
b/tests/dlext_test.cpp
index
9a96b67
..
7bd59c8
100644
(file)
--- a/
tests/dlext_test.cpp
+++ b/
tests/dlext_test.cpp
@@
-260,6
+260,11
@@
TEST_F(DlExtRelroSharingTest, RelroFileEmpty) {
}
TEST_F(DlExtRelroSharingTest, VerifyMemorySaving) {
+ if (geteuid() != 0) {
+ GTEST_LOG_(INFO) << "This test must be run as root.\n";
+ return;
+ }
+
ASSERT_NO_FATAL_FAILURE(CreateRelroFile(LIBNAME));
int relro_fd = open(relro_file_, O_RDONLY);
ASSERT_NOERROR(relro_fd);