martinpitt / umockdev

Mock hardware devices for creating unit tests and bug reporting
https://launchpad.net/umockdev
GNU Lesser General Public License v2.1
308 stars 55 forks source link

Increase uevent_sender_send() buffer size #168

Closed wmww closed 2 years ago

wmww commented 2 years ago

Hacky fix for #167

martinpitt commented 2 years ago

This fails expectedly, as this now fails the test that checks for overflows:

# child process (/umockdev-testbed/uevent/action_overflow [1477]) stderr: "**\nERROR:../tests/test-umockdev.c:850:t_testbed_uevent_action_overflow: child process (/umockdev-testbed/uevent/action_overflow [1480]) did not fail as expected\n"
Bail out! ERROR:../tests/test-umockdev.c:851:t_testbed_uevent_action_overflow: stderr of child process (/umockdev-testbed/uevent/action_overflow [1477]) failed to match: *uevent_sender_send*Property buffer overflow*

If you need longer properties for Mir, I'm happy to adjust the size, of course. But (1) I'd like to first track down the buffer overflow and catch it in this test (as obviously it currently doesn't spot the error), and (2) adjust that test along with the bigger buffer so that it still makes sense.

martinpitt commented 2 years ago

Replaced with #170. Thanks, and sorry for the trouble!

After this lands, and after I fix #169, I'll do a new release (today still).