From 6ced9f0662c02a47acc4d82088aefc04340f1891 Mon Sep 17 00:00:00 2001 From: Yuval Peress Date: Mon, 2 May 2022 17:16:17 -0600 Subject: test: fix flaky test Remove check for value that's not being deep copied. It's possible to do this with fff but it requires a custom handler to do the deep copy. This might be worth exploring once we enable C++ with lambdas which will make the custom handlers much easier. BRANCH=none BUG=none TEST=zmake test test-drivers Signed-off-by: Yuval Peress Change-Id: If454281440fdc3f5f55d7243301c512de870076f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3621871 Commit-Queue: Jeremy Bettis Reviewed-by: Jeremy Bettis --- zephyr/test/drivers/src/host_cmd/motion_sense.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/zephyr/test/drivers/src/host_cmd/motion_sense.c b/zephyr/test/drivers/src/host_cmd/motion_sense.c index 5a76c41f24..44f68b6b38 100644 --- a/zephyr/test/drivers/src/host_cmd/motion_sense.c +++ b/zephyr/test/drivers/src/host_cmd/motion_sense.c @@ -467,9 +467,6 @@ ZTEST_USER_F(host_cmd_motion_sense, test_get_offset) zassert_equal((int16_t *)&response.sensor_offset.offset, mock_get_offset_fake.arg1_history[0], NULL); zassert_equal(1, mock_set_offset_fake.arg2_history[0], NULL); - zassert_equal(2, mock_set_offset_fake.arg1_history[0][0], NULL); - zassert_equal(3, mock_set_offset_fake.arg1_history[0][1], NULL); - zassert_equal(4, mock_set_offset_fake.arg1_history[0][2], NULL); } ZTEST_USER(host_cmd_motion_sense, test_scale_invalid_sensor_num) @@ -570,9 +567,6 @@ ZTEST_USER_F(host_cmd_motion_sense, test_set_get_scale) zassert_equal(1, mock_set_scale_fake.call_count, NULL); zassert_equal(1, mock_get_scale_fake.call_count, NULL); zassert_equal(1, mock_set_scale_fake.arg2_history[0], NULL); - zassert_equal(2, mock_set_scale_fake.arg1_history[0][0], NULL); - zassert_equal(3, mock_set_scale_fake.arg1_history[0][1], NULL); - zassert_equal(4, mock_set_scale_fake.arg1_history[0][2], NULL); } ZTEST_USER(host_cmd_motion_sense, test_calib_invalid_sensor_num) -- cgit v1.2.1