diff options
author | Dan Albert <danalbert@google.com> | 2014-09-03 18:37:11 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-09-03 18:37:11 +0000 |
commit | 28f1770101d84153e100ad7bc0628b4ef3b6e85c (patch) | |
tree | 9d7ec530c4e87ec9b1e2be32c55f3d3caf696d56 | |
parent | 3b10ba6f1b743ddced32474891ff6d1cb83c027a (diff) | |
parent | 69fb9f3f408b7d7f85522e3848a8ab5b87d6e377 (diff) | |
download | bionic-28f1770101d84153e100ad7bc0628b4ef3b6e85c.tar.gz |
Merge "Don't fail a test just because we aren't root."
-rw-r--r-- | tests/dlext_test.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/dlext_test.cpp b/tests/dlext_test.cpp index 9a96b67d0..7bd59c84c 100644 --- 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); |