.gitignore: ignore local vscode workspace settings file
[lttng-tools.git] / tests / regression / tools / health / test_thread_ok
index dfc67cdcfedd2d35d3a0d6c4bcfee66c10c8be3c..5441b2f064b56eb74ecce145c1f5b64268b14aa3 100755 (executable)
@@ -1,20 +1,9 @@
 #!/bin/bash
 #
-# Copyright (C) 2012 Christian Babeux <christian.babeux@efficios.com>
-# Copyright (C) 2014 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+# Copyright (C) 2012 Christian Babeux <christian.babeux@efficios.com>
+# Copyright (C) 2014 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
 #
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License, version 2 only, as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-# more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0-only
 
 TEST_DESC="Health check - Thread OK"
 
@@ -78,7 +67,7 @@ function test_thread_ok
        $CURDIR/$HEALTH_CHECK_BIN > ${STDOUT_PATH} 2> ${STDERR_PATH}
        report_errors
 
-       skip $isroot "Root access is needed. Skipping kernel consumer health check test." "5" ||
+       check_skip_kernel_test "5" "Skipping kernel consumer health check test." ||
        {
                diag "With kernel consumer daemon"
                create_lttng_session_no_output $SESSION_NAME
@@ -121,17 +110,10 @@ plan_tests $NUM_TESTS
 
 print_test_banner "$TEST_DESC"
 
-STDOUT_PATH=$(mktemp)
-STDERR_PATH=$(mktemp)
-TRACE_PATH=$(mktemp -d)
-HEALTH_PATH=$(mktemp -d)
-
-# The manage kernel thread is only spawned if we are root
-if [ "$(id -u)" == "0" ]; then
-       isroot=1
-else
-       isroot=0
-fi
+STDOUT_PATH=$(mktemp -t tmp.test_thread_ok_stdout_path.XXXXXX)
+STDERR_PATH=$(mktemp -t tmp.test_thread_ok_stderr_path.XXXXXX)
+TRACE_PATH=$(mktemp -d -t tmp.test_thread_ok_trace_path.XXXXXX)
+HEALTH_PATH=$(mktemp -d -t tmp.test_thread_ok_trace_path.XXXXXX)
 
 test_thread_ok
 
This page took 0.025045 seconds and 4 git commands to generate.