Skip to content

Commit 4396c77

Browse files
committed
tests/stress_mt: ignore errors in threads for checking device counts
This fixes an issue where an error that occurred in thread #X will create a false error message stating that thread #X+1 did not discover the correct number of devices Closes libusb#1447
1 parent a790a6d commit 4396c77

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

libusb/version_nano.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
#define LIBUSB_NANO 11961
1+
#define LIBUSB_NANO 11963

tests/stress_mt.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ static int test_multi_init(int enumerate)
230230
tinfo[t].number,
231231
tinfo[t].iteration,
232232
libusb_error_name(tinfo[t].err));
233-
} else if (enumerate) {
233+
}
234+
if (enumerate) {
234235
if (t > 0 && tinfo[t].devcount != last_devcount) {
235236
devcount_mismatch++;
236237
printf("Device count mismatch: Thread %d discovered %ld devices instead of %ld\n",

0 commit comments

Comments
 (0)