Attention is currently required from: Felix Singer, Thomas Heijligen, Anastasia Klimchuk, Peter Marheine.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/67310 )
Change subject: tests: Use MOCK_FD instead of NON_ZERO for file operations
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://review.coreboot.org/c/flashrom/+/67310
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I097dd59f69c3fb532ac136796fcf5cae8839af7b
Gerrit-Change-Number: 67310
Gerrit-PatchSet: 1
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Idwer Vollering <vidwer(a)gmail.com>
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-Attention: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Comment-Date: Fri, 02 Sep 2022 08:28:30 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Felix Singer.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/67269 )
Change subject: MAINTAINERS: Add Felix Singer for test_build.sh
......................................................................
Patch Set 3:
(1 comment)
File MAINTAINERS:
https://review.coreboot.org/c/flashrom/+/67269/comment/a8b6eef7_808ab162
PS3, Line 145: TEST
> implications related to the purpose.
The real name is "build with tests script" but it's probably too long :)
"test build" sounds as if it is not a real build. Yes I think the name of file is not ideal too.
Maybe DEV BUILD SCRIPT?
--
To view, visit https://review.coreboot.org/c/flashrom/+/67269
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I36267e6c080b14e90e820d3e26abaefe642f9c65
Gerrit-Change-Number: 67269
Gerrit-PatchSet: 3
Gerrit-Owner: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: 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-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Comment-Date: Fri, 02 Sep 2022 07:52:08 +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>
Gerrit-MessageType: comment
Anastasia Klimchuk has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/67312 )
Change subject: tests: Add workaround to allow tests mock fileno on FreeBSD
......................................................................
tests: Add workaround to allow tests mock fileno on FreeBSD
fileno can be a function and a macro in FreeBSD, depending on whether
the environment in multi-threaded or single-threaded. For single
thread, macro is used. Macro is expanded into a inline code which
accesses private field of file descriptor. This is impossible to
mock in tests.
Pretending that environment is multi-threaded makes fileno function
to be called instead of a macro. Function can be mocked for tests.
Change-Id: I3789ea9107a4cf8033cf59bb96d3c82aa58de026
Signed-off-by: Anastasia Klimchuk <aklm(a)chromium.org>
---
M tests/chip.c
1 file changed, 35 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/12/67312/1
diff --git a/tests/chip.c b/tests/chip.c
index 6f03172..7b2bd82 100644
--- a/tests/chip.c
+++ b/tests/chip.c
@@ -131,6 +131,17 @@
/* Assignment below normally happens while probing, but this test is not probing. */
flashctx->mst = ®istered_masters[0];
printf("done\n");
+
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+ /*
+ * Pretending to be a multithreaded environment so that `fileno`
+ * is called as a function (and not as a macro).
+ * fileno macro in FreeBSD is expanded into inline access of
+ * private field of file descriptor, which is impossible to mock.
+ * Calling fileno as a function allows the test to mock it.
+ */
+ __isthreaded = 1;
+#endif
}
static void teardown(struct flashrom_layout **layout)
@@ -144,6 +155,11 @@
printf("done\n");
io_mock_register(NULL);
+
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+ /* Restoring the state, see comment in setup_chip. */
+ __isthreaded = 0;
+#endif
}
static const struct flashchip chip_8MiB = {
--
To view, visit https://review.coreboot.org/c/flashrom/+/67312
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I3789ea9107a4cf8033cf59bb96d3c82aa58de026
Gerrit-Change-Number: 67312
Gerrit-PatchSet: 1
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: newchange
Anastasia Klimchuk has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/67310 )
Change subject: tests: Use MOCK_FD instead of NON_ZERO for file operations
......................................................................
tests: Use MOCK_FD instead of NON_ZERO for file operations
NON_ZERO can be a negative number, so MOCK_FD is safer option to
use as a mock file descriptor. Also it is more readable.
Change-Id: I097dd59f69c3fb532ac136796fcf5cae8839af7b
Signed-off-by: Anastasia Klimchuk <aklm(a)chromium.org>
---
M tests/tests.c
1 file changed, 15 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/10/67310/1
diff --git a/tests/tests.c b/tests/tests.c
index 2994c02..f6b4df1 100644
--- a/tests/tests.c
+++ b/tests/tests.c
@@ -24,7 +24,7 @@
void *not_null(void)
{
- return (void *)NON_ZERO;
+ return (void *)MOCK_FD;
}
/* Workaround for https://github.com/clibs/cmocka/issues/17 */
@@ -253,7 +253,7 @@
int __wrap_fileno(FILE *fp)
{
LOG_ME;
- return NON_ZERO;
+ return MOCK_FD;
}
int __wrap_fsync(int fd)
--
To view, visit https://review.coreboot.org/c/flashrom/+/67310
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I097dd59f69c3fb532ac136796fcf5cae8839af7b
Gerrit-Change-Number: 67310
Gerrit-PatchSet: 1
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: newchange
Attention is currently required from: Nico Huber, Anastasia Klimchuk, Nikolai Artemiev.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/66654 )
Change subject: tree: Change signature of extract_programmer_param_str()
......................................................................
Patch Set 3:
(1 comment)
File include/programmer.h:
https://review.coreboot.org/c/flashrom/+/66654/comment/852fcf3b_9d700f19
PS3, Line 34: };
> I guess the full definition won't be needed as part of the API. […]
Good idea, done.
--
To view, visit https://review.coreboot.org/c/flashrom/+/66654
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I781a328fa280e0a9601050dd99a75af72c39c899
Gerrit-Change-Number: 66654
Gerrit-PatchSet: 3
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Comment-Date: Fri, 02 Sep 2022 02:11:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber <nico.h(a)gmx.de>
Gerrit-MessageType: comment
Attention is currently required from: Felix Singer, Thomas Heijligen, Edward O'Callaghan.
Hello Felix Singer, build bot (Jenkins), Thomas Heijligen,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/66659
to look at the new patch set (#7).
Change subject: flashrom.c: Remove programmer_param global state
......................................................................
flashrom.c: Remove programmer_param global state
Change-Id: I778609e370e44ad2b63b8baa4984ac03ff4124d8
Signed-off-by: Edward O'Callaghan <quasisec(a)google.com>
---
M flashrom.c
1 file changed, 37 insertions(+), 25 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/59/66659/7
--
To view, visit https://review.coreboot.org/c/flashrom/+/66659
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I778609e370e44ad2b63b8baa4984ac03ff4124d8
Gerrit-Change-Number: 66659
Gerrit-PatchSet: 7
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Anastasia Klimchuk <aklm(a)chromium.org>
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-MessageType: newpatchset
Attention is currently required from: Edward O'Callaghan.
Hello build bot (Jenkins), Anastasia Klimchuk,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/66673
to look at the new patch set (#5).
Change subject: tree: plumb prog_param into chipset_flash_enable()
......................................................................
tree: plumb prog_param into chipset_flash_enable()
Change-Id: I963c674d212ce791ee155020fa97bcf26cefca0c
Signed-off-by: Edward O'Callaghan <quasisec(a)google.com>
---
M chipset_enable.c
M include/programmer.h
M internal.c
3 files changed, 14 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/73/66673/5
--
To view, visit https://review.coreboot.org/c/flashrom/+/66673
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I963c674d212ce791ee155020fa97bcf26cefca0c
Gerrit-Change-Number: 66673
Gerrit-PatchSet: 5
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-MessageType: newpatchset