Regarding some of the other failures mentioned - for resolute and the
kprobe tests failing, yes stonking does seem to have the fix(es) for the
issues with the kprobe tests.

For testcase "follow events clear", I do feel like I have a solution
for. I mentioned it here (in one of the other bugs you mentioned for
amd64):
https://bugs.launchpad.net/ubuntu/+source/libtracefs/+bug/2172071/comments/3
. I will will forward that fix to the upstream mailing list as soon as I
am able to confirm it on ppc64el (I am unable to access my systems right
now due to an internal outage).

---

I did notice that on resolute it includes this test patch:

jamie@jamie-ThinkPad:~/autopkgtests/libtracefs-1.8.2$ cat 
debian/tests/autopkgtest-specific.patch
diff --git a/utest/Makefile b/utest/Makefile
index f10b709..16cb159 100644
--- a/utest/Makefile
+++ b/utest/Makefile
@@ -12,7 +12,8 @@ OBJS += tracefs-utest.o
 
 LIBS += -lcunit                                \
        -ldl                            \
-       $(obj)/lib/libtracefs.a
+       -ltraceevent                    \
+       -ltracefs
 
 OBJS := $(OBJS:%.o=$(bdir)/%.o)
 
@@ -21,7 +22,7 @@ $(bdir):
 
 $(OBJS): | $(bdir)
 
-$(bdir)/trace-utest: $(OBJS) $(obj)/lib/libtracefs.a
+$(bdir)/trace-utest: $(OBJS)
        $(Q)$(do_app_build)
 
 $(bdir)/%.o: %.c
diff --git a/utest/tracefs-utest.c b/utest/tracefs-utest.c
index 963fac7..9aa80be 100644
--- a/utest/tracefs-utest.c
+++ b/utest/tracefs-utest.c
@@ -124,6 +124,8 @@ static unsigned long long last_ts;
 
 static bool mapping_is_supported;
 
+static bool ubuntu_autopkgtest = true;
+
 static void msleep(int ms)
 {
        struct timespec tspec;
@@ -1932,7 +1934,9 @@ static void test_cpu_pipe(struct test_cpu_data *data, int 
expect)
 
        cnt = read_trace_cpu_file(data);
 
-       CU_TEST(cnt == expect);
+       /* This test fails most of the time on Ubuntu's autopkgtest runners; I 
guess
+        * it's a difficult one for virtualized environments. */
+       CU_TEST((cnt == expect) && ubuntu_autopkgtest);
 }
 
 static void test_instance_trace_cpu_pipe(struct tracefs_instance *instance, 
bool map)
@@ -2828,7 +2832,10 @@ static void test_instance_reset(void)
                                                      "schedule:stacktrace") > 
0);
        CU_TEST(tracefs_instance_file_write(instance, "set_ftrace_notrace",
                                                      "schedule:stacktrace") > 
0);
-       CU_TEST(tracefs_instance_file_write(instance, "tracing_cpumask", "0f") 
> 0);
+       /* The test fails on Ubuntu's autopkgtest runners. I'm not sure at the 
moment
+        * what would be the cause and unfortunately cunit has no convenient 
way to
+        * extract a return code and show it before testing it. */
+       CU_TEST((tracefs_instance_file_write(instance, "tracing_cpumask", "0f") 
> 0) && ubuntu_autopkgtest);
        CU_TEST(tracefs_event_file_write(instance, "syscalls", "sys_exit_read", 
"trigger",
                                                      
"enable_event:kmem:kmalloc:1") > 0);
        CU_TEST(tracefs_event_file_write(instance, "sched", "sched_switch", 
"filter",

---

So that could explain why some of those testcases, such as testcase
'Test: instance reset' and 'Test: trace cpu pipe' seem to only fail on
stonking and tenacious.

This was from stonking on a Thinkpad (amd64) (I am not including my
proposed fix for 'follow events clear'):

jamie@jamie-ThinkPad-X1:~/autopkgtests/libtracefs-1.8.2$ grep -C 40 FAIL 
../stonking_logs/without_patches/log
218s Setting up gcc-15-x86-64-linux-gnu (15.3.0-4ubuntu1) ...
218s Setting up libcunit1-dev:amd64 (2.1-3-dfsg-3) ...
218s Setting up libtracefs1:amd64 (1.8.3-1ubuntu1) ...
218s Setting up cpp-15 (15.3.0-4ubuntu1) ...
218s Setting up libtracefs-dev:amd64 (1.8.3-1ubuntu1) ...
218s Setting up libc6-dev:amd64 (2.44-1ubuntu2) ...
218s Setting up cpp-x86-64-linux-gnu (4:15.2.0-5ubuntu1) ...
218s Setting up gcc-x86-64-linux-gnu (4:15.2.0-5ubuntu1) ...
218s Setting up gcc-15 (15.3.0-4ubuntu1) ...
218s Setting up cpp (4:15.2.0-5ubuntu1) ...
218s Setting up gcc (4:15.2.0-5ubuntu1) ...
218s Processing triggers for libc-bin (2.44-1ubuntu2) ...
221s autopkgtest [21:36:32]: test trace-utest: make LIBTRACEFS_STATIC= 
EXTRA_LIBS=-ltracefs test && ./utest/trace-utest
221s autopkgtest [21:36:32]: test trace-utest: [-----------------------
223s 
223s 
223s      CUnit - A unit testing framework for C - Version 2.1-3
223s      http://cunit.sourceforge.net/
223s 
223s Testing mmapped buffers too
223s 
223s Suite: tracefs library
223s   Test: Test tracefs/debugfs mounting ...passed
223s   Test: trace cpu read ...passed
228s   Test: trace cpu read_buf_percent ...passed
250s   Test: trace cpu pipe ...passed
251s   Test: trace pid events filter ...passed
253s   Test: trace pid function filter ...passed
253s   Test: trace sql ...passed
253s   Test: trace sql trace onmax ...passed
253s   Test: trace sql trace onchange ...passed
253s   Test: trace sql snapshot onmax ...passed
253s   Test: trace sql snapshot onchange ...passed
253s   Test: trace sql save onmax ...passed
253s   Test: trace sql save onchange ...passed
253s   Test: trace sql trace and snapshot onmax ...passed
253s   Test: trace sql trace and snapshot onchange ...passed
253s   Test: tracing file / directory APIs ...passed
253s   Test: instance file / directory APIs ...passed
253s   Test: instance file descriptor ...passed
253s   Test: instance reset ...FAILED
253s     1. tracefs-utest.c:3238  - tracefs_instance_file_write(instance, 
"tracing_cpumask", "0f") > 0
253s   Test: systems and events APIs ...passed
253s   Test: tracefs_iterate_snapshot_events API ...passed
254s   Test: tracefs_iterate_raw_events API ...passed
256s   Test: Follow events ...passed
260s   Test: Follow events clear ...FAILED
260s     1. tracefs-utest.c:1747  - fdata.missed_hit > 0
260s     2. tracefs-utest.c:1747  - fdata.missed_hit > 0
260s   Test: tracefs_tracers API ...passed
261s   Test: tracefs_local events API ...passed
261s   Test: tracefs_instances_walk API ...passed
261s   Test: tracefs_get_clock API ...passed
261s   Test: tracing on / off ...passed
261s   Test: tracing options ...passed
264s   Test: custom system directory ...passed
264s   Test: ftrace marker ...passed
264s   Test: kprobes ...passed
265s   Test: synthetic events ...passed
265s   Test: eprobes ...passed
265s   Test: uprobes ...passed
266s   Test: multi probe test ...passed
266s 
266s Run Summary:    Type    Total      Ran   Passed Failed Inactive
266s               suites        1        1      n/a      0        0
266s                tests       37       37       35      2        0
266s              asserts 24660624 24660624 24660621      3      n/a
266s 
266s Elapsed time =   35.360 seconds
266s autopkgtest [21:37:17]: test trace-utest: -----------------------]
267s autopkgtest [21:37:18]: test trace-utest:  - - - - - - - - - - results - - 
- - - - - - - -
267s trace-utest          FAIL non-zero exit status 1
267s autopkgtest [21:37:18]:  - - - - - - - - - - running shell - - - - - - - - 
- -
440s autopkgtest [21:40:11]: test trace-utest-valgrind: preparing testbed
442s Ign:1 file:/tmp/autopkgtest.OMRfQk/binaries  InRelease
442s Get:2 file:/tmp/autopkgtest.OMRfQk/binaries  Release [816 B]
442s Get:2 file:/tmp/autopkgtest.OMRfQk/binaries  Release [816 B]
442s Ign:3 file:/tmp/autopkgtest.OMRfQk/binaries  Release.gpg
442s Reading package lists...
444s Reading package lists...
444s Building dependency tree...
444s Reading state information...
444s Solving dependencies...
445s 0 upgraded, 0 newly installed, 2 reinstalled, 0 to remove and 0 not 
upgraded.
445s Need to get 0 B/149 kB of archives.
445s After this operation, 0 B of additional disk space will be used.
445s Get:1 file:/tmp/autopkgtest.OMRfQk/binaries  libtracefs-dev 1.8.3-1ubuntu1 
[80.5 kB]
445s Get:2 file:/tmp/autopkgtest.OMRfQk/binaries  libtracefs1 1.8.3-1ubuntu1 
[68.1 kB]
(Reading database ... 73315 files and directories currently installed.)
445s Preparing to unpack .../binaries/./libtracefs-dev.deb ...
445s Unpacking libtracefs-dev:amd64 (1.8.3-1ubuntu1) over (1.8.3-1ubuntu1) ...
445s Preparing to unpack .../binaries/./libtracefs1.deb ...
445s Unpacking libtracefs1:amd64 (1.8.3-1ubuntu1) over (1.8.3-1ubuntu1) ...
445s Setting up libtracefs1:amd64 (1.8.3-1ubuntu1) ...
445s Setting up libtracefs-dev:amd64 (1.8.3-1ubuntu1) ...
445s Processing triggers for libc-bin (2.44-1ubuntu2) ...
445s W: --force-yes is deprecated, use one of the options starting with --allow 
instead.
446s Reading package lists...
446s Building dependency tree...
446s Reading state information...
446s Solving dependencies...
446s The following NEW packages will be installed:
446s   libc6-dbg valgrind
447s 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
447s Need to get 22.5 MB of archives.
447s After this operation, 97.0 MB of additional disk space will be used.
447s Get:1 http://archive.ubuntu.com/ubuntu stonking/main amd64 libc6-dbg amd64 
2.44-1ubuntu2 [6654 kB]
447s Get:2 http://archive.ubuntu.com/ubuntu stonking/main amd64 valgrind amd64 
1:3.27.1-0.2ubuntu2 [15.8 MB]
448s Fetched 22.5 MB in 2s (15.0 MB/s)
448s Selecting previously unselected package libc6-dbg:amd64.
(Reading database ... 73315 files and directories currently installed.)
448s Preparing to unpack .../libc6-dbg_2.44-1ubuntu2_amd64.deb ...
--
452s 
531s Testing mmapped buffers too
532s 
532s Suite: tracefs library
532s   Test: Test tracefs/debugfs mounting ...passed
533s   Test: trace cpu read ...passed
539s   Test: trace cpu read_buf_percent ...passed
551s   Test: trace cpu pipe ...==1876== Invalid read of size 8
551s ==1876==    at 0x48A2F34: ??? (in 
/usr/lib/x86_64-linux-gnu/libtraceevent.so.1.9.0)
551s ==1876==    by 0x48A6177: kbuffer_load_subbuffer (in 
/usr/lib/x86_64-linux-gnu/libtraceevent.so.1.9.0)
551s ==1876==    by 0x400D82C: read_trace_cpu_file (tracefs-utest.c:2015)
551s ==1876==    by 0x400DAEB: test_cpu_pipe (tracefs-utest.c:2080)
551s ==1876==    by 0x400DBE7: test_instance_trace_cpu_pipe 
(tracefs-utest.c:2096)
551s ==1876==    by 0x400DC3D: test_trace_cpu_pipe (tracefs-utest.c:2105)
551s ==1876==    by 0x48BC94C: ??? (in 
/usr/lib/x86_64-linux-gnu/libcunit.so.1.0.1)
551s ==1876==    by 0x48BCC77: ??? (in 
/usr/lib/x86_64-linux-gnu/libcunit.so.1.0.1)
551s ==1876==    by 0x48BDC0F: CU_run_all_tests (in 
/usr/lib/x86_64-linux-gnu/libcunit.so.1.0.1)
551s ==1876==    by 0x4006D9B: main (trace-utest.c:81)
551s ==1876==  Address 0x7c17810 is 0 bytes after a block of size 4,096 alloc'd
551s ==1876==    at 0x4884E43: calloc (vg_replace_malloc.c:1616)
551s ==1876==    by 0x400A629: setup_trace_cpu (tracefs-utest.c:1152)
551s ==1876==    by 0x400DB7A: test_instance_trace_cpu_pipe 
(tracefs-utest.c:2089)
551s ==1876==    by 0x400DC3D: test_trace_cpu_pipe (tracefs-utest.c:2105)
551s ==1876==    by 0x48BC94C: ??? (in 
/usr/lib/x86_64-linux-gnu/libcunit.so.1.0.1)
551s ==1876==    by 0x48BCC77: ??? (in 
/usr/lib/x86_64-linux-gnu/libcunit.so.1.0.1)
551s ==1876==    by 0x48BDC0F: CU_run_all_tests (in 
/usr/lib/x86_64-linux-gnu/libcunit.so.1.0.1)
551s ==1876==    by 0x4006D9B: main (trace-utest.c:81)
551s ==1876== 
551s missed events 144151680
551s missed events 144151680
551s missed events 144151680
551s missed events 144151680
551s missed events 144151680
551s missed events 144151680
562s missed events 160110400
562s missed events 160110400
562s missed events 160110400
562s missed events 160110400
562s missed events 160110400
562s missed events 160110400
563s FAILED
563s     1. tracefs-utest.c:2082  - cnt == expect
563s     2. tracefs-utest.c:2082  - cnt == expect
566s   Test: trace pid events filter ...passed
571s   Test: trace pid function filter ...passed
571s   Test: trace sql ...passed
571s   Test: trace sql trace onmax ...passed
571s   Test: trace sql trace onchange ...passed
571s   Test: trace sql snapshot onmax ...passed
571s   Test: trace sql snapshot onchange ...passed
571s   Test: trace sql save onmax ...passed
571s   Test: trace sql save onchange ...passed
571s   Test: trace sql trace and snapshot onmax ...passed
571s   Test: trace sql trace and snapshot onchange ...passed
571s   Test: tracing file / directory APIs ...passed
571s   Test: instance file / directory APIs ...passed
571s   Test: instance file descriptor ...passed
575s   Test: instance reset ...FAILED
575s     1. tracefs-utest.c:3238  - tracefs_instance_file_write(instance, 
"tracing_cpumask", "0f") > 0
575s   Test: systems and events APIs ...passed
578s   Test: tracefs_iterate_snapshot_events API ...passed
581s   Test: tracefs_iterate_raw_events API ...passed
584s   Test: Follow events ...passed
594s   Test: Follow events clear ...passed
594s   Test: tracefs_tracers API ...passed
829s   Test: tracefs_local events API ...passed
829s   Test: tracefs_instances_walk API ...passed
829s   Test: tracefs_get_clock API ...passed
829s   Test: tracing on / off ...passed
829s   Test: tracing options ...passed
1077s   Test: custom system directory ...passed
1077s   Test: ftrace marker ...passed
1078s   Test: kprobes ...passed
1162s   Test: synthetic events ...passed
1162s   Test: eprobes ...passed
1163s   Test: uprobes ...passed
1250s   Test: multi probe test ...passed
1250s 
1250s Run Summary:    Type   Total     Ran  Passed Failed Inactive
1250s               suites       1       1     n/a      0        0
1250s                tests      37      37      35      2        0
1250s              asserts 4411762 4411762 4411759      3      n/a
1250s 
1250s Elapsed time =  787.687 seconds
1250s ==1876== 
1250s ==1876== HEAP SUMMARY:
1250s ==1876==     in use at exit: 6,637 bytes in 346 blocks
1250s ==1876==   total heap usage: 11,609,569 allocs, 11,609,223 frees, 
209,464,415,567 bytes allocated
1250s ==1876== 
1250s ==1876== 2 bytes in 1 blocks are indirectly lost in loss record 1 of 106
1250s ==1876==    at 0x487D858: malloc (vg_replace_malloc.c:447)
1250s ==1876==    by 0x49AD66E: strdup (strdup.c:42)
1250s ==1876==    by 0x48DD202: dyn_generic_parse (tracefs-dynevents.c:167)
1250s ==1876==    by 0x48D61B0: get_dynevent (tracefs-dynevents.c:516)
1250s ==1876==    by 0x48D61B0: get_all_dynevents (tracefs-dynevents.c:551)
1250s ==1876==    by 0x48DE441: tracefs_dynevent_get_all 
(tracefs-dynevents.c:603)
1250s ==1876==    by 0x400DC94: get_dynevents_check (tracefs-utest.c:2116)
1250s ==1876==    by 0x4012A21: test_multi_probes_instance 
(tracefs-utest.c:2853)
--
1250s ==1876==    by 0x48BC94C: ??? (in 
/usr/lib/x86_64-linux-gnu/libcunit.so.1.0.1)
1250s ==1876==    by 0x48BCC77: ??? (in 
/usr/lib/x86_64-linux-gnu/libcunit.so.1.0.1)
1250s ==1876==    by 0x48BDC0F: CU_run_all_tests (in 
/usr/lib/x86_64-linux-gnu/libcunit.so.1.0.1)
1250s ==1876==    by 0x4006D9B: main (trace-utest.c:81)
1250s ==1876== 
1250s ==1876== LEAK SUMMARY:
1250s ==1876==    definitely lost: 763 bytes in 47 blocks
1250s ==1876==    indirectly lost: 5,764 bytes in 296 blocks
1250s ==1876==      possibly lost: 0 bytes in 0 blocks
1250s ==1876==    still reachable: 110 bytes in 3 blocks
1250s ==1876==         suppressed: 0 bytes in 0 blocks
1250s ==1876== 
1250s ==1876== ERROR SUMMARY: 33 errors from 22 contexts (suppressed: 0 from 0)
1250s ==1876== 
1250s ==1876== 12 errors in context 1 of 22:
1250s ==1876== Invalid read of size 8
1250s ==1876==    at 0x48A2F34: ??? (in 
/usr/lib/x86_64-linux-gnu/libtraceevent.so.1.9.0)
1250s ==1876==    by 0x48A6177: kbuffer_load_subbuffer (in 
/usr/lib/x86_64-linux-gnu/libtraceevent.so.1.9.0)
1250s ==1876==    by 0x400D82C: read_trace_cpu_file (tracefs-utest.c:2015)
1250s ==1876==    by 0x400DAEB: test_cpu_pipe (tracefs-utest.c:2080)
1250s ==1876==    by 0x400DBE7: test_instance_trace_cpu_pipe 
(tracefs-utest.c:2096)
1250s ==1876==    by 0x400DC3D: test_trace_cpu_pipe (tracefs-utest.c:2105)
1250s ==1876==    by 0x48BC94C: ??? (in 
/usr/lib/x86_64-linux-gnu/libcunit.so.1.0.1)
1250s ==1876==    by 0x48BCC77: ??? (in 
/usr/lib/x86_64-linux-gnu/libcunit.so.1.0.1)
1250s ==1876==    by 0x48BDC0F: CU_run_all_tests (in 
/usr/lib/x86_64-linux-gnu/libcunit.so.1.0.1)
1250s ==1876==    by 0x4006D9B: main (trace-utest.c:81)
1250s ==1876==  Address 0x7c17810 is 0 bytes after a block of size 4,096 alloc'd
1250s ==1876==    at 0x4884E43: calloc (vg_replace_malloc.c:1616)
1250s ==1876==    by 0x400A629: setup_trace_cpu (tracefs-utest.c:1152)
1250s ==1876==    by 0x400DB7A: test_instance_trace_cpu_pipe 
(tracefs-utest.c:2089)
1250s ==1876==    by 0x400DC3D: test_trace_cpu_pipe (tracefs-utest.c:2105)
1250s ==1876==    by 0x48BC94C: ??? (in 
/usr/lib/x86_64-linux-gnu/libcunit.so.1.0.1)
1250s ==1876==    by 0x48BCC77: ??? (in 
/usr/lib/x86_64-linux-gnu/libcunit.so.1.0.1)
1250s ==1876==    by 0x48BDC0F: CU_run_all_tests (in 
/usr/lib/x86_64-linux-gnu/libcunit.so.1.0.1)
1250s ==1876==    by 0x4006D9B: main (trace-utest.c:81)
1250s ==1876== 
1250s ==1876== ERROR SUMMARY: 33 errors from 22 contexts (suppressed: 0 from 0)
1250s make: *** [Makefile:219: test_mem] Error 1
1251s autopkgtest [21:53:42]: test trace-utest-valgrind: 
-----------------------]
1251s autopkgtest [21:53:42]: test trace-utest-valgrind:  - - - - - - - - - - 
results - - - - - - - - - -
1251s trace-utest-valgrind FAIL non-zero exit status 2
1252s autopkgtest [21:53:43]:  - - - - - - - - - - running shell - - - - - - - 
- - -
1476s autopkgtest [21:57:27]: @@@@@@@@@@@@@@@@@@@@ summary
1476s build-examples.sh    PASS (superficial)
1476s trace-utest          FAIL non-zero exit status 1
1476s trace-utest-valgrind FAIL non-zero exit status 2
1476s qemu-system-x86_64: terminating on signal 15 from pid 10092 
(/usr/bin/python3)

---

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2062119

Title:
  libtracefs autopkgtests fail on ppc64el

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-power-systems/+bug/2062119/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to