X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=tests%2Fregression%2Fust%2Fnamespaces%2Ftest_ns_contexts;h=e65cc247598533bf2f2053f38d7687395ed756e3;hp=91852a05fb7c9e0e250ceeb16f8357d1bc009bfc;hb=HEAD;hpb=bbf1574355c9385182aa038be3a2c653879e55a4 diff --git a/tests/regression/ust/namespaces/test_ns_contexts b/tests/regression/ust/namespaces/test_ns_contexts index 91852a05f..0af3193ef 100755 --- a/tests/regression/ust/namespaces/test_ns_contexts +++ b/tests/regression/ust/namespaces/test_ns_contexts @@ -2,18 +2,7 @@ # # Copyright (C) 2019 Michael Jeanson # -# This library is free software; you can redistribute it and/or modify it under -# the terms of the GNU Lesser General Public License as published by the Free -# Software Foundation; version 2.1 of the License. -# -# This library 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 Lesser General Public License for more -# details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this library; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# SPDX-License-Identifier: LGPL-2.1-only TEST_DESC="UST - Namespace contexts" @@ -23,19 +12,19 @@ TESTDIR=$CURDIR/../../.. TESTAPP_PATH="$TESTDIR/utils/testapp" TESTAPP_NAME="gen-ust-events" TESTAPP_BIN="$TESTAPP_PATH/$TESTAPP_NAME/$TESTAPP_NAME" -NUM_EVENT=10000 +NUM_EVENT=1000 EVENT_NAME="tp:tptest" TESTS_PER_NS=13 -NUM_TESTS=$((TESTS_PER_NS * 7)) +NUM_TESTS=$((TESTS_PER_NS * 8)) source "$TESTDIR/utils/utils.sh" # MUST set TESTDIR before calling those functions function run_app() { - $TESTAPP_BIN $NUM_EVENT + $TESTAPP_BIN -i $NUM_EVENT ok $? "Application done" } @@ -46,7 +35,6 @@ function test_ns() local session_name="${ns}_ns" local chan_name="${ns}_ns" local context_name="${ns}_ns" - local trace_path local ns_inode @@ -56,12 +44,12 @@ function test_ns() return fi + trace_path=$(mktemp -d -t "tmp.${FUNCNAME[0]}_trace_path.XXXXXX") + # Get the current ns inode number ns_inode=$(stat -c '%i' -L "/proc/$$/ns/$ns") ok $? "Get current $ns namespace inode: $ns_inode" - trace_path=$(mktemp -d) - start_lttng_sessiond create_lttng_session_ok "$session_name" "$trace_path" @@ -88,6 +76,8 @@ plan_tests $NUM_TESTS print_test_banner "$TEST_DESC" +bail_out_if_no_babeltrace + system_has_ns=0 if [ -d "/proc/$$/ns" ]; then system_has_ns=1 @@ -100,5 +90,6 @@ test_ns ipc test_ns mnt test_ns net test_ns pid +test_ns time test_ns user test_ns uts