I think the key here is to run the test on arm. I don't see the issue on x86 and there the total number of tests is the same with and without the patch.
# grep NUM_TESTS= regression/kernel/test_callstack.old
NUM_TESTS=11
NUM_TESTS=$((NUM_TESTS+11))
# regression/kernel/test_callstack.old
1..11
# Kernel tracer - Callstack context
ok 1 - Start session daemon
# Kernel callstack test
ok 2 - Create session callstack in -o /tmp/tmp.SMAJwATHfC
ok 3 - Enable channel chan0 for session callstack
ok 4 - Enable kernel syscall read for session callstack on channel chan0
ok 5 - Add context command for type: callstack-kernel
ok 6 - Untrack command with opts: -s callstack --all --pid -k
ok 7 - Track command with opts: -s callstack -k --pid=2208
ok 8 - Start tracing for session
ok 9 - Stop lttng tracing for session
ok 10 - Destroy session callstack
ok 11 - Validate kernel callstack
# Killing (signal SIGTERM) lttng-sessiond and lt-lttng-sessiond pids: 2172 2173 2195
ok 12 - Wait after kill session daemon
# Looks like you planned 11 tests but ran 1 extra.
# grep NUM_TESTS= regression/kernel/test_callstack
NUM_TESTS=12
NUM_TESTS=$((NUM_TESTS+10))
# regression/kernel/test_callstack
1..12
# Kernel tracer - Callstack context
ok 1 - Start session daemon
# Kernel callstack test
ok 2 - Create session callstack in -o /tmp/tmp.ddcyRuGLzX
ok 3 - Enable channel chan0 for session callstack
ok 4 - Enable kernel syscall read for session callstack on channel chan0
ok 5 - Add context command for type: callstack-kernel
ok 6 - Untrack command with opts: -s callstack --all --pid -k
ok 7 - Track command with opts: -s callstack -k --pid=2292
ok 8 - Start tracing for session
ok 9 - Stop lttng tracing for session
ok 10 - Destroy session callstack
ok 11 - Validate kernel callstack
# Killing (signal SIGTERM) lttng-sessiond and lt-lttng-sessiond pids: 2256 2257 2279
ok 12 - Wait after kill session daemon
# uname -a
Linux #1 SMP PREEMPT Thu Oct 20 10:28:23 CEST 2022 armv7l armv7l armv7l GNU/Linux