summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDmitriy Ivanov <dimitry@google.com>2015-06-30 15:10:51 -0700
committerDmitriy Ivanov <dimitry@google.com>2015-06-30 18:45:59 -0700
commitf643eb38c36eb63f612e20dea09fd43ac6a6b360 (patch)
treeb3ecf22ae61f55e3cd37bb04f65d16af2bb16e44 /tests
parent754f669076ec1edfc0d597aaf89600d4c93f9a7c (diff)
downloadbionic-f643eb38c36eb63f612e20dea09fd43ac6a6b360.zip
bionic-f643eb38c36eb63f612e20dea09fd43ac6a6b360.tar.gz
bionic-f643eb38c36eb63f612e20dea09fd43ac6a6b360.tar.bz2
Improve personality initialization
1. Personality parameter should be unsigned int (not long) 2. Do not reset bits outside of PER_MASK when setting personality value. 3. Set personality for static executables. Bug: http://b/21900686 Change-Id: I4c7e34079cbd59b818ce221eed325c05b9bb2303
Diffstat (limited to 'tests')
-rw-r--r--tests/sys_personality_test.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/sys_personality_test.cpp b/tests/sys_personality_test.cpp
index 55a023d..2dfaa65 100644
--- a/tests/sys_personality_test.cpp
+++ b/tests/sys_personality_test.cpp
@@ -19,7 +19,7 @@
#include <sys/personality.h>
TEST(sys_personality, current_persona) {
- int persona = personality(0xffffffff);
+ int persona = personality(0xffffffff) & PER_MASK;
#if defined(__BIONIC__)
#if defined(__LP64__)
ASSERT_EQ(PER_LINUX, persona);