Attention is currently required from: Anastasia Klimchuk. Peter Marheine has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/56911 )
Change subject: tests: add init_shutdown test for realtek_mst_i2c_spi ......................................................................
Patch Set 2:
(7 comments)
File tests/init_shutdown.c:
https://review.coreboot.org/c/flashrom/+/56911/comment/db94d22d_08b304de PS1, Line 302: #include <fcntl.h> : #include <linux/i2c-dev.h>
Tests should be as lightweight and independent as possible, they only thing to check is CONFIG_REALT […]
Done
https://review.coreboot.org/c/flashrom/+/56911/comment/bb3ee746_c289f31c PS1, Line 364: io_mock_register(&realtek_mst_io);
You need to unregister at the end, […]
Done
File tests/tests.c:
https://review.coreboot.org/c/flashrom/+/56911/comment/373fcab8_07027324 PS1, Line 93: if (current_io->open64) : return current_io->open64(current_io->state, pathname, flags); : if (current_io->open) : return current_io->open(current_io->state, pathname, flags);
Why do you put both open and open64 into one wrap? There is a dedicated wrap for open, so […]
The intent is to have open64 delegate to open because I expect users mostly won't care about the difference, but neglected to implement the latter. Moved the open() part to __wrap_open and made __wrap_open64 delegate to it.
https://review.coreboot.org/c/flashrom/+/56911/comment/e27d85d2_55315429 PS1, Line 120: return -1;
Default behaviour for our wraps is "do nothing, pretend everything is successful". […]
Done
https://review.coreboot.org/c/flashrom/+/56911/comment/ff623a2b_3ab106d1 PS1, Line 127: return current_io->read(current_io->state, fd, buf, sz);
We are following Linux kernel coding style https://git.kernel. […]
Neglected to reformat this file but did the other one. Fixed.
https://review.coreboot.org/c/flashrom/+/56911/comment/3a534342_e08bd9c4 PS1, Line 128: return -1;
Same here, you need to return value which means success.
Done
https://review.coreboot.org/c/flashrom/+/56911/comment/8dd198a5_8635858c PS1, Line 345: cmocka_unit_test
Same thing, indentations should be 8 chars
Done