Don't report back error on syscalls fail for -a -k
[lttng-tools.git] / tests / kernel / run-kernel-tests.sh
CommitLineData
8e0dbb65
DG
1#!/bin/bash
2
32258573 3SESSIOND_BIN="lttng-sessiond"
d3e8f6bb
DG
4TESTDIR=$(dirname $0)/..
5
6source $TESTDIR/utils.sh
8e0dbb65
DG
7
8tmpdir=`mktemp -d`
9tests=( kernel_event_basic kernel_all_events_basic )
10exit_code=0
11
12function start_tests ()
13{
14 for bin in ${tests[@]};
15 do
355f483d
DG
16 start_sessiond
17
8e0dbb65
DG
18 ./$bin $tmpdir
19 # Test must return 0 to pass.
20 if [ $? -ne 0 ]; then
21 exit_code=1
355f483d 22 stop_sessiond
8e0dbb65
DG
23 break
24 fi
355f483d 25 stop_sessiond
8e0dbb65 26 done
d3e8f6bb
DG
27
28 # Cleaning up
29 rm -rf $tmpdir
8e0dbb65
DG
30}
31
32function check_lttng_modules ()
33{
34 local out=`modprobe -l | grep lttng`
35 if [ -z "$out" ]; then
36 echo "LTTng modules not detected. Aborting kernel tests!"
37 echo ""
38 # Exit status 0 so the tests can continue
39 exit 0
40 fi
41}
42
355f483d
DG
43echo -e "\n---------------------"
44echo -e "Testing Kernel tracer"
45echo -e "---------------------"
8e0dbb65
DG
46
47# Detect lttng-modules installed
8e0dbb65
DG
48check_lttng_modules
49
8e0dbb65
DG
50start_tests
51
8e0dbb65 52exit $exit_code
This page took 0.036831 seconds and 4 git commands to generate.