summaryrefslogtreecommitdiffstats
path: root/tests/io_mock.h
diff options
context:
space:
mode:
authorAnastasia Klimchuk <aklm@chromium.org>2021-07-21 14:53:16 +1000
committerEdward O'Callaghan <quasisec@chromium.org>2021-08-09 07:05:17 +0000
commite0ece4a4bb200ed28859419e5349a38a9b02baf1 (patch)
tree7f84416fd758eee7b85db5465a0d55285c25dadd /tests/io_mock.h
parent56c82fe623f16bd2656ee097e35c52d6a028d9ae (diff)
downloadflashrom-e0ece4a4bb200ed28859419e5349a38a9b02baf1.tar.gz
flashrom-e0ece4a4bb200ed28859419e5349a38a9b02baf1.tar.bz2
flashrom-e0ece4a4bb200ed28859419e5349a38a9b02baf1.zip
tests: Add init-shutdown test for nicrealtek
This patch adds a test and mocks for two pci functions that nicreltek is using. Main reason for this is to have at least one test for par master (currently there are none), in preparation for a change like CB:56103 but for par masters. BUG=b:181803212 TEST=ninja test Change-Id: Iaed14fe1d83c8eb45ec185ebd3f1c97cb81941f4 Signed-off-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/56470 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Diffstat (limited to 'tests/io_mock.h')
-rw-r--r--tests/io_mock.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/io_mock.h b/tests/io_mock.h
index 72d89c50a..5cddca0df 100644
--- a/tests/io_mock.h
+++ b/tests/io_mock.h
@@ -37,6 +37,11 @@ typedef struct libusb_device_handle libusb_device_handle;
struct libusb_context;
typedef struct libusb_context libusb_context;
+/* Define struct pci_dev to avoid dependency on pci.h */
+struct pci_dev {
+ unsigned int device_id;
+};
+
struct io_mock {
void *state;