Attention is currently required from: foss(a)volatilesystems.org, Angel Pons.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/69309 )
Change subject: flashchips: Add support for XMC XM25QH128A.
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS1:
> Thought it might have been better to wait for clarity on the commit message before doing that, but I […]
Usually the rule of thumb is: if you mark comments as resolved, you need to upload new patchset which demonstrates that you indeed resolved the comments. Otherwise how do we know what you have in local repo? :)
Gerrit allows to view "incremental" diffs between patchsets, which can be very handy.
Also it is entirely normal to resolve some of the comments (not all of them), and for the remaining ones ask for clarification, not a problem!
--
To view, visit https://review.coreboot.org/c/flashrom/+/69309
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Iced40403c6694a55fd648ea2785cdcba21712234
Gerrit-Change-Number: 69309
Gerrit-PatchSet: 2
Gerrit-Owner: foss(a)volatilesystems.org
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: foss(a)volatilesystems.org
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Wed, 23 Nov 2022 23:07:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: foss(a)volatilesystems.org
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Felix Singer, Thomas Heijligen, Edward O'Callaghan, Evan Benn.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/69620 )
Change subject: tests: Convert selfcheck to unit tests
......................................................................
Patch Set 6:
(14 comments)
Commit Message:
https://review.coreboot.org/c/flashrom/+/69620/comment/34556d50_b100b020
PS6, Line 7: Convert
Replace Convert with Add.
We cannot convert selfcheck yet, so it stays. Unit tests are added.
File board_enable.c:
https://review.coreboot.org/c/flashrom/+/69620/comment/47182442_e17a34df
PS6, Line 2527: const size_t board_matches_size = ARRAY_SIZE(board_matches);
Why this can't be in the test code?
File tests/meson.build:
https://review.coreboot.org/c/flashrom/+/69620/comment/ae068992_f1013e8a
PS6, Line 25: well_formed
I would rename all occurrences of "well_formed" into "selfcheck": file names, test methods names etc etc (and don't forget the comments ;)).
The tests are verifying more than just tables being well formed, but also checking valid values in table rows.
And secondly "selfcheck" is almost like a brand name at this stage, so let's keep the name.
File tests/well_formed_tables.c:
https://review.coreboot.org/c/flashrom/+/69620/comment/82af0fc9_ef8cb9b5
PS6, Line 23: name
Maybe rename to prog_name?
https://review.coreboot.org/c/flashrom/+/69620/comment/c152b936_7196a5a1
PS6, Line 26: #assertion
I assume this would print "p is false" which can be confusing. I would add one more parameter to macro, string assertion_name and print that instead. Sp that you can pass "Programmer entry", "Programmer name" etc and have very clear error message.
I would like the error message be very clear to the developer without needing to look into test code. I am happy to have more code if this achieves clearer error messages for test failures.
https://review.coreboot.org/c/flashrom/+/69620/comment/2875c2c3_2c4943c0
PS6, Line 26: is false
is false or NULL
https://review.coreboot.org/c/flashrom/+/69620/comment/ab1dd362_20450fab
PS6, Line 24: do { \
: if (!(assertion)) \
: fail_msg(#assertion " is false for index:%zu name:%s", (index), \
: (name) ? (name) : "unknown"); \
: } while (0)
> I'm confused. Why is this a do-while? Is it really needed? It just runs one time.
I was also confused in the beginning, but then I thought this is probably a trick to avoid swallowing a semicolon https://gcc.gnu.org/onlinedocs/cpp/Swallowing-the-Semicolon.html
but I will let Evan tell us, because he knows for sure!
https://review.coreboot.org/c/flashrom/+/69620/comment/36cb8b6f_9afe64bb
PS6, Line 33: (void)state; /* unused */
Add a new line after `(void)state; /* unused */` and the same for all other test methods.
https://review.coreboot.org/c/flashrom/+/69620/comment/4ddce5ef_ade6c279
PS6, Line 41: if (strcmp("internal", p->name) != 0)
: assert_table(p->devs.note, i, p->name);
Original code has this check for all programmers with p->type == OTHER
Lets keep it as is.
https://review.coreboot.org/c/flashrom/+/69620/comment/6bb0f54d_c2ab5d9d
PS6, Line 51: assert_false(flashchips_size <= 1 || flashchips[flashchips_size - 1].name != NULL);
Break down into two `assert_true`s
https://review.coreboot.org/c/flashrom/+/69620/comment/6b3c7499_d4a6c5b7
PS6, Line 58: }
You missed `selfcheck_eraseblocks` functionality?
It can be one more test method
https://review.coreboot.org/c/flashrom/+/69620/comment/05e52b4e_75f24017
PS6, Line 66: assert_false(board_matches_size <= 1
: || board_matches[board_matches_size - 1].vendor_name != NULL);
Break down into two `assert_true`s
https://review.coreboot.org/c/flashrom/+/69620/comment/7b31618d_0053f817
PS6, Line 83: SKIP_TEST
Indent with tab
https://review.coreboot.org/c/flashrom/+/69620/comment/b5ae9e91_9298d757
PS6, Line 84: // CONFIG_INTERNAL
/* comment */
--
To view, visit https://review.coreboot.org/c/flashrom/+/69620
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I41cd014d9bf909296b6c28e3e00548e6883ff41a
Gerrit-Change-Number: 69620
Gerrit-PatchSet: 6
Gerrit-Owner: Evan Benn <evanbenn(a)google.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Evan Benn <evanbenn(a)google.com>
Gerrit-Comment-Date: Wed, 23 Nov 2022 23:02:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Felix Singer <felixsinger(a)posteo.net>
Gerrit-MessageType: comment
Attention is currently required from: Anastasia Klimchuk.
Alexander Goncharov has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/68755 )
Change subject: tests: add probe lifecycle test for ch341a_spi
......................................................................
Patch Set 4:
(1 comment)
File tests/ch341a_spi.c:
https://review.coreboot.org/c/flashrom/+/68755/comment/7f44c8c4_e85392e2
PS3, Line 26: /* Since the test transfers a data that fits in one CH341 packet, we
: don't need an array of these transfers (as is done in the driver code). */
> Please align with code style: https://www.flashrom.org/Development_Guidelines#Coding_style […]
Done
--
To view, visit https://review.coreboot.org/c/flashrom/+/68755
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I0a2d5591d097435fc69719e1d9bd153433425821
Gerrit-Change-Number: 68755
Gerrit-PatchSet: 4
Gerrit-Owner: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Comment-Date: Wed, 23 Nov 2022 14:28:47 +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: Alexander Goncharov.
Hello build bot (Jenkins), Anastasia Klimchuk,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/68755
to look at the new patch set (#4).
Change subject: tests: add probe lifecycle test for ch341a_spi
......................................................................
tests: add probe lifecycle test for ch341a_spi
This test upgrades mocks to simulate a read request. Read buffer
is populated with chip manufacture id and chip model id to emulate
successful probing.
TEST=ninja test
Change-Id: I0a2d5591d097435fc69719e1d9bd153433425821
Signed-off-by: Alexander Goncharov <chat(a)joursoir.net>
---
M tests/ch341a_spi.c
M tests/tests.c
M tests/tests.h
3 files changed, 63 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/55/68755/4
--
To view, visit https://review.coreboot.org/c/flashrom/+/68755
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I0a2d5591d097435fc69719e1d9bd153433425821
Gerrit-Change-Number: 68755
Gerrit-PatchSet: 4
Gerrit-Owner: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-MessageType: newpatchset
Attention is currently required from: Felix Singer, Thomas Heijligen, Anastasia Klimchuk.
Alexander Goncharov has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/67664 )
Change subject: tests: add basic lifecycle test for ch341a_spi
......................................................................
Patch Set 10:
(3 comments)
Commit Message:
https://review.coreboot.org/c/flashrom/+/67664/comment/a20cfcd9_72276b15
PS9, Line 8:
> If you could add test scenarios in commit message, that would be great. I know you run a few: […]
Done
File tests/libusb_wraps.c:
PS5:
> Looks like you are ready to split the patch?
Done
https://review.coreboot.org/c/flashrom/+/67664/comment/95bf28c4_9e03874b
PS5, Line 39: /* https://libusb.sourceforge.io/api-1.0/group__libusb__lib.html#ga5f8376b7a86… */
> I think the time has come, you can remove those
Done
--
To view, visit https://review.coreboot.org/c/flashrom/+/67664
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: If28fbe09ad685082152aa3a7e8d5a150169aee9e
Gerrit-Change-Number: 67664
Gerrit-PatchSet: 10
Gerrit-Owner: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Comment-Date: Wed, 23 Nov 2022 13:58:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Felix Singer <felixsinger(a)posteo.net>
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Comment-In-Reply-To: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-MessageType: comment
Attention is currently required from: Felix Singer, Thomas Heijligen, Alexander Goncharov.
Hello build bot (Jenkins), Thomas Heijligen, Anastasia Klimchuk,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/67664
to look at the new patch set (#10).
Change subject: tests: add basic lifecycle test for ch341a_spi
......................................................................
tests: add basic lifecycle test for ch341a_spi
TEST=the following scenarios run tests successfully
1) ch341a_spi is enabled
result: all tests run and pass, including ch341a
2) ch341a_spi is disabled
result: ch341a_spi test is skipped, the rest of tests run and pass
3) libusb isn't presented in the system
result: tests for usb programmers are skipped, the rest of tests run
normally
Change-Id: If28fbe09ad685082152aa3a7e8d5a150169aee9e
Signed-off-by: Alexander Goncharov <chat(a)joursoir.net>
---
M meson.build
A tests/ch341a_spi.c
M tests/tests.c
M tests/tests.h
M tests/usb_unittests.h
5 files changed, 120 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/64/67664/10
--
To view, visit https://review.coreboot.org/c/flashrom/+/67664
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: If28fbe09ad685082152aa3a7e8d5a150169aee9e
Gerrit-Change-Number: 67664
Gerrit-PatchSet: 10
Gerrit-Owner: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-MessageType: newpatchset
Attention is currently required from: Nikolai Artemiev.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/69846 )
Change subject: writeprotect.c: Split register value/mask calculation into pure func
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit https://review.coreboot.org/c/flashrom/+/69846
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I604478ecbb70392c5584bf5d87c76b6f20f882b1
Gerrit-Change-Number: 69846
Gerrit-PatchSet: 3
Gerrit-Owner: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Sergii Dmytruk <sergii.dmytruk(a)3mdeb.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Comment-Date: Wed, 23 Nov 2022 11:12:27 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment