Bug #1360
closedTest stop/hang when run ptest of lttng-tools (OE/yocto)
0%
Description
Linux and related packages versions:
Linux version: 5.10.79 (OE/yocto)
Liburcu 0.13.2
Lttng_tools: 2.13.8
Lttng_ust: 2.13.5
Lttng modules: 2.13.5
Build environment:
Build kernel and rootfs on Ubuntu (kernel 4.18.0)
Target BSP: intel-x86-64
Test is run on target board: Intel-snr (cpu atom) and command is:
./run-ptest
or
make -k -s LOG_DRIVER_FLAGS=--ignore-exit top_srcdir=$PWD top_builddir=$PWD check
Issue:
Using ptest from (OE/yocto), so all lttng-tools unit tests can be run.
Ptest stop/hang at tools/base-path/test_ust, please find the attached log: test_ust.log and ptest-lttng-tools-2.13.8.log.
Root cause:
In configure.ac, "no" string is set to $PGREP if pgrep is not found during build. Refer to below codes,
--------
AC_PATH_PROG([PGREP], [pgrep], [no])
AM_CONDITIONAL([HAVE_PGREP], [test "x$PGREP" != "xno"])
In tests/utils/utils.sh, NULL string is used to check for $PGREP, so correct pgrep is not set correctly to $PGREP. Refer to below codes,
# Check pgrep from env, default to pgrep if none
if [ -z "$PGREP" ]; then
PGREP=pgrep
Solution:
Check "no" string instead of NULL in utils.sh.
The fix patch is attached: 0001-Fix-tests-PGREP-is-not-checked-correctly-in-utils-sc.patch
Test log is attached too: test_ust-fix.log and ptest-lttng-tools-2.13.8-fix.log
Files