From 2727c90133ad9c6b04092db277a4b4bd4fa196e3 Mon Sep 17 00:00:00 2001 From: Thilina Ratnayaka Date: Mon, 2 Feb 2026 12:37:59 -0600 Subject: [PATCH 1/4] Set PATH inside of `setup_suite.bash` --- .github/workflows/presubmit.yml | 2 +- integration_tests/setup_suite.bash | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml index 7b2608a5..a6f7eea0 100644 --- a/.github/workflows/presubmit.yml +++ b/.github/workflows/presubmit.yml @@ -132,7 +132,7 @@ jobs: if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} - name: Integration test run: | - PKG_CONFIG_PATH=./build/ici/lib/pkgconfig/:${PKG_CONFIG_PATH} PATH=$(pkg-config --variable=bindir thapi):${PATH} bats integration_tests/ + PKG_CONFIG_PATH=./build/ici/lib/pkgconfig/:${PKG_CONFIG_PATH} bats integration_tests/ build-in-tree-and-check: needs: efficios_dep diff --git a/integration_tests/setup_suite.bash b/integration_tests/setup_suite.bash index 31807f50..96a61643 100644 --- a/integration_tests/setup_suite.bash +++ b/integration_tests/setup_suite.bash @@ -3,6 +3,8 @@ setup_suite() { export MPIRUN=${MPIRUN:-mpirun} + export PATH=$(pkg-config --variable=bindir thapi):${PATH} + missing_tools=() # Check for mpirun From f8efac574e265ca701a49d44bbff9d2efcd89178 Mon Sep 17 00:00:00 2001 From: Thilina Ratnayaka Date: Tue, 3 Feb 2026 06:07:50 +0000 Subject: [PATCH 2/4] Run tests twice to ensure we cleanup properly --- .github/workflows/presubmit.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml index a6f7eea0..0d40a5d0 100644 --- a/.github/workflows/presubmit.yml +++ b/.github/workflows/presubmit.yml @@ -132,7 +132,10 @@ jobs: if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} - name: Integration test run: | - PKG_CONFIG_PATH=./build/ici/lib/pkgconfig/:${PKG_CONFIG_PATH} bats integration_tests/ + export PKG_CONFIG_PATH=./build/ici/lib/pkgconfig/:${PKG_CONFIG_PATH} + bats integration_tests/ + # Run the tests twice to make sure we do a proper cleanup + bats integration_tests/ build-in-tree-and-check: needs: efficios_dep From d81012aa38bf5fd3b0ab524e14bd5345ef545b21 Mon Sep 17 00:00:00 2001 From: Thilina Ratnayaka Date: Tue, 3 Feb 2026 06:13:45 +0000 Subject: [PATCH 3/4] Get rid of references to THAPI_HOME --- integration_tests/general.bats | 4 ---- integration_tests/parallel_execution.bats | 4 ---- integration_tests/sampling.bats | 4 ---- 3 files changed, 12 deletions(-) diff --git a/integration_tests/general.bats b/integration_tests/general.bats index 5bcd8321..cb33996c 100644 --- a/integration_tests/general.bats +++ b/integration_tests/general.bats @@ -1,9 +1,5 @@ bats_require_minimum_version 1.5.0 -teardown_file() { - rm -rf $THAPI_HOME/thapi-traces -} - @test "pkg-config_file" { pkg-config --modversion thapi } diff --git a/integration_tests/parallel_execution.bats b/integration_tests/parallel_execution.bats index d603098b..2fd139d0 100644 --- a/integration_tests/parallel_execution.bats +++ b/integration_tests/parallel_execution.bats @@ -1,7 +1,3 @@ -teardown_file() { - rm -rf $THAPI_HOME/thapi-traces -} - launch_mpi() { # timeout just to avoid burning too much hours when bug are introduced timeout 40s $MPIRUN "$@" diff --git a/integration_tests/sampling.bats b/integration_tests/sampling.bats index acd090af..4a38cd0f 100644 --- a/integration_tests/sampling.bats +++ b/integration_tests/sampling.bats @@ -1,7 +1,3 @@ -teardown_file() { - rm -rf $THAPI_HOME/thapi-traces -} - @test "sampling_heartbeat" { LTTNG_UST_ZE_SAMPLING_ENERGY=0 LTTNG_UST_SAMPLING_HEARTBEAT=1 \ iprof --no-analysis --sample --trace-output heartbeat_trace -- bash -c 'sleep 2' From 124642a43de14609d353fed442538ecfe6d601e9 Mon Sep 17 00:00:00 2001 From: Thilina Ratnayaka Date: Tue, 3 Feb 2026 06:20:38 +0000 Subject: [PATCH 4/4] Remove trace directory in sampling_heartbeat test --- integration_tests/sampling.bats | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/integration_tests/sampling.bats b/integration_tests/sampling.bats index 4a38cd0f..07efcb8b 100644 --- a/integration_tests/sampling.bats +++ b/integration_tests/sampling.bats @@ -1,6 +1,9 @@ @test "sampling_heartbeat" { + rm -rf heartbeat_trace + LTTNG_UST_ZE_SAMPLING_ENERGY=0 LTTNG_UST_SAMPLING_HEARTBEAT=1 \ iprof --no-analysis --sample --trace-output heartbeat_trace -- bash -c 'sleep 2' + babeltrace_thapi --no-restrict heartbeat_trace | grep "{foo: 16}" [ $(babeltrace_thapi --no-restrict heartbeat_trace | grep -c "{foo: 32}") == 1 ] } @@ -28,5 +31,4 @@ # assert there is at least one CXI counter sample reporting the difference from the initial babeltrace_thapi --no-restrict cxi_trace_test | grep -a "value: 9999" - }