Attention is currently required from: Edward O'Callaghan, Angel Pons, Anastasia Klimchuk. Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/57917 )
Change subject: tests: Add wrap for libusb_init and use it in dediprog test ......................................................................
Patch Set 3:
(1 comment)
Commit Message:
https://review.coreboot.org/c/flashrom/+/57917/comment/52440bc7_74c27d95 PS3, Line 15: real libusb_init
That would be ideal, for the tests not to know of existence of libusb.h. […]
Actually, there are two things: 1. `libusb.h`, we can either use the original or write our own. 2. If we use the original, we can choose to link against libusb.
The latter is controlled by meson. `flashrom_test_dep` includes `deps` which contains libusb. Not sure if that was thought through.
If we wouldn't link to libusb, there'd be nothing to wrap. We could just provide our own mock functions without any tricks.
If we don't want to use the original `libusb.h`, we can just put our own into `tests/libusb.h`. Might need some adjustment to meson so it's found. However, I don't see the reason not to use the original yet.