mirror of
https://review.coreboot.org/flashrom.git
synced 2025-11-17 13:10:42 +01:00
libflashrom: Add set log level functionality
Before this commit, any message from Flashrom would trigger
the user's callback. This could lead to additional delays
and slow down overall Flashrom performance.
This patch adds the ability to configure the log level for
messages from Flashrom. It sets the default log level to INFO
Testing: Both unit tests and CLI tools serve as libflashrom clients.
All unit tests run successfully.
Change-Id: I095d48b8feb5fbc950a36eb17bed0d7cb8d9df64
Signed-off-by: Dmitry Zhadinets <dzhadinets@gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/87047
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
committed by
Anastasia Klimchuk
parent
b1794138f0
commit
6571f263b5
@@ -481,6 +481,7 @@ int main(int argc, char *argv[])
|
||||
const struct CMUnitTest libflashrom_tests[] = {
|
||||
cmocka_unit_test(flashrom_set_log_callback_test_success),
|
||||
cmocka_unit_test(flashrom_set_log_callback_v2_test_success),
|
||||
cmocka_unit_test(flashrom_set_log_level_test_success),
|
||||
};
|
||||
ret |= cmocka_run_group_tests_name("libflashrom.c tests", libflashrom_tests, NULL, NULL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user