Attention is currently required from: Peter Marheine.
5 comments:
File tests/init_shutdown.c:
Patch Set #2, Line 307: 0x10ec
This number has some meaning, also I see it is used in other mocks, so surely it is important. Could you please add a short comment here on what this is? Does it have to be exactly this number, or any number, but the same in all mocks? Maybe it can be #define REALTEK_MOCK_FD ?
Patch Set #2, Line 319: printf("ioctl(0x10ec, I2C_SLAVE, %#lx)\n", addr);
This looks like a debugging statement, not sure we need it. Wrap invocations log themselves already (that first line LOG_ME does it), which should be sufficient for a normal situation, when tests pass.
Same for the rest of printf, let's remove. I use them a lot when writing a test, but once test is ready that would just make log larger.
(and when tests fail that would be a more targeted debugging anyway).
For future, if I discover a way to tune verbosity level in cmocka, we may add debug-only messages.
This number also needs a comment
printf("i2c set register address %#x\n", bytes_buf[0]);
return 1;
If you remove printf statements, this looks like one error path which returns -1 and one normal path which returns sz?
typo
To view, visit change 56911. To unsubscribe, or for help writing mail filters, visit settings.