Anastasia Klimchuk has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/56439 )
Change subject: tests: Trim excessive new lines from layout test output
......................................................................
tests: Trim excessive new lines from layout test output
This patch is making layout test output more compact, spanning
less vertical lines while logging the same information.
No changes made to the test functionality.
BUG=b:193584590
TEST=ninja test
Change-Id: I36a39505f8db508672cde5a848684a3a22f5ccc4
Signed-off-by: Anastasia Klimchuk <aklm(a)chromium.org>
---
M tests/layout.c
1 file changed, 18 insertions(+), 18 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/39/56439/1
diff --git a/tests/layout.c b/tests/layout.c
index e3e9539..03a61c7 100644
--- a/tests/layout.c
+++ b/tests/layout.c
@@ -23,26 +23,26 @@
{
(void) state; /* unused */
- printf("Creating layout...\n");
+ printf("Creating layout...");
struct flashrom_layout *layout;
assert_int_equal(0, flashrom_layout_new(&layout));
printf("done\n");
- printf("Adding and including first region...\n");
+ printf("Adding and including first region...");
assert_int_equal(0, flashrom_layout_add_region(layout, 0x00021000, 0x00031000, "first region"));
assert_int_equal(0, flashrom_layout_include_region(layout, "first region"));
- printf("done\n");
+ printf("done");
- printf("Adding and including second (non-overlapping) region...\n");
+ printf(", second (non-overlapping) region...");
assert_int_equal(0, flashrom_layout_add_region(layout, 0x00031001, 0x0023efc0, "second region"));
assert_int_equal(0, flashrom_layout_include_region(layout, "second region"));
printf("done\n");
- printf("Asserting included regions do not overlap...\n");
+ printf("Asserting included regions do not overlap...");
assert_int_equal(0, included_regions_overlap(layout));
printf("done\n");
- printf("Releasing layout...\n");
+ printf("Releasing layout...");
flashrom_layout_release(layout);
printf("done\n");
}
@@ -51,26 +51,26 @@
{
(void) state; /* unused */
- printf("Creating layout...\n");
+ printf("Creating layout...");
struct flashrom_layout *layout;
assert_int_equal(0, flashrom_layout_new(&layout));
printf("done\n");
- printf("Adding and including first region...\n");
+ printf("Adding and including first region...");
assert_int_equal(0, flashrom_layout_add_region(layout, 0x00021000, 0x00031000, "first region"));
assert_int_equal(0, flashrom_layout_include_region(layout, "first region"));
- printf("done\n");
+ printf("done");
- printf("Adding and including second (overlapping) region...\n");
+ printf(", second (overlapping) region...");
assert_int_equal(0, flashrom_layout_add_region(layout, 0x00027100, 0x0023efc0, "second region"));
assert_int_equal(0, flashrom_layout_include_region(layout, "second region"));
printf("done\n");
- printf("Asserting included regions overlap...\n");
+ printf("Asserting included regions overlap...");
assert_int_equal(1, included_regions_overlap(layout));
printf("done\n");
- printf("Releasing layout...\n");
+ printf("Releasing layout...");
flashrom_layout_release(layout);
printf("done\n");
}
@@ -79,25 +79,25 @@
{
(void) state; /* unused */
- printf("Creating layout...\n");
+ printf("Creating layout...");
struct flashrom_layout *layout;
assert_int_equal(0, flashrom_layout_new(&layout));
printf("done\n");
- printf("Adding and including first region...\n");
+ printf("Adding and including first region...");
assert_int_equal(0, flashrom_layout_add_region(layout, 0x00021000, 0x00031000, "first region"));
assert_int_equal(0, flashrom_layout_include_region(layout, "first region"));
- printf("done\n");
+ printf("done");
- printf("Adding second (overlapping) region, not included...\n");
+ printf(", second (overlapping) region, not included...");
assert_int_equal(0, flashrom_layout_add_region(layout, 0x00027100, 0x0023efc0, "second region"));
printf("done\n");
- printf("Asserting included regions do not overlap...\n");
+ printf("Asserting included regions do not overlap...");
assert_int_equal(0, included_regions_overlap(layout));
printf("done\n");
- printf("Releasing layout...\n");
+ printf("Releasing layout...");
flashrom_layout_release(layout);
printf("done\n");
}
--
To view, visit https://review.coreboot.org/c/flashrom/+/56439
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I36a39505f8db508672cde5a848684a3a22f5ccc4
Gerrit-Change-Number: 56439
Gerrit-PatchSet: 1
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: newchange
Attention is currently required from: Nico Huber, Edward O'Callaghan, Angel Pons.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/56413 )
Change subject: tests: Mock file i/o for linux_mtd and linux_spi tests
......................................................................
Patch Set 2:
(1 comment)
File tests/io_mock.h:
https://review.coreboot.org/c/flashrom/+/56413/comment/48660911_1400f8ee
PS1, Line 40: #include <stdio.h>
> /* required for 'FILE *'. […]
Done.
I added stdio.h because my understanding it works on all platforms, so it is safe to add, is this correct?
--
To view, visit https://review.coreboot.org/c/flashrom/+/56413
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I73f0d6ff2ad5074add7a721ed3416230d3647e3f
Gerrit-Change-Number: 56413
Gerrit-PatchSet: 2
Gerrit-Owner: 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: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Mon, 19 Jul 2021 06:35:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Nico Huber, Angel Pons, Anastasia Klimchuk.
Hello build bot (Jenkins), Nico Huber, Edward O'Callaghan, Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/56413
to look at the new patch set (#2).
Change subject: tests: Mock file i/o for linux_mtd and linux_spi tests
......................................................................
tests: Mock file i/o for linux_mtd and linux_spi tests
This patch adds an init-shutdown test for linux_mtd. Since
linux_mtd is using file i/o operations, those are added to the
framework and mocked.
Another driver linux_spi which is also using file i/o, got an upgrade
in this patch, and it is now reading pagesize from sysfs (using mocked
file i/o).
A good side-effect is that linux_mtd is the first test for opaque
masters, which is great to have in preparation for a change like
CB:56103 but for opaque masters.
BUG=b:181803212
TEST=builds and ninja test
Change-Id: I73f0d6ff2ad5074add7a721ed3416230d3647e3f
Signed-off-by: Anastasia Klimchuk <aklm(a)chromium.org>
---
M tests/init_shutdown.c
M tests/io_mock.h
M tests/meson.build
M tests/tests.c
M tests/tests.h
5 files changed, 170 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/13/56413/2
--
To view, visit https://review.coreboot.org/c/flashrom/+/56413
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I73f0d6ff2ad5074add7a721ed3416230d3647e3f
Gerrit-Change-Number: 56413
Gerrit-PatchSet: 2
Gerrit-Owner: 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: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: newpatchset
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/56414
to look at the new patch set (#2).
Change subject: dediprog.c: Refactor singleton states into reentrant pattern
......................................................................
dediprog.c: Refactor singleton states into reentrant pattern
Move global singleton states into a struct and store within
the spi_master data field for the life-time of the driver.
This is one of the steps on the way to move spi_master data
memory management behind the initialisation API, for more
context see other patches under the same topic "register_master_api".
BUG=b:185191942
TEST=builds and ninja test
Change-Id: I72085e750af97b94dfa94f2ebf2a134e41a2ec8d
Signed-off-by: Anastasia Klimchuk <aklm(a)chromium.org>
---
M dediprog.c
1 file changed, 160 insertions(+), 115 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/14/56414/2
--
To view, visit https://review.coreboot.org/c/flashrom/+/56414
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I72085e750af97b94dfa94f2ebf2a134e41a2ec8d
Gerrit-Change-Number: 56414
Gerrit-PatchSet: 2
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: newpatchset
Attention is currently required from: Nico Huber, Edward O'Callaghan, Angel Pons.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/56413 )
Change subject: tests: Mock file i/o for linux_mtd and linux_spi tests
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
This patch has two tests (linux_spi existed before, linux_mtd is new), so I spent some time thinking to split or not to split.
Both tests are using file i/o, but what's most important is that after adding a second test it became necessary/clear to add file i/o to the framework. The first test by itself was fine, adding the second one inspired some improvements. So in my mind these two tests are connected, but of course I can split if people think it should be split.
--
To view, visit https://review.coreboot.org/c/flashrom/+/56413
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I73f0d6ff2ad5074add7a721ed3416230d3647e3f
Gerrit-Change-Number: 56413
Gerrit-PatchSet: 1
Gerrit-Owner: 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: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Mon, 19 Jul 2021 04:17:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment