Change in flashrom[master]: tests: Add unit test to run init/shutdown for mec1308.c, ene_lpc.c

Attention is currently required from: Nico Huber, Edward O'Callaghan, Angel Pons, Simon Glass. Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/51487 ) Change subject: tests: Add unit test to run init/shutdown for mec1308.c, ene_lpc.c ...................................................................... Patch Set 10: (1 comment) File tests/init_shutdown.c: https://review.coreboot.org/c/flashrom/+/51487/comment/d0246473_9c4eb258 PS10, Line 53: MEC1308_SIO_PORT1
OK. […] Nico, Simon, thank you so much for this conversation, really useful for me to read! I can understand both approaches, but I am taking the side of leaving #defines in the driver code where they are (especially because I was on that side from the beginning).
This point I think is really important:
Pulling such definitions out of their compilation unit makes it easier to write tests I suppose. But it also makes it harder to read/review the code. I don't want to make it harder to read/review the code. For tests, I can address read/review with comments like 0x20 /* MEC1308_DEVICE_ID_REG */
Also, how often those values change, for a given chip? Is it ~never? Please correct me if I am wrong. Another thing I want to say about
I don't think we should be afraid to modify the code as needed for tests. Not afraid, but need to be very very careful. It is like walking on ice...
-- To view, visit https://review.coreboot.org/c/flashrom/+/51487 To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings Gerrit-Project: flashrom Gerrit-Branch: master Gerrit-Change-Id: I3af612defe1af3850dfc1626a208d873e3a3eddc Gerrit-Change-Number: 51487 Gerrit-PatchSet: 10 Gerrit-Owner: Anastasia Klimchuk <aklm@chromium.org> Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com> Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org> Gerrit-Reviewer: Nico Huber <nico.h@gmx.de> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> Gerrit-CC: Paul Menzel <paulepanter@mailbox.org> Gerrit-CC: Simon Glass <sjg@chromium.org> Gerrit-Attention: Nico Huber <nico.h@gmx.de> Gerrit-Attention: Edward O'Callaghan <quasisec@chromium.org> Gerrit-Attention: Angel Pons <th3fanbus@gmail.com> Gerrit-Attention: Simon Glass <sjg@chromium.org> Gerrit-Comment-Date: Tue, 04 May 2021 23:23:13 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: Nico Huber <nico.h@gmx.de> Comment-In-Reply-To: Anastasia Klimchuk <aklm@chromium.org> Comment-In-Reply-To: Simon Glass <sjg@chromium.org> Gerrit-MessageType: comment
participants (1)
-
Anastasia Klimchuk (Code Review)