In the future I would like to be able to run lttng-sessiond of the
container host for various reasons. When loaded on the host as the
root user, the lttng-modules are loaded when available - and this is
visible inside the containers which share the kernel. Some tests
validate that the modules are unloaded even if the kernel testing has
been skipped.
The second part of this change limits the possible PID search space to
those started by the current user. This avoids situations where a
non-privileged user tries to kill the lttng-sessiond run by root.
Change-Id: I0cec2e385f37c62d8961488751805b1248ce2687
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
local full_command_no_argument
local command_basename
- possible_pids=$($PGREP -f "$pattern")
+ possible_pids=$($PGREP -f "$pattern" -u "${UID}")
if [ -z "$possible_pids" ]; then
return 0
fi
local ret
local message="%d LTTng modules loaded, expected count "
+ check_skip_kernel_test 1 && return
if [[ "${fail_when_present}" -eq "1" ]] ; then
message+="= 0"
else