projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: test: base-path tests are not run
[lttng-tools.git]
/
tests
/
utils
/
utils.sh
diff --git
a/tests/utils/utils.sh
b/tests/utils/utils.sh
index b326c5bcf94166358e341217078aa1721bb2c8e7..0152ed4d6713834cc0451f4991d813778a0db218 100644
(file)
--- a/
tests/utils/utils.sh
+++ b/
tests/utils/utils.sh
@@
-139,10
+139,19
@@
function conf_proc_count()
# Bail out on failure
function validate_lttng_modules_present ()
{
# Bail out on failure
function validate_lttng_modules_present ()
{
+ # Check for loadable modules.
modprobe -n lttng-tracer 2>/dev/null
modprobe -n lttng-tracer 2>/dev/null
- if [ $? -ne 0 ]; then
- BAIL_OUT "LTTng modules not detected."
+ if [ $? -eq 0 ]; then
+ return 0
+ fi
+
+ # Check for builtin modules.
+ ls /proc/lttng > /dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ return 0
fi
fi
+
+ BAIL_OUT "LTTng modules not detected."
}
function enable_kernel_lttng_event
}
function enable_kernel_lttng_event
@@
-655,7
+664,7
@@
function stop_lttng_sessiond_opt()
if [ -n "$modules" ]; then
diag "Unloading all LTTng modules"
if [ -n "$modules" ]; then
diag "Unloading all LTTng modules"
- modprobe -
r
"$modules"
+ modprobe -
-remove
"$modules"
fi
fi
fi
fi
fi
fi
@@
-1170,8
+1179,16
@@
function enable_ust_lttng_event_filter()
local sess_name="$1"
local event_name="$2"
local filter="$3"
local sess_name="$1"
local event_name="$2"
local filter="$3"
+ local channel_name=$4
+
+ if [ -z $channel_name ]; then
+ # default channel if none specified
+ chan=""
+ else
+ chan="-c $channel_name"
+ fi
- $TESTDIR/../src/bin/lttng/$LTTNG_BIN enable-event "$event_name" -s $sess_name -u --filter "$filter" 1> $OUTPUT_DEST 2> $ERROR_OUTPUT_DEST
+ $TESTDIR/../src/bin/lttng/$LTTNG_BIN enable-event
$chan
"$event_name" -s $sess_name -u --filter "$filter" 1> $OUTPUT_DEST 2> $ERROR_OUTPUT_DEST
ok $? "Enable event $event_name with filtering for session $sess_name"
}
ok $? "Enable event $event_name with filtering for session $sess_name"
}
@@
-1410,8
+1427,9
@@
function lttng_snapshot_del_output_fail ()
function lttng_snapshot_record ()
{
local sess_name=$1
function lttng_snapshot_record ()
{
local sess_name=$1
+ local trace_path=$2
- $TESTDIR/../src/bin/lttng/$LTTNG_BIN snapshot record -s
$sess_name $trace_path
1> $OUTPUT_DEST 2> $ERROR_OUTPUT_DEST
+ $TESTDIR/../src/bin/lttng/$LTTNG_BIN snapshot record -s
"$sess_name" "$trace_path"
1> $OUTPUT_DEST 2> $ERROR_OUTPUT_DEST
ok $? "Snapshot recorded"
}
ok $? "Snapshot recorded"
}
@@
-1860,7
+1878,9
@@
function validate_directory_empty ()
{
local trace_path="$1"
{
local trace_path="$1"
- files="$(ls -A "$trace_path")"
+ # Do not double quote `$trace_path` below as we want wildcards to be
+ # expanded.
+ files="$(ls -A $trace_path)"
ret=$?
if [ $ret -ne 0 ]; then
fail "Failed to list content of directory \"$trace_path\""
ret=$?
if [ $ret -ne 0 ]; then
fail "Failed to list content of directory \"$trace_path\""
This page took
0.02558 seconds
and
4
git commands to generate.