Fix: metadata channel leak when using the snapshot tracing mode
[lttng-tools.git] / tests / utils / warn_processes.sh
CommitLineData
b67cd6f0
PP
1#!/bin/bash
2
4c2eee7f
MJ
3PGREP="$1"
4
b67cd6f0
PP
5if [ x$LTTNG_TOOLS_TESTS_DISABLE_WARN_LTTNG_PROCESSES == x1 ]; then
6 exit
7fi
8
9color_warn='\E[1;33m'
10color_reset='\E[0m'
11color_bold='\E[1m'
12
4c2eee7f 13lttng_processes="$("$PGREP" -l 'lttng|gen-ust-.+')"
b67cd6f0
PP
14
15if [ $? -eq 0 ]; then
16 pids="$(cut -d ' ' -f 1 <<< "$lttng_processes" | tr '\n' ' ')"
17
18 echo -e "${color_warn}Warning: the following LTTng processes were detected running on the system:$color_reset"
19 echo
20 echo "$lttng_processes"
21 echo
22 echo -e "Here's how to kill them: ${color_bold}kill -9 $pids$color_reset"
23 echo -e "${color_warn}If you leave them alive, some tests could fail.$color_reset"
24 echo
25fi
This page took 0.030546 seconds and 5 git commands to generate.