Skip to content

Commit 886418d

Browse files
committed
Squashed 'libusb/' changes from 6bf2db6..d52e355
d52e355 libusb 1.0.27 055d852 configure.ac: Bump libtool library version 853a5ea examples/hotplugtest: Tone down message about failed open fdff3cd configure.ac: Do not build umockdev if --enable-debug-log is used 2fad5a8 libusb 1.0.27-rc2 6558778 docs: Add more references in libusb_option section a5483bc core: Allow setting global log callback after first libusb_init() d09d341 core: Don't overwrite the log callback on every global libusb_set_option() 0929a2b docs: Prefer use of libusb_init_context() over old libusb_init() d587c55 xcode: Add files from other backends into the Xcode project 46dfded xcode: Move some options from Xcode project to xcconfig file 66e63d6 Correct some spelling and add codespell config file b4f877f darwin: locationID is 32-bit, not 64-bit 5e4b389 Replace all http://libusb.info/ with https 9a4ec8b Document backend functions that already lock dev_handle->lock f080aec Fix docs about backend functions that lock itransfer->lock 7719ae5 io: Change remove_from_flying_list() to not lock flying_transfers_lock itself f9ae36b windows: Downgrade get_guid DeviceInterfaceGUID warning to info 7b53ee1 libusb.h: Rename ZERO_SIZED_ARRAY to LIBUSB_FLEXIBLE_ARRAY 7ab9c93 core: Add missing mutex acquisition when manipulating active_contexts_list a8fba21 Change libusb_init_option to fix libusb_set_option() on big-endian 56d8f3c io: Fix incorrect alignment in allocation in libusb_alloc_transfer 20fb751 descriptor: Prevent string descriptor buffer overread a91657a darwin: Avoid error checking regression 9401e6c darwin: Revert seemingly harmless introduction of temporary variable 5ad1d99 core: Fix -Wswitch warnings by including all enum values in switch 31dfa14 ChangeLog updates 37dee8f msvc: Add tests/init_context project to MSVC 7c3d9ec tests/stress_mt: Ignore device descriptor mismatch for Windows HID 5f9abfb tests/stress_mt: Ignore some unavailable devices on Windows c2e1507 tests/set_option: Allow no devices in test_no_discovery b272470 libusb.h: Avoid UNREFERENCED_PARAMETER macro on GCC/clang 87d6686 tests/stress_mt: Stop early if any device fails ebfbf19 tests/set_option: Avoid use-after-free in case of test failure cc3df77 libusb 1.0.27-rc1 52bb0ed tests: Use AM_LDFLAGS for -static flag to allow LDFLAGS override 43db4d9 .gitignore: Ignore test binaries and logs 56cee16 tests/umockdev: Avoid unknown warning option on older gcc dac541d Revert "windows: Add option for WinUSB RAW_IO endpoint policy" 066a77f webusb: Wasm+WebUSB backend fixes and improvements 1ca2bc1 darwin: add testing for IOKit version fallbacks 13a6953 darwin: add abstraction for IOUSBDeviceInterface cf6946d darwin: add abstraction for IOUSBInterfaceInterface 33e92b6 darwin: add get_running_version helper 43c6fe0 ci: ensure testsuite log is dumped on failure f0d1ff3 ci: dump test suite output on test failure d82b3d2 ci: do not hard code test names for CI 30a4434 CI: Add Linux and MSYS build with logging disabled a8f7701 CI: Simplify Linux job description f2ebac6 windows: Include enumeration details in debug output 5eed745 windows: Avoid warning with logging disabled 80493dd core: Avoid warning with logging disabled ae3685e stress_mt: Return error if device count varies a8d3cd8 tests/stress_mt: Test open/transfer/close on available devices bd91a0c CI: Enable Emscripten build fd31502 Add WebUSB testing via node-usb 9de0fef core: Avoid possible data race in log_v() dfed0d1 CI: Pass the extra warnings flags to CXXFLAGS too 143338c CI: Tell tests that we don't have any devices c0057c3 CI: Enable Address Sanitizer (ASAN) where supported e28fa30 CI: Run cross-platform tests on all platforms 5fa085e testlib: Don't count skipped tests as failures 6d2abd0 tests: Mark callbacks as LIBUSB_CALL c4285dd windows: Cover all enumeration passes explicitly in switch statements d291eec Revert "core: Remove select case not possibly reached" acc7b9d tests: Fix builds with logging disabled fdab67b windows: Allow device GUIDs missing terminating characters or separators d66ffcd darwin: fix potential crash at darwin_exit 0a2f511 examples/hotplugtest: Match any device by default 67ac8a0 windows: Recognize Samsung composite device driver 24d7928 descriptor: Guard against corrupted descriptor length field 4b732d9 windows: No longer wait for device to get an active configuration c875f15 windows: Define bus numbers without using HCD 1313049 tests: Remove unused function in init_context.c 188a913 Add HACKING file with hints on proper commits git-subtree-dir: libusb git-subtree-split: d52e355
1 parent 544385c commit 886418d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+2417
-1407
lines changed

.codespellrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[codespell]
2+
skip = strerror.c,AUTHORS
3+
ignore-words-list = numer,ser,xwindows

.github/workflows/linux.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,33 @@ jobs:
1818
- uses: actions/checkout@v3
1919

2020
- name: setup prerequisites
21-
shell: bash
2221
run: |
2322
sudo apt update
2423
sudo apt install autoconf automake libtool libudev-dev m4
2524
2625
- name: bootstrap
27-
shell: bash
2826
run: ./bootstrap.sh
2927

3028
- name: netlink
31-
shell: bash
32-
run: .private/ci-build.sh --build-dir build-netlink -- --disable-udev
29+
# Disable tests for netlink as it doesn't seem to work in the CI environment.
30+
run: .private/ci-build.sh --build-dir build-netlink --no-test -- --disable-udev
3331

3432
- name: udev
35-
shell: bash
3633
run: .private/ci-build.sh --build-dir build-udev -- --enable-udev
3734

3835
- name: debug-log
39-
shell: bash
4036
run: .private/ci-build.sh --build-dir build-debug -- --enable-debug-log
4137

38+
- name: disable-log
39+
run: .private/ci-build.sh --build-dir build-nolog -- --disable-log
40+
41+
- uses: mymindstorm/setup-emsdk@v13
42+
43+
- run: npm ci
44+
working-directory: tests/webusb-test-shim
45+
46+
- name: emscripten
47+
run: emconfigure .private/ci-build.sh --build-dir build-emscripten -- --host=wasm32-unknown-emscripten
48+
4249
- name: umockdev test
4350
run: .private/ci-container-build.sh docker.io/amd64/ubuntu:rolling

.github/workflows/msys2.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ jobs:
1414
msystem: MINGW64
1515
update: true
1616
install: git mingw-w64-x86_64-cc mingw-w64-x86_64-autotools
17-
- name: CI-Build
18-
run: |
19-
echo 'Running in MSYS2!'
20-
./bootstrap.sh
21-
./.private/ci-build.sh --build-dir build-msys2
17+
- name: bootstrap
18+
run: ./bootstrap.sh
19+
- name: Build
20+
# GCC on MSYS2 doesn't have ASAN support (but Clang does).
21+
run: ./.private/ci-build.sh --build-dir build-msys2 --no-asan
22+
- name: Build with logging disabled
23+
run: ./.private/ci-build.sh --build-dir build-msys2-nolog --no-asan -- --disable-log

.github/workflows/msys2_clang32.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,8 @@ jobs:
1818
run: |
1919
echo 'Running in MSYS2!'
2020
./bootstrap.sh
21-
./.private/ci-build.sh --build-dir build-msys2-clang32
21+
# Disabling tests as there is some issue that prevents libtool from
22+
# finalizing its executable wrappers.
23+
# Perhaps this one https://github.com/msys2/MSYS2-packages/issues/1351
24+
# but it only occurs on clang32 configuration.
25+
./.private/ci-build.sh --build-dir build-msys2-clang32 --no-test

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Makefile.in
77
*.lo
88
*.o
99
*.js
10+
!/tests/webusb-test-shim/*.js
1011
*.wasm
1112
*.html
1213
libtool
@@ -21,6 +22,7 @@ depcomp
2122
configure
2223
aclocal.m4
2324
compile
25+
test-driver
2426
config.guess
2527
config.h*
2628
!msvc/config.h
@@ -40,7 +42,13 @@ examples/fxload
4042
examples/hotplugtest
4143
examples/sam3u_benchmark
4244
examples/testlibusb
45+
tests/init_context
46+
tests/macos
47+
tests/set_option
4348
tests/stress
49+
tests/stress_mt
50+
tests/*.log
51+
tests/*.trs
4452
android/libs
4553
android/obj
4654
*.exe

.private/appveyor_build.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,8 @@ echo "Bootstrapping ..."
1919
./bootstrap.sh
2020
echo ""
2121

22-
exec .private/ci-build.sh --build-dir "${builddir}" --install -- "--prefix=${installdir}"
22+
extra_args=""
23+
if [ "${Configuration}" == "Release" ]; then
24+
extra_args="--no-asan"
25+
fi
26+
exec .private/ci-build.sh --build-dir "${builddir}" --install ${extra_args} -- "--prefix=${installdir}"

.private/ci-build.sh

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
set -e
44

55
builddir=
6+
scriptdir=$(dirname $(readlink -f "$0"))
67
install=no
8+
test=yes
9+
asan=yes
710

811
while [ $# -gt 0 ]; do
912
case "$1" in
@@ -19,6 +22,14 @@ while [ $# -gt 0 ]; do
1922
install=yes
2023
shift
2124
;;
25+
--no-test)
26+
test=no
27+
shift
28+
;;
29+
--no-asan)
30+
asan=no
31+
shift
32+
;;
2233
--)
2334
shift
2435
break;
@@ -52,14 +63,28 @@ cflags+=" -Wpointer-arith"
5263
cflags+=" -Wredundant-decls"
5364
cflags+=" -Wswitch-enum"
5465

66+
# enable address sanitizer
67+
if [ "${asan}" = "yes" ]; then
68+
cflags+=" -fsanitize=address"
69+
fi
70+
5571
echo ""
5672
echo "Configuring ..."
57-
CFLAGS="${cflags}" ../configure --enable-examples-build --enable-tests-build "$@"
73+
CFLAGS="${cflags}" CXXFLAGS="${cflags}" ../configure --enable-examples-build --enable-tests-build "$@"
5874

5975
echo ""
6076
echo "Building ..."
6177
make -j4 -k
6278

79+
if [ "${test}" = "yes" ]; then
80+
# Load custom shim for WebUSB tests that simulates Web environment.
81+
export NODE_OPTIONS="--require ${scriptdir}/../tests/webusb-test-shim/"
82+
if ! make check ; then
83+
cat tests/test-suite.log
84+
exit 1
85+
fi
86+
fi
87+
6388
if [ "${install}" = "yes" ]; then
6489
echo ""
6590
echo "Installing ..."

.private/ci-container-build.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ CFLAGS+=" -Wredundant-decls"
5050
CFLAGS+=" -Wswitch-enum"
5151
export CFLAGS
5252
53+
export CXXFLAGS="\${CFLAGS}"
54+
5355
echo ""
5456
echo "Configuring ..."
5557
/source/configure --enable-examples-build --enable-tests-build
@@ -61,11 +63,5 @@ make -j4 -k
6163
echo ""
6264
echo "Running umockdev tests ..."
6365
tests/umockdev
64-
65-
echo "Running stress tests ..."
66-
tests/stress
67-
tests/stress_mt
6866
EOG
6967
EOF
70-
71-

.private/wbs.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ o Additional information:
3939
http://windows.libusb.info/#Driver_Installation
4040
- The MinGW and MS generated DLLs are fully interchangeable, provided that you
4141
use the import libs provided or generate one from the .def also provided.
42-
- If you find any issue, please visit http://libusb.info/ and check the
42+
- If you find any issue, please visit https://libusb.info/ and check the
4343
Support section

AUTHORS

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,18 @@ Copyright © 2013-2018 Chris Dickens <[email protected]>
1313
Other contributors:
1414
Aaron Luft
1515
Adam Korcz
16+
Addison Crump
1617
Adrian Bunk
1718
Adrien Destugues
1819
Akshay Jaggi
1920
Alan Ott
2021
Alan Stern
2122
Aleksandr Mezin
23+
Alexander Mot
2224
Alexander Pyhalov
2325
Alexander Schlarb
2426
Alexander Stein
27+
Alex Feinman
2528
Alex Vatchenko
2629
Andrew Aldridge
2730
Andrew Fernandes
@@ -44,6 +47,7 @@ Bence Csokas
4447
Benjamin Berg
4548
Benjamin Dobell
4649
Bohdan Tymkiv
50+
Brad Smith
4751
Brent Rector
4852
Bruno Harbulot
4953
Carl Karsten
@@ -59,7 +63,9 @@ David Moore
5963
Dmitry Fleytman
6064
Dmitry Kostjuchenko
6165
Dmitry Zakablukov
66+
Dominik Boehi
6267
Doug Johnston
68+
Edgar Fuß
6369
Evan Hunter
6470
Evan Miller
6571
Fabrice Fontaine
@@ -68,6 +74,7 @@ Felipe Balbi
6874
Florian Albrechtskirchinger
6975
Francesco Montorsi
7076
Francisco Facioni
77+
Francis Hart
7178
Frank Li
7279
Frederik Carlier
7380
Freek Dijkstra
@@ -84,6 +91,7 @@ Ido Yariv
8491
Igor Anokhin
8592
Ihor Dutchak
8693
Ilya Konstantinov
94+
Ingvar Stepanyan
8795
Jakub Klama
8896
James Hanko
8997
Jeffrey Nichols
@@ -98,6 +106,7 @@ Joost Muller
98106
Josh Gao
99107
Joshua Blake
100108
Joshua Hou
109+
Joshua M. Clulow
101110
Juan Cruz Viotti
102111
Julian Scheel
103112
Justin Bischoff
@@ -112,11 +121,13 @@ Lars Wirzenius
112121
Lei Chen
113122
Léo Lam
114123
Liang Yunwang
124+
Lonnie Abelbeck
115125
Luca Longinotti
116126
Luz Paz
117127
Mac Wang
118128
Marco Trevisan (Treviño)
119129
Marcus Meissner
130+
Mario Kleiner
120131
Mark Kuo
121132
Markus Heidelberg
122133
Martin Ettl
@@ -136,20 +147,26 @@ Moritz Fischer
136147
Nancy Li
137148
Nia Alarie
138149
Nicholas Corgan
150+
Niklas Gürtler
139151
Omri Iluz
152+
Orhan aib Kavrakoglu
140153
Orin Eman
141154
Ozkan Sezer
155+
Pablo Prietz
142156
Patrick Stewart
143157
Paul Cercueil
144158
Paul Fertser
145159
Paul Qureshi
146160
Pekka Nikander
161+
Petr Pazourek
147162
Philémon Favrod
148163
Pino Toscano
149164
Rob Walker
150165
Romain Vimont
151166
Roman Kalashnikov
167+
Rosen Penev
152168
Ryan Hileman
169+
Ryan Metcalfe
153170
Ryan Schmidt
154171
Saleem Rashid
155172
Sameeh Jubran
@@ -158,13 +175,15 @@ Sebastian Pipping
158175
Sebastian von Ohr
159176
Sergey Serb
160177
Shawn Hoffman
178+
Simon Chan
161179
Simon Haggett
162180
Simon Newton
163181
Slash Gordon
164182
Stefan Agner
165183
Stefan Tauner
166184
Steinar H. Gunderson
167185
Stephen Groat
186+
Sylvain Fasel
168187
Theo Buehler
169188
Thomas Röfer
170189
Tim Hutt
@@ -187,6 +206,7 @@ William Orr
187206
William Skellenger
188207
Xiaofan Chen
189208
Yegor Yefremov
209+
Zeng Guang
190210
Zhiqiang Liu
191211
Zoltán Kovács
192212
Сергей Валерьевич
@@ -199,4 +219,6 @@ parafin
199219
RipleyTom
200220
Seneral
201221
saur0n
222+
SomeAlphabetGuy
202223
winterrace
224+
xloem

0 commit comments

Comments
 (0)