summaryrefslogtreecommitdiff
path: root/test/fan.c
diff options
context:
space:
mode:
authorJeremy Bettis <jbettis@google.com>2022-07-11 16:56:06 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-07-13 23:14:10 +0000
commit2715d7491fbeb43185ab81986e325f1929294158 (patch)
tree68a5fb53ebc83b632a3c7ef6746341a53a04ec56 /test/fan.c
parent6c36907fb5e3127a70e8c31eb1ecdd0b64352539 (diff)
downloadchrome-ec-2715d7491fbeb43185ab81986e325f1929294158.tar.gz
test: Add implementation of interrupt_generator
To prevent flaky coverage in core/host/task.c, implement interrupt_generator() in one of the 5 tests where the coverage results are inconsistent. The fan test is good because it doesn't use interrupts. BRANCH=None BUG=b:213374060 TEST=TEST=fan ; make clobber ; \ make TEST_COVERAGE=y build/coverage/${TEST}.info >&/dev/null && \ lcov --summary build/coverage/${TEST}.info && \ lcov --list build/coverage/${TEST}.info | grep core/host/task.c Change-Id: I76b662eef9f70d339e609264dca251168dbdd0ea Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3756737 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'test/fan.c')
-rw-r--r--test/fan.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/fan.c b/test/fan.c
index 683610fd31..a3d53f470c 100644
--- a/test/fan.c
+++ b/test/fan.c
@@ -10,7 +10,6 @@
#include "fan.h"
#include "hooks.h"
#include "host_command.h"
-#include "printf.h"
#include "temp_sensor.h"
#include "test_util.h"
#include "thermal.h"
@@ -111,3 +110,10 @@ void run_test(int argc, char **argv)
test_print_result();
}
+
+/* Doesn't do anything, but it makes this test stop intermittently covering
+ * some code in core/host/task.c:fast_forward().
+ */
+void interrupt_generator(void)
+{
+}