X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=tests%2Fregression%2Fkernel%2Ftest_callstack;h=42c3fcce404195accc5c047113900ad41d3a6d88;hb=ca342eaff631d106a2c83308f19487d21cb5be40;hp=6cb20bcdb56f8e6c95cac881d2c87617a4b5b9dc;hpb=591ee332c58988222f58c6eadb047890707e7a35;p=lttng-tools.git diff --git a/tests/regression/kernel/test_callstack b/tests/regression/kernel/test_callstack index 6cb20bcdb..42c3fcce4 100755 --- a/tests/regression/kernel/test_callstack +++ b/tests/regression/kernel/test_callstack @@ -1,19 +1,9 @@ #!/bin/bash # -# Copyright (C) - 2017 Francis Deslauriers +# Copyright (C) 2017 Francis Deslauriers # -# 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. +# SPDX-License-Identifier: GPL-2.0-only # -# 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. TEST_DESC="Kernel tracer - Callstack context" @@ -43,12 +33,15 @@ function lttng_track_pid() function run_workload() { local TEST_APP=$1 + # shift the first argument, passing along the other args if any to the + # test app. + shift local start_file_sync start_file_sync=$(mktemp -u) lttng_untrack_all - ./"$TEST_APP" "$start_file_sync" & + ./"$TEST_APP" "$start_file_sync" "$@" & PID=$! lttng_track_pid $PID @@ -118,7 +111,7 @@ function test_kernel_callstack() lttng_enable_kernel_syscall_ok "$SESSION_NAME" "$EVENT_NAME" "$CHANNEL_NAME" add_context_kernel_ok "$SESSION_NAME" "$CHANNEL_NAME" "callstack-kernel" - run_workload $TEST_APP_KERNELSPACE + run_workload "$TEST_APP_KERNELSPACE" "/proc/cpuinfo" "/proc/cmdline" destroy_lttng_session_ok "$SESSION_NAME"