Anastasia Klimchuk has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/73830 )
Change subject: [WIP] tests: Add workaround to allow tests mock fileno on OpenBSD
......................................................................
[WIP] tests: Add workaround to allow tests mock fileno on OpenBSD
Segfault in `_cmocka_run_group_tests` before any test in run
Change-Id: I305e5254f180e0d56a19ad4b17a370ce61572138
Signed-off-by: Anastasia Klimchuk <aklm(a)chromium.org>
---
M tests/tests.c
1 file changed, 14 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/30/73830/1
diff --git a/tests/tests.c b/tests/tests.c
index d296a98..23c6abf 100644
--- a/tests/tests.c
+++ b/tests/tests.c
@@ -389,11 +389,11 @@
{
int ret = 0;
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
/*
* 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
+ * fileno macro in FreeBSD and OpenBSD 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.
*/
--
To view, visit https://review.coreboot.org/c/flashrom/+/73830
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I305e5254f180e0d56a19ad4b17a370ce61572138
Gerrit-Change-Number: 73830
Gerrit-PatchSet: 1
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: newchange
Attention is currently required from: Alexander Goncharov.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/72808 )
Change subject: ch341a_spi: drop validation of handle in routines
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit https://review.coreboot.org/c/flashrom/+/72808
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I1872495b83a522ceced331fef35d9d9d3b43fce5
Gerrit-Change-Number: 72808
Gerrit-PatchSet: 3
Gerrit-Owner: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Comment-Date: Sat, 18 Mar 2023 12:08:12 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Edward O'Callaghan, Alexander Goncharov.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/72807 )
Change subject: ch341a_spi: Refactor singleton states into reentrant pattern
......................................................................
Patch Set 6: Code-Review+2
--
To view, visit https://review.coreboot.org/c/flashrom/+/72807
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I9fe72bff88b7f8778c1199bdab8ba43bf32e1c8c
Gerrit-Change-Number: 72807
Gerrit-PatchSet: 6
Gerrit-Owner: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
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: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Comment-Date: Sat, 18 Mar 2023 12:07:08 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Felix Singer, Edward O'Callaghan, Angel Pons, Alexander Goncharov.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/73039 )
Change subject: flashrom: rewrite flashbuses_to_text()
......................................................................
Patch Set 6: Code-Review+1
(1 comment)
File flashrom.c:
https://review.coreboot.org/c/flashrom/+/73039/comment/ad7b74ce_bfcee8f5
PS5, Line 948: if (bustype & (1 << i))
> This condition checks if a specific bus is enabled (`bustype` is a bit flag variable). […]
Oh that my question was a silly one, sorry. Of course the condition is needed because there is one specific `bustype` which is a function argument.
I got another thing in mind instead. At the moment code relies on the order of `bustypes` values being the same as in `chipbustype` enum. At the very least, this needs a comment.
I don't know if there are better ways. I am worried there are two ordered lists in two different files, but they have to be in the same order.
However, we have a unit test which should fail when the order is broken. That's good.
In any case, please add a comment about the order of `bustypes`. Maybe that's enough :)
--
To view, visit https://review.coreboot.org/c/flashrom/+/73039
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I59b9044c99b4ba6c00d8c97f1e91af09d70dce2c
Gerrit-Change-Number: 73039
Gerrit-PatchSet: 6
Gerrit-Owner: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Comment-Date: Sat, 18 Mar 2023 11:25:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
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: Edward O'Callaghan, Angel Pons, Arthur Heymans, Alexander Goncharov.
Thomas Heijligen has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/73040 )
Change subject: printf: Use inttype.h macros for format strings
......................................................................
Patch Set 8:
(1 comment)
Patchset:
PS8:
> I am wondering is this should be in guidelines somewhere. […]
yes, we should put this in the developer guidelines. I'll also search for the possibility of automatic testing this. This would make keeping track of it much easier.
--
To view, visit https://review.coreboot.org/c/flashrom/+/73040
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ia75b6df981ce60c891161fe553c7ceab8570178d
Gerrit-Change-Number: 73040
Gerrit-PatchSet: 8
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
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: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Attention: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Comment-Date: Sat, 18 Mar 2023 10:17:15 +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: Thomas Heijligen.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/73439 )
Change subject: meson_cross: Introduce meson cross file for DJGPP/DOS
......................................................................
Patch Set 4: Code-Review+2
--
To view, visit https://review.coreboot.org/c/flashrom/+/73439
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Iabda73942c1e64cd46604c78533982374f78e1a4
Gerrit-Change-Number: 73439
Gerrit-PatchSet: 4
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Comment-Date: Sat, 18 Mar 2023 09:53:48 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Thomas Heijligen.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/73156 )
Change subject: meson.build: Add 'dos' as option for pci_based programmer
......................................................................
Patch Set 6: Code-Review+2
--
To view, visit https://review.coreboot.org/c/flashrom/+/73156
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: If4907a3fd1852ef60d06ef1625ad8a106d89a126
Gerrit-Change-Number: 73156
Gerrit-PatchSet: 6
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Comment-Date: Sat, 18 Mar 2023 09:52:38 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Thomas Heijligen, Edward O'Callaghan, Angel Pons, Arthur Heymans, Alexander Goncharov.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/73040 )
Change subject: printf: Use inttype.h macros for format strings
......................................................................
Patch Set 8: Code-Review+2
(1 comment)
Patchset:
PS8:
I am wondering is this should be in guidelines somewhere. Or maybe the default rule "look at previous examples and do the same" is sufficient...?
--
To view, visit https://review.coreboot.org/c/flashrom/+/73040
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ia75b6df981ce60c891161fe553c7ceab8570178d
Gerrit-Change-Number: 73040
Gerrit-PatchSet: 8
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Attention: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Comment-Date: Sat, 18 Mar 2023 09:50:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Thomas Heijligen, Edward O'Callaghan, Angel Pons.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/73102 )
Change subject: cli_classic: include a fallback inplementation of getopt
......................................................................
Patch Set 7: Code-Review+1
(6 comments)
Commit Message:
https://review.coreboot.org/c/flashrom/+/73102/comment/affcc7fd_c077df37
PS7, Line 12: DJGPP/DOS
I think inline is better:
DJGPP/DOS may not provide getopt ...
File cli_getopt.c:
https://review.coreboot.org/c/flashrom/+/73102/comment/0ed28a52_4fee9186
PS7, Line 2: * This file is part of the flashrom project. It comes originally from the musl
: * libc project and is licensed under the terms of the MIT license.
I don't know about licences in details, I hope it's all fine! :)
https://review.coreboot.org/c/flashrom/+/73102/comment/03ccfc62_04ec51e6
PS7, Line 254:
:
:
Let's keep 1 line in between functions (in this file, some has 2-3 empty lines break)
File include/cli_classic.h:
https://review.coreboot.org/c/flashrom/+/73102/comment/c7a30d97_0281a6c1
PS7, Line 1: #
We need to add a license header? we still have them...
https://review.coreboot.org/c/flashrom/+/73102/comment/1caa3370_b578e580
PS7, Line 3:
1 line break is enough I think
File meson.build:
https://review.coreboot.org/c/flashrom/+/73102/comment/55ca427a_852fbec8
PS7, Line 637: cli_srcs = files(
: 'cli_classic.c',
: 'cli_common.c',
: 'cli_output.c'
: )
:
: if not cc.has_function('getopt_long')
: cli_srcs += files('cli_getopt.c')
: endif
:
:
This block should be intended to the right it seems? it is inside if condition?
--
To view, visit https://review.coreboot.org/c/flashrom/+/73102
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I6ebbde075014e3b45b0f9e04b34b72aa969e1197
Gerrit-Change-Number: 73102
Gerrit-PatchSet: 7
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Sat, 18 Mar 2023 09:39:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Thomas Heijligen, Angel Pons.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/73101 )
Change subject: meson.build: Use library() to build libflashrom
......................................................................
Patch Set 5: Code-Review+2
--
To view, visit https://review.coreboot.org/c/flashrom/+/73101
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I27f10fdf1227795a9a3b4e050a2d708b58f10ee7
Gerrit-Change-Number: 73101
Gerrit-PatchSet: 5
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Sat, 18 Mar 2023 09:22:47 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment