[PATCH 2/3] android/tester: Check return status for enable()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx>

Use check_expected_status helper for test for returned status in
enable() HAL call.
---
 android/android-tester.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/android/android-tester.c b/android/android-tester.c
index 4a75704..423dd6a 100644
--- a/android/android-tester.c
+++ b/android/android-tester.c
@@ -542,7 +542,8 @@ fail:
 
 static const struct generic_data bluetooth_enable_success_test = {
 	.expected_hal_callbacks = {ADAPTER_PROPS, ADAPTER_STATE_CHANGED_ON,
-							ADAPTER_TEST_END}
+							ADAPTER_TEST_END},
+	.expected_adapter_status = BT_STATUS_SUCCESS
 };
 
 static const struct generic_data bluetooth_enable_done_test = {
@@ -726,10 +727,12 @@ static void teardown(const void *test_data)
 static void test_enable(const void *test_data)
 {
 	struct test_data *data = tester_get_data();
+	bt_status_t adapter_status;
 
 	init_test_conditions(data);
 
-	data->if_bluetooth->enable();
+	adapter_status = data->if_bluetooth->enable();
+	check_expected_status(adapter_status);
 }
 
 static void test_enable_done(const void *test_data)
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux