Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build/run stress_mt, set_option and init_context tests #9

Merged
merged 4 commits into from
May 8, 2023
Merged

Conversation

Youw
Copy link
Member

@Youw Youw commented May 7, 2023

Relates to: #8

@github-actions
Copy link

github-actions bot commented May 7, 2023

Test Results

2 files  ±0  2 suites  ±0   4s ⏱️ -1s
3 tests +2  3 ✔️ +2  0 💤 ±0  0 ±0 
6 runs  +4  6 ✔️ +4  0 💤 ±0  0 ±0 

Results for commit f6423a0. ± Comparison against base commit 3adeed6.

This pull request removes 1 and adds 3 tests. Note that renamed tests count towards both.
testlib ‑ testlib
init_context ‑ init_context
stress ‑ stress
stress_mt ‑ stress_mt

♻️ This comment has been updated with latest results.

@Youw
Copy link
Member Author

Youw commented May 7, 2023

Interesting why set_option test fails with Exception: SegFault, even though it clearly looks like the failure reason is "no USB devices found".
Probably need to investigate/think how to workaround it.

@mcuee any ideas? Do we have somthing like "virtual USB device" on Linux for tests?
Or should I disable the test on CI?

@mcuee
Copy link
Member

mcuee commented May 7, 2023

Here is the build log under Linux for libusb git master, using Ubuntu 20.04 Linux.

mcuee@UbuntuSwift3:~/build/libusb/libusb_git$ ./autogen.sh
...
mcuee@UbuntuSwift3:~/build/libusb/libusb_git$ make
make  all-recursive
make[1]: Entering directory '/home/mcuee/build/libusb/libusb_git'
Making all in libusb
make[2]: Entering directory '/home/mcuee/build/libusb/libusb_git/libusb'
  CC       core.lo
  CC       descriptor.lo
  CC       hotplug.lo
  CC       io.lo
  CC       strerror.lo
  CC       sync.lo
  CC       os/events_posix.lo
  CC       os/threads_posix.lo
  CC       os/linux_usbfs.lo
  CC       os/linux_udev.lo
  CCLD     libusb-1.0.la
make[2]: Leaving directory '/home/mcuee/build/libusb/libusb_git/libusb'
Making all in examples
make[2]: Entering directory '/home/mcuee/build/libusb/libusb_git/examples'
  CC       dpfp.o
  CCLD     dpfp
  CC       dpfp_threaded-dpfp.o
  CCLD     dpfp_threaded
  CC       ezusb.o
  CC       fxload.o
  CCLD     fxload
  CC       hotplugtest.o
  CCLD     hotplugtest
  CC       listdevs.o
  CCLD     listdevs
  CC       sam3u_benchmark.o
  CCLD     sam3u_benchmark
  CC       testlibusb.o
  CCLD     testlibusb
  CC       xusb.o
  CCLD     xusb
make[2]: Leaving directory '/home/mcuee/build/libusb/libusb_git/examples'
Making all in tests
make[2]: Entering directory '/home/mcuee/build/libusb/libusb_git/tests'
  CC       stress.o
  CC       testlib.o
  CCLD     stress
  CC       stress_mt.o
  CCLD     stress_mt
  CC       set_option.o
  CCLD     set_option
  CC       init_context.o
  CCLD     init_context
  CC       umockdev-umockdev.o
umockdev.c:37:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   37 | #pragma GCC diagnostic ignored "-Wanalyzer-malloc-leak"
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~
umockdev.c:38:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   38 | #pragma GCC diagnostic ignored "-Wanalyzer-file-leak"
      |                                ^~~~~~~~~~~~~~~~~~~~~~
  CCLD     umockdev
make[2]: Leaving directory '/home/mcuee/build/libusb/libusb_git/tests'
make[2]: Entering directory '/home/mcuee/build/libusb/libusb_git'
make[2]: Leaving directory '/home/mcuee/build/libusb/libusb_git'
make[1]: Leaving directory '/home/mcuee/build/libusb/libusb_git'
mcuee@UbuntuSwift3:~/build/libusb/libusb_git$ ls -la ./tests/
total 572
drwxrwxr-x  4 mcuee mcuee   4096 May  8 07:10 .
drwxrwxr-x 14 mcuee mcuee   4096 May  8 07:09 ..
drwxrwxr-x  2 mcuee mcuee   4096 May  8 07:10 .deps
-rwxrwxr-x  1 mcuee mcuee   6361 May  8 07:10 init_context
-rw-rw-r--  1 mcuee mcuee   5304 Apr 13 19:37 init_context.c
-rw-rw-r--  1 mcuee mcuee  33032 May  8 07:10 init_context.o
drwxrwxr-x  2 mcuee mcuee   4096 May  8 07:10 .libs
-rw-rw-r--  1 mcuee mcuee   2414 Nov 13  2021 libusb_testlib.h
-rw-rw-r--  1 mcuee mcuee  23818 May  8 07:09 Makefile
-rw-rw-r--  1 mcuee mcuee    780 Apr 13 19:37 Makefile.am
-rw-rw-r--  1 mcuee mcuee  24061 May  8 07:09 Makefile.in
-rwxrwxr-x  1 mcuee mcuee   6341 May  8 07:10 set_option
-rw-rw-r--  1 mcuee mcuee   9185 Apr 13 19:37 set_option.c
-rw-rw-r--  1 mcuee mcuee  51016 May  8 07:10 set_option.o
-rwxrwxr-x  1 mcuee mcuee   6301 May  8 07:10 stress
-rw-rw-r--  1 mcuee mcuee   4895 Jan 25 08:58 stress.c
-rwxrwxr-x  1 mcuee mcuee   6331 May  8 07:10 stress_mt
-rw-rw-r--  1 mcuee mcuee   4159 Mar 13 19:12 stress_mt.c
-rw-rw-r--  1 mcuee mcuee  23536 May  8 07:10 stress_mt.o
-rw-rw-r--  1 mcuee mcuee  22424 May  8 07:10 stress.o
-rw-rw-r--  1 mcuee mcuee   4735 Nov 13  2021 testlib.c
-rw-rw-r--  1 mcuee mcuee  26144 May  8 07:10 testlib.o
-rwxrwxr-x  1 mcuee mcuee   6321 May  8 07:10 umockdev
-rw-rw-r--  1 mcuee mcuee  36153 Jan 25 08:58 umockdev.c
-rw-rw-r--  1 mcuee mcuee 220480 May  8 07:10 umockdev-umockdev.o

@mcuee
Copy link
Member

mcuee commented May 7, 2023

In order to run umockdev test, you need to intall two packages first: umockdev libumockdev-dev. It is a Linux specific test.
Ref: https://github.com/libusb/libusb/blob/master/.private/ci-container-build.sh

@mcuee
Copy link
Member

mcuee commented May 7, 2023

@Youw
For set_option, you may have to disable the test for CI.

@Youw Youw merged commit f71778b into main May 8, 2023
@Youw Youw deleted the stress_mt branch May 8, 2023 19:56
@Youw Youw mentioned this pull request May 8, 2023
@mcuee mcuee added the enhancement New feature or request label Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants