| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=None
BRANCH=None
TEST=None
Change-Id: I6cca635212867dad5a8e391a46b1d943530c539a
Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/69621
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this change the mocks are able to return a non-negative value for
the file descriptor expected from open operations. This avoid issues
with subsequent error checks of the form `if (fd < 0)`
BUG=b:227404721
TEST=./test_build.sh; FEATURES=test emerge-amd64-generic flashrom
BRANCH=none
Signed-off-by: Daniel Campello <campello@chromium.org>
Change-Id: Ib6bac051852aea2465665a6fd669b7f5e3772985
Reviewed-on: https://review.coreboot.org/c/flashrom/+/63193
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LOG_ME macro is very generic and can be useful anywhere in tests.
Previously was only used in scope of tests.c. With time more tests
are added, and more files, LOG_ME needs to be visible everywhere.
BUG=b:181803212
TEST=builds and ninja test
Change-Id: If7f3d256161bc8b81e996328e445cccab9a82174
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/57914
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds NON_ZERO macro and not_null function into io_mock.h,
so that they can be used anywhere in tests. Common usage for not_null
is to indicate a valid pointer, where it doesn't matter what the
pointer is, only matters it is not null. Common usage of NON_ZERO is
to indicate a valid file descriptor, where it only matters the
descriptor is non-zero integer.
New features replace all usages of previous MOCK_HANDLE.
This patch corrects return value from __wrap_ioctl to be successful
by default. It used to be MOCK_HANDLE, but should be 0. Included in
this patch because this is also a replacement of MOCK_HANDLE.
BUG=b:181803212
TEST=builds and ninja test
Change-Id: I5ad6ee4aa9091447c6c9108c92bf7f6e755fca48
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/57269
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
|
|
|
|
|
|
|
|
|
|
| |
Signed-off-by: Nikolai Artemiev <nartemiev@google.com>
Change-Id: Ia964279ace569b4b93f4e2919c1c228a9b621745
Reviewed-on: https://review.coreboot.org/c/flashrom/+/45438
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
|
|
This adds the CMocka unit-testing infrastructure into
the meson build system which we will latter follow up
with unit-tests for flashrom's core logic.
BUG=b:157280555
BRANCH=none
TEST=builds
Change-Id: I66665f56627b3d99049176bfbebbd771b080370a
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/41622
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
|