projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tests: add check_skip_kernel_test to check root user and lttng kernel modules
[lttng-tools.git]
/
tests
/
regression
/
kernel
/
test_ns_contexts
diff --git
a/tests/regression/kernel/test_ns_contexts
b/tests/regression/kernel/test_ns_contexts
index 98b673c98e94c2f31b1ef3bd446fe9c370e4a2f5..1c71ea503e998f26f2519675bfb4e32c3ef986fb 100755
(executable)
--- a/
tests/regression/kernel/test_ns_contexts
+++ b/
tests/regression/kernel/test_ns_contexts
@@
-76,7
+76,7
@@
function test_ns()
ns_inode=$(stat -c '%i' -L "/proc/$$/ns/$ns")
ok $? "Get current $ns namespace inode: $ns_inode"
ns_inode=$(stat -c '%i' -L "/proc/$$/ns/$ns")
ok $? "Get current $ns namespace inode: $ns_inode"
- trace_path=$(mktemp -d -t
tmp.{FUNCNAME[0]}_trace_path.XXXXXX
)
+ trace_path=$(mktemp -d -t
"tmp.${FUNCNAME[0]}_trace_path.XXXXXX"
)
start_lttng_sessiond
start_lttng_sessiond
@@
-108,13
+108,7
@@
plan_tests $NUM_TESTS
print_test_banner "$TEST_DESC"
print_test_banner "$TEST_DESC"
-isroot=0
-if [ "$(id -u)" == "0" ]; then
- isroot=1
-fi
-
-skip $isroot "Root access is needed. Skipping all tests." "$NUM_TESTS" && exit 0
-
+check_skip_kernel_test "$NUM_TESTS" "Skipping all tests." && exit 0
system_has_ns=0
if [ -d "/proc/$$/ns" ]; then
system_has_ns=0
if [ -d "/proc/$$/ns" ]; then
This page took
0.025241 seconds
and
4
git commands to generate.