[PATCH 12/12] android/tester: Add set device DISCTIMEOUT prop fail test case

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

 



This adds set device DISCOVERY TIMEOUT property fail test case.
---
 android/android-tester.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/android/android-tester.c b/android/android-tester.c
index 378d319..6f0e962 100644
--- a/android/android-tester.c
+++ b/android/android-tester.c
@@ -1898,6 +1898,25 @@ static const struct generic_data bt_dev_setprop_bondeddev_fail_test = {
 	.expected_adapter_status = BT_STATUS_FAIL,
 };
 
+static uint32_t remote_setprop_disctimeout_val = 120;
+
+static struct priority_property remote_setprop_disctimeout_props[] = {
+	{
+	.prop.type = BT_PROPERTY_ADAPTER_DISCOVERY_TIMEOUT,
+	.prop.val = &remote_setprop_disctimeout_val,
+	.prop.len = sizeof(remote_setprop_disctimeout_val),
+	},
+};
+
+static const struct generic_data bt_dev_setprop_disctimeout_fail_test = {
+	.expected_hal_cb.discovery_state_changed_cb =
+					remote_discovery_state_changed_cb,
+	.expected_hal_cb.device_found_cb = remote_setprop_fail_device_found_cb,
+	.expected_cb_count = 3,
+	.expected_properties = remote_setprop_disctimeout_props,
+	.expected_adapter_status = BT_STATUS_FAIL,
+};
+
 static bt_callbacks_t bt_callbacks = {
 	.size = sizeof(bt_callbacks),
 	.adapter_state_changed_cb = adapter_state_changed_cb,
@@ -2636,6 +2655,14 @@ static void test_dev_setprop_bondeddev_fail(const void *test_data)
 	data->if_bluetooth->start_discovery();
 }
 
+static void test_dev_setprop_disctimeout_fail(const void *test_data)
+{
+	struct test_data *data = tester_get_data();
+
+	init_test_conditions(data);
+
+	data->if_bluetooth->start_discovery();
+}
 /* Test Socket HAL */
 
 static void adapter_socket_state_changed_cb(bt_state_t state)
@@ -3363,6 +3390,11 @@ int main(int argc, char *argv[])
 				setup_enabled_adapter,
 				test_dev_setprop_bondeddev_fail, teardown);
 
+	test_bredrle("Bluetooth Device Set DISCOVERY_TIMEOUT - Fail",
+				&bt_dev_setprop_disctimeout_fail_test,
+				setup_enabled_adapter,
+				test_dev_setprop_disctimeout_fail, teardown);
+
 	test_bredrle("Socket Init", NULL, setup_socket_interface,
 						test_dummy, teardown);
 
-- 
1.8.5.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