diff options
author | Anastasia Klimchuk <aklm@chromium.org> | 2021-04-23 15:47:03 +1000 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2021-04-27 12:47:48 +0000 |
commit | 98534e717bc457ea41a3bdf6e1d677fb0c1f63ca (patch) | |
tree | 950a32cec6ef8a6af73ae933d7cf337eaf72a762 /spi.h | |
parent | cffaac1e0f802e3fe27c4997e931586ee738f94a (diff) | |
download | flashrom-98534e717bc457ea41a3bdf6e1d677fb0c1f63ca.tar.gz flashrom-98534e717bc457ea41a3bdf6e1d677fb0c1f63ca.tar.bz2 flashrom-98534e717bc457ea41a3bdf6e1d677fb0c1f63ca.zip |
tests: Add unit test to run init/shutdown for linux_spi.c
The current implementation tests a particular path of the init
procedure. There are two ways for it to succeed: reading the buffer
size from sysfs and the fallback to getpagesize(). This test does
the latter (fallback to getpagesize).
Extract from meson-logs/testlog.txt for new test:
[ RUN ] linux_spi_init_and_shutdown_test_success
Testing programmer_init for programmer=25 ...
__wrap_open64 is called
__wrap_ioctl is called
__wrap_ioctl is called
__wrap_ioctl is called
__wrap_fopen64 is called
... programmer_init for programmer=25 successful
Testing programmer_shutdown for programmer=25 ...
... programmer_shutdown for programmer=25 successful
[ OK ] linux_spi_init_and_shutdown_test_success
BUG=b:181803212
TEST=builds and ninja test
Change-Id: I4911fbb6f04371283f0e62d2196bdd691a227584
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/52498
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'spi.h')
0 files changed, 0 insertions, 0 deletions