Attention is currently required from: Alexander Goncharov, Anton Samsonov, Anton Samsonov.
Hello Alexander Goncharov, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/77089?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by build bot (Jenkins)
Change subject: Remove dependency on C23 __has_include()
......................................................................
Remove dependency on C23 __has_include()
Use build system to check header presence:
* getopt.h (from include/cli_classic.h)
* pciutils/pci.h (from include/platform/pci.h)
Change-Id: Ic544963ffd29626ae0a21bdddb1c78850cc43ec6
Signed-off-by: Anton Samsonov <devel(a)zxlab.ru>
---
M Makefile
M include/cli_classic.h
M include/platform/pci.h
M meson.build
4 files changed, 30 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/89/77089/2
--
To view, visit https://review.coreboot.org/c/flashrom/+/77089?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ic544963ffd29626ae0a21bdddb1c78850cc43ec6
Gerrit-Change-Number: 77089
Gerrit-PatchSet: 2
Gerrit-Owner: Anton Samsonov <devel(a)zxlab.ru>
Gerrit-Reviewer: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-CC: Anton Samsonov <avscomputing(a)gmail.com>
Gerrit-Attention: Anton Samsonov <avscomputing(a)gmail.com>
Gerrit-Attention: Anton Samsonov <devel(a)zxlab.ru>
Gerrit-Attention: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-MessageType: newpatchset
Attention is currently required from: Aarya, Edward O'Callaghan, Nikolai Artemiev, Simon Buhrow, Thomas Heijligen.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/67535?usp=email )
Change subject: tests: Unit tests for erase function selection algo
......................................................................
Patch Set 12:
(7 comments)
File tests/erase_func_algo.c:
https://review.coreboot.org/c/flashrom/+/67535/comment/0dd3ff16_b0c85758 :
PS3, Line 238: void **state
> `g_state` should probably be passed in here.
I will check cmocka docs how to do it, keep this unresolved for now.
https://review.coreboot.org/c/flashrom/+/67535/comment/980322b7_b84ad064 :
PS3, Line 282: uint8_t *const newcontents = malloc(MIN_BUF_SIZE);
> `uint8_t newcontents[MIN_BUF_SIZE];`
Done
https://review.coreboot.org/c/flashrom/+/67535/comment/4b751c86_d6323045 :
PS3, Line 291: n
> `&n`
Done
https://review.coreboot.org/c/flashrom/+/67535/comment/00fcf985_b2dfe629 :
PS3, Line 294: n
> `&n`
Done
https://review.coreboot.org/c/flashrom/+/67535/comment/c6e8a2a4_36d8898e :
PS3, Line 313:
: free(newcontents);
> drops lines 313&&314.
Done
File tests/erase_func_algo.c:
https://review.coreboot.org/c/flashrom/+/67535/comment/6a05e0ce_4789b28f :
PS5, Line 37: uint8_t buf[MOCK_CHIP_SIZE]; /* Contents of the mock chip. */
> Can buf be moved into struct all_state?
Yes! I did it.
But I wanted to clarify about:
> Then the test_case struct will only contain test parameters and can be const.
What exactly do you mean?
https://review.coreboot.org/c/flashrom/+/67535/comment/4a3060f6_79358ac8 :
PS5, Line 501: memcmp
> This should probably be`!memcmp(... […]
Yes, makes sense. I changed so that now all three
chip_erased
eraseblocks_in_order
eraseblocks_invocations
mean what their names mean.
However `!` has now moved further below, because I still need the final result to be 0 for success. But hope that's fine.
--
To view, visit https://review.coreboot.org/c/flashrom/+/67535?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I8f3fdefb76e71f6f8dc295d9dead5f38642aace7
Gerrit-Change-Number: 67535
Gerrit-PatchSet: 12
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Simon Buhrow
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-CC: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Attention: Simon Buhrow
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Comment-Date: Mon, 11 Sep 2023 12:20:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Edward O'Callaghan <quasisec(a)chromium.org>
Comment-In-Reply-To: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-MessageType: comment
Attention is currently required from: Aarya, Simon Buhrow, Thomas Heijligen.
Hello Aarya, Edward O'Callaghan, Simon Buhrow, Thomas Heijligen, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/67535?usp=email
to look at the new patch set (#12).
The following approvals got outdated and were removed:
Verified+1 by build bot (Jenkins)
Change subject: tests: Unit tests for erase function selection algo
......................................................................
tests: Unit tests for erase function selection algo
The test checks that algorithm for erase functions selection
works and there are no regressions.
Specifically, test contains a number of test cases (14 at the
time of writing, but more can be added). Each case initialises a
given initial state of the memory for the mock chip, and layout
regions on the chip, and then performs erase and write operations.
At the end of operation, test asserts the following:
- the state of mock chip memory is as expected, i.e. properly erased
or written
- erase blocks are invoked in expected order and expected number
of them
- chip operation (erase or write) returned 0.
Change-Id: I8f3fdefb76e71f6f8dc295d9dead5f38642aace7
Signed-off-by: Anastasia Klimchuk <aklm(a)flashrom.org>
---
A tests/erase_func_algo.c
M tests/meson.build
M tests/tests.c
M tests/tests.h
4 files changed, 609 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/35/67535/12
--
To view, visit https://review.coreboot.org/c/flashrom/+/67535?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I8f3fdefb76e71f6f8dc295d9dead5f38642aace7
Gerrit-Change-Number: 67535
Gerrit-PatchSet: 12
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Simon Buhrow
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-CC: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Attention: Simon Buhrow
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Aarya, Edward O'Callaghan.
Hello Aarya, Edward O'Callaghan, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/77747?usp=email
to look at the new patch set (#3).
Change subject: erasure_layout: Fix double invocation of erasers
......................................................................
erasure_layout: Fix double invocation of erasers
Erasefn was invoked over the same block of memory twice.
Change-Id: I92351eba0fd29114ce98b4a839358e92d176af28
Signed-off-by: Anastasia Klimchuk <aklm(a)flashrom.org>
---
M erasure_layout.c
1 file changed, 14 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/47/77747/3
--
To view, visit https://review.coreboot.org/c/flashrom/+/77747?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I92351eba0fd29114ce98b4a839358e92d176af28
Gerrit-Change-Number: 77747
Gerrit-PatchSet: 3
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Aarya, Simon Buhrow, Thomas Heijligen.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/67535?usp=email )
Change subject: tests: Unit tests for erase function selection algo
......................................................................
Patch Set 11:
(1 comment)
Patchset:
PS8:
> I started implementing assertions for expected order of erase blocks invocations, and discovered tha […]
Finished the assertions for expected order of erase blocks invocations.
I created one more patch (CB:77747) as an attempt to fix double invocations, comments welcome.
I will fix the rest of the comments in the next patchset.
--
To view, visit https://review.coreboot.org/c/flashrom/+/67535?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I8f3fdefb76e71f6f8dc295d9dead5f38642aace7
Gerrit-Change-Number: 67535
Gerrit-PatchSet: 11
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Simon Buhrow
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-CC: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Attention: Simon Buhrow
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Comment-Date: Sun, 10 Sep 2023 14:02:25 +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: Aarya, Edward O'Callaghan.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/77747?usp=email )
Change subject: [WIP] Fix double invocation of erasers
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
This is my attempt to fix the double invocation of every eraser, what do you think about it? I am not sure this is a perfect way, really interested in your thoughts.
The issue was: every eraser called twice. This would not be obvious in the real run of flashrom, because at the end the chip is erased and the memory state is correct. But in the test (see next patch CB:67535) I am verifying erasers are called in correct order and the test is recording all invocations, and that's how I discovered the double invocations.
--
To view, visit https://review.coreboot.org/c/flashrom/+/77747?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I92351eba0fd29114ce98b4a839358e92d176af28
Gerrit-Change-Number: 77747
Gerrit-PatchSet: 2
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Comment-Date: Sun, 10 Sep 2023 13:59:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Aarya.
Hello Aarya,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/77747?usp=email
to look at the new patch set (#2).
Change subject: [WIP] Fix double invocation of erasers
......................................................................
[WIP] Fix double invocation of erasers
Change-Id: I92351eba0fd29114ce98b4a839358e92d176af28
Signed-off-by: Anastasia Klimchuk <aklm(a)flashrom.org>
---
M erasure_layout.c
1 file changed, 14 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/47/77747/2
--
To view, visit https://review.coreboot.org/c/flashrom/+/77747?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I92351eba0fd29114ce98b4a839358e92d176af28
Gerrit-Change-Number: 77747
Gerrit-PatchSet: 2
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Attention: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Aarya, Simon Buhrow, Thomas Heijligen.
Hello Aarya, Edward O'Callaghan, Simon Buhrow, Thomas Heijligen, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/67535?usp=email
to look at the new patch set (#10).
The following approvals got outdated and were removed:
Verified+1 by build bot (Jenkins)
Change subject: tests: Unit tests for erase function selection algo
......................................................................
tests: Unit tests for erase function selection algo
The test checks that algorithm for erase functions selection
works and there are no regressions.
Specifically, test contains a number of test cases (14 at the
time of writing, but more can be added). Each case initialises a
given initial state of the memory for the mock chip, and layout
regions on the chip, and then performs erase and write operations.
At the end of operation, test asserts the following:
- the state of mock chip memory is as expected, i.e. properly erased
or written
- erase blocks are invoked in expected order and expected number
of them
- chip operation (erase or write) returned 0.
Change-Id: I8f3fdefb76e71f6f8dc295d9dead5f38642aace7
Signed-off-by: Anastasia Klimchuk <aklm(a)flashrom.org>
---
A tests/erase_func_algo.c
M tests/meson.build
M tests/tests.c
M tests/tests.h
4 files changed, 611 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/35/67535/10
--
To view, visit https://review.coreboot.org/c/flashrom/+/67535?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I8f3fdefb76e71f6f8dc295d9dead5f38642aace7
Gerrit-Change-Number: 67535
Gerrit-PatchSet: 10
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Simon Buhrow
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-CC: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Attention: Simon Buhrow
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Alexander Goncharov, Anton Samsonov, Anton Samsonov.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/77089?usp=email )
Change subject: Remove dependency on C23 __has_include()
......................................................................
Patch Set 1:
(1 comment)
File include/cli_classic.h:
https://review.coreboot.org/c/flashrom/+/77089/comment/da0c1e4b_a9ffa4f9 :
PS1, Line 18: #if HAVE_GETOPT_H
: #include <getopt.h>
: #elif !defined(HAVE_GETOPT_H)
: #if !defined(__has_include) && (__STDC_VERSION__ < 202300L)
: #include <getopt.h>
: #define HAVE_GETOPT_H 1
: #elif __has_include(<getopt.h>)
: #include <getopt.h>
: #define HAVE_GETOPT_H 1
: #else
: #define HAVE_GETOPT_H 0
: #endif /* __has_include() */
: #endif /* HAVE_GETOPT_H */
:
: #if !HAVE_GETOPT_H
> Our and coreboot code styles say nothing about directives. […]
Sorry it took me some time to get to this patch.
It's hard to read yes, but I suspect 15 lines of pre-processor would be hard to read anyway :\ I would be so happy to remove pre-processor altogether, as I said in my other comment.
With or without style guide, I would first try to resolve this with build system.
--
To view, visit https://review.coreboot.org/c/flashrom/+/77089?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ic544963ffd29626ae0a21bdddb1c78850cc43ec6
Gerrit-Change-Number: 77089
Gerrit-PatchSet: 1
Gerrit-Owner: Anton Samsonov <devel(a)zxlab.ru>
Gerrit-Reviewer: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-CC: Anton Samsonov <avscomputing(a)gmail.com>
Gerrit-Attention: Anton Samsonov <avscomputing(a)gmail.com>
Gerrit-Attention: Anton Samsonov <devel(a)zxlab.ru>
Gerrit-Attention: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Comment-Date: Fri, 08 Sep 2023 11:00:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-MessageType: comment