X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Futils%2Futils.sh;h=a1e142487024b8a6966321a8aba87e04f4a685eb;hb=65702b8f172b8d2156ab1889f7e7c1b134114ec1;hp=1a6ea3c424016e4ecca9fa76f1726a168d39839d;hpb=7cb78e2f73ef7bc0cfedef707f47f1c229bb4c43;p=lttng-tools.git diff --git a/tests/utils/utils.sh b/tests/utils/utils.sh index 1a6ea3c42..a1e142487 100644 --- a/tests/utils/utils.sh +++ b/tests/utils/utils.sh @@ -100,7 +100,7 @@ function lttng_pgrep () while IFS= read -r pid ; do # /proc/pid/cmdline is null separated. - if full_command_no_argument=$(cut -d '' -f 1 < /proc/"$pid"/cmdline); then + if full_command_no_argument=$(cut -d '' -f 1 2>/dev/null < /proc/"$pid"/cmdline); then command_basename=$(basename "$full_command_no_argument") if grep -q "$pattern" <<< "$command_basename"; then echo "$pid" @@ -646,7 +646,9 @@ function stop_lttng_sessiond_opt() if [ -z "$pids" ]; then if [ "$withtap" -eq "1" ]; then - pass "No session daemon to kill" + fail "No session daemon to kill" + else + BAIL_OUT "No session daemon to kill" fi return 0 fi @@ -700,7 +702,7 @@ function stop_lttng_sessiond_opt() if [ -n "$modules" ]; then diag "Unloading all LTTng modules" - modprobe -r "$modules" + modprobe --remove "$modules" fi fi fi