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/+/51487 )
Change subject: Add unit test to run init/shutdown for enabled drivers
......................................................................
Patch Set 2:
(5 comments)
Patchset:
PS2:
> Hello my reviewers and cc! What do people think of the latest version that has mocks in a separate c […]
Please split and thanks for the patience!
The dummyflasher change, for instance can be submitted without any hassle.
Splitting `hwaccess.h` can be its own commit, and the introduction of LOG_ME()
likewise. The former can be tested by comparing binaries.
File hwaccess_io_unittest.h:
PS2:
Move into `tests/`?
https://review.coreboot.org/c/flashrom/+/51487/comment/a471b70b_c2835431
PS2, Line 24: #ifndef __HWACCESS_IO_H__
Maybe leave a comment that we intentionally use the same guard.
File tests/meson.build:
https://review.coreboot.org/c/flashrom/+/51487/comment/a873de2a_fd0fe161
PS2, Line 36: '-Wl,--wrap=test_outb',
: '-Wl,--wrap=test_inb',
: '-Wl,--wrap=test_outw',
: '-Wl,--wrap=test_inw',
: '-Wl,--wrap=test_outl',
: '-Wl,--wrap=test_inl',
I guess as these are not implemented anywhere, we don't need to "wrap"
them? i.e. without these lines and s/__wrap_test_/test_/ in `tests.c`,
I'd expect it to work too.
We could leave it as is though, for uniformity.
File tests/tests.c:
https://review.coreboot.org/c/flashrom/+/51487/comment/5975699b_4353155c
PS2, Line 99: : 0));
This can get quite complex when additional tests are added. We can
figure that out later, though.
--
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: 2
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Comment-Date: Fri, 16 Apr 2021 17:03:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Edward O'Callaghan, Daniel Campello.
Jack Rosenthal has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/52383 )
Change subject: flashrom.c: allow - as filename for stdin/stdout
......................................................................
Patch Set 8: Code-Review+1
--
To view, visit https://review.coreboot.org/c/flashrom/+/52383
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I97889cfdf7ba9a257e182c4ee2b20075cfa58d4d
Gerrit-Change-Number: 52383
Gerrit-PatchSet: 8
Gerrit-Owner: Daniel Campello <campello(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Jack Rosenthal <jrosenth(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Daniel Campello <campello(a)chromium.org>
Gerrit-Comment-Date: Fri, 16 Apr 2021 15:16:57 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Jack Rosenthal.
Daniel Campello has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/52383 )
Change subject: flashrom.c: allow - as filename for stdin/stdout
......................................................................
Patch Set 7:
(1 comment)
File cli_classic.c:
https://review.coreboot.org/c/flashrom/+/52383/comment/2913d44b_7ce25170
PS7, Line 152: (argv[optind][0] != '-' || argv[optind][1] == '\0')
> this is still confusing to read, imo […]
Done
--
To view, visit https://review.coreboot.org/c/flashrom/+/52383
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I97889cfdf7ba9a257e182c4ee2b20075cfa58d4d
Gerrit-Change-Number: 52383
Gerrit-PatchSet: 7
Gerrit-Owner: Daniel Campello <campello(a)chromium.org>
Gerrit-Reviewer: Jack Rosenthal <jrosenth(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Jack Rosenthal <jrosenth(a)chromium.org>
Gerrit-Comment-Date: Fri, 16 Apr 2021 15:13:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Jack Rosenthal <jrosenth(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Daniel Campello.
Hello build bot (Jenkins), Jack Rosenthal,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/52383
to look at the new patch set (#8).
Change subject: flashrom.c: allow - as filename for stdin/stdout
......................................................................
flashrom.c: allow - as filename for stdin/stdout
Allows - as filename for -r/-w/-v options
Signed-off-by: Daniel Campello <campello(a)chromium.org>
Change-Id: I97889cfdf7ba9a257e182c4ee2b20075cfa58d4d
---
M cli_classic.c
M flashrom.c
2 files changed, 25 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/83/52383/8
--
To view, visit https://review.coreboot.org/c/flashrom/+/52383
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I97889cfdf7ba9a257e182c4ee2b20075cfa58d4d
Gerrit-Change-Number: 52383
Gerrit-PatchSet: 8
Gerrit-Owner: Daniel Campello <campello(a)chromium.org>
Gerrit-Reviewer: Jack Rosenthal <jrosenth(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Daniel Campello <campello(a)chromium.org>
Gerrit-MessageType: newpatchset
Attention is currently required from: Daniel Campello.
Jack Rosenthal has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/52383 )
Change subject: flashrom.c: allow - as filename for stdin/stdout
......................................................................
Patch Set 7: Code-Review+1
(1 comment)
File cli_classic.c:
https://review.coreboot.org/c/flashrom/+/52383/comment/5704f738_ce1d4569
PS7, Line 152: (argv[optind][0] != '-' || argv[optind][1] == '\0')
this is still confusing to read, imo
can you add to the comment above on line 150:
... however, - is treated as stdin/stdout, so we still strdup in this case
--
To view, visit https://review.coreboot.org/c/flashrom/+/52383
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I97889cfdf7ba9a257e182c4ee2b20075cfa58d4d
Gerrit-Change-Number: 52383
Gerrit-PatchSet: 7
Gerrit-Owner: Daniel Campello <campello(a)chromium.org>
Gerrit-Reviewer: Jack Rosenthal <jrosenth(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Daniel Campello <campello(a)chromium.org>
Gerrit-Comment-Date: Fri, 16 Apr 2021 15:08:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Jack Rosenthal.
Daniel Campello has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/52383 )
Change subject: flashrom.c: allow - as filename for stdin/stdout
......................................................................
Patch Set 6:
(6 comments)
File cli_classic.c:
https://review.coreboot.org/c/flashrom/+/52383/comment/0af01bf2_389c669a
PS6, Line 152: (argv[optind][0] != '-' || argv[optind][1] == '\0')
> !strcmp(argv[optind], "-") would be slightly easier to read, IMO
This is meant to say "and arg[v] does not start with - or if it does it is only '-'" as if it is -something then it is another flag...
File flashrom.c:
https://review.coreboot.org/c/flashrom/+/52383/comment/db1cc690_f572ae48
PS6, Line 1351: strncmp(filename, "-", sizeof("-")))
> strncmp here is analagous to "starts with" […]
strncmp is considered safer but in this case I think strcmp is fine...
https://review.coreboot.org/c/flashrom/+/52383/comment/8b91dd90_eb0490f7
PS6, Line 1352: fdopen(STDIN_FILENO, "rb")
> stdin
fileno(stdin)
https://review.coreboot.org/c/flashrom/+/52383/comment/af074596_492314a6
PS6, Line 1367: (strncmp(filename, "-", sizeof("-"))))
> same comment as above
Done
https://review.coreboot.org/c/flashrom/+/52383/comment/b9542348_17bea525
PS6, Line 1444: trncmp(filename, "-", sizeof("-")))
> ditto, I don't think we want all files that start with - to act this way
Ack
https://review.coreboot.org/c/flashrom/+/52383/comment/95bce580_6876143d
PS6, Line 1445: fdopen(STDOUT_FILENO, "wb")
> stdout
fileno(stdout)
--
To view, visit https://review.coreboot.org/c/flashrom/+/52383
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I97889cfdf7ba9a257e182c4ee2b20075cfa58d4d
Gerrit-Change-Number: 52383
Gerrit-PatchSet: 6
Gerrit-Owner: Daniel Campello <campello(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Jack Rosenthal <jrosenth(a)chromium.org>
Gerrit-Attention: Jack Rosenthal <jrosenth(a)chromium.org>
Gerrit-Comment-Date: Fri, 16 Apr 2021 14:56:25 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Jack Rosenthal <jrosenth(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Daniel Campello.
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/52383
to look at the new patch set (#7).
Change subject: flashrom.c: allow - as filename for stdin/stdout
......................................................................
flashrom.c: allow - as filename for stdin/stdout
Allows - as filename for -r/-w/-v options
Signed-off-by: Daniel Campello <campello(a)chromium.org>
Change-Id: I97889cfdf7ba9a257e182c4ee2b20075cfa58d4d
---
M cli_classic.c
M flashrom.c
2 files changed, 22 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/83/52383/7
--
To view, visit https://review.coreboot.org/c/flashrom/+/52383
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I97889cfdf7ba9a257e182c4ee2b20075cfa58d4d
Gerrit-Change-Number: 52383
Gerrit-PatchSet: 7
Gerrit-Owner: Daniel Campello <campello(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Jack Rosenthal <jrosenth(a)chromium.org>
Gerrit-Attention: Daniel Campello <campello(a)chromium.org>
Gerrit-MessageType: newpatchset