aboutsummaryrefslogtreecommitdiffstats
path: root/tests/tests.c
diff options
context:
space:
mode:
authorAnastasia Klimchuk <aklm@chromium.org>2022-08-08 10:42:39 +1000
committerAnastasia Klimchuk <aklm@chromium.org>2022-08-10 23:53:11 +0000
commite18a528c6b399d4a330e77657ba64a72b09fcf23 (patch)
tree5fe3e770ffa91e663108a439dcf3b016d7a307ed /tests/tests.c
parent4adfd99d782ab825042f9225df05d360476f8e19 (diff)
downloadflashrom-e18a528c6b399d4a330e77657ba64a72b09fcf23.tar.gz
flashrom-e18a528c6b399d4a330e77657ba64a72b09fcf23.tar.bz2
flashrom-e18a528c6b399d4a330e77657ba64a72b09fcf23.zip
tests: Test allow_brick is required for i2c programmers init
Add tests for i2c programmers that assert that initialisation fails when allow_brick parameter is not provided. Example of logs from test run: [ RUN ] parade_lspcon_no_allow_brick_test_success Testing init error path for programmer=parade_lspcon with params: bus=254 ... ... init failed with error code -1 as expected [ OK ] parade_lspcon_no_allow_brick_test_success BUG=b:181803212 TEST=ninja test Change-Id: I382f563016502f3342131d5f9c0de41dc665b03a Signed-off-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/66508 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Thomas Heijligen <src@posteo.de>
Diffstat (limited to 'tests/tests.c')
-rw-r--r--tests/tests.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/tests.c b/tests/tests.c
index 2a54aab3..2994c022 100644
--- a/tests/tests.c
+++ b/tests/tests.c
@@ -416,8 +416,11 @@ int main(int argc, char *argv[])
cmocka_unit_test(linux_mtd_probe_lifecycle_test_success),
cmocka_unit_test(linux_spi_probe_lifecycle_test_success),
cmocka_unit_test(parade_lspcon_basic_lifecycle_test_success),
+ cmocka_unit_test(parade_lspcon_no_allow_brick_test_success),
cmocka_unit_test(mediatek_i2c_spi_basic_lifecycle_test_success),
+ cmocka_unit_test(mediatek_i2c_no_allow_brick_test_success),
cmocka_unit_test(realtek_mst_basic_lifecycle_test_success),
+ cmocka_unit_test(realtek_mst_no_allow_brick_test_success),
};
ret |= cmocka_run_group_tests_name("lifecycle.c tests", lifecycle_tests, NULL, NULL);