From 1c545a85e2ed1d7bb28d155324f963f1f57d1c18 Mon Sep 17 00:00:00 2001 From: "Vic (Chun-Ju) Yang" Date: Tue, 7 Jan 2014 21:56:32 +0800 Subject: Fix kb_8042 test The mock power button GPIO is initially low, so we need to set it high before testing it. Also, wait for all tasks to start before starting the test to prevent race condition. BUG=chrome-os-partner:19236 TEST=Pass the test BRANCH=None Change-Id: I813588a9c721815c1213882f7a9458daea4d78eb Signed-off-by: Vic (Chun-Ju) Yang Reviewed-on: https://chromium-review.googlesource.com/181744 Reviewed-by: Vincent Palatin Reviewed-by: Randall Spangler --- test/kb_8042.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/kb_8042.c b/test/kb_8042.c index 88bae5d633..576f8da9c8 100644 --- a/test/kb_8042.c +++ b/test/kb_8042.c @@ -197,6 +197,7 @@ static int test_scancode_set2(void) static int test_power_button(void) { + gpio_set_level(GPIO_POWER_BUTTON_L, 1); set_scancode(1); test_chipset_on(); @@ -257,6 +258,7 @@ static int test_sysjump_cont(void) void run_test(void) { test_reset(); + wait_for_task_started(); if (system_get_image_copy() == SYSTEM_IMAGE_RO) { RUN_TEST(test_single_key_press); -- cgit v1.2.1