Skip to content

Commit

Permalink
tests/stress_mt: ignore errors in threads for checking device counts
Browse files Browse the repository at this point in the history
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
  • Loading branch information
sonatique committed Jan 24, 2024
1 parent 0929a2b commit c6b01b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/stress_mt.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ static int test_multi_init(int enumerate)
tinfo[t].number,
tinfo[t].iteration,
libusb_error_name(tinfo[t].err));
} else if (enumerate) {
}
if (enumerate) {
if (t > 0 && tinfo[t].devcount != last_devcount) {
devcount_mismatch++;
printf("Device count mismatch: Thread %d discovered %ld devices instead of %ld\n",
Expand Down

0 comments on commit c6b01b7

Please sign in to comment.