All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 4/5] android/tester: Add bdaddr get prop success test case
Date: Thu, 12 Dec 2013 18:14:34 +0100	[thread overview]
Message-ID: <1386868475-9610-4-git-send-email-grzegorz.kolodziejczyk@tieto.com> (raw)
In-Reply-To: <1386868475-9610-1-git-send-email-grzegorz.kolodziejczyk@tieto.com>

This adds bdaddr set property success test case.
---
 android/android-tester.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/android/android-tester.c b/android/android-tester.c
index 5b7082a..407bfbe 100644
--- a/android/android-tester.c
+++ b/android/android-tester.c
@@ -615,6 +615,14 @@ static const struct generic_data bluetooth_setprop_disctimeout_success_test = {
 	.expected_property.len = sizeof(test_setprop_disctimeout_val)
 };
 
+static const struct generic_data bluetooth_getprop_bdaddr_success_test = {
+	.expected_hal_callbacks = {adapter_prop_bdaddr, adapter_test_end},
+	.expected_adapter_status = BT_STATUS_SUCCESS,
+	.expected_property.type = BT_PROPERTY_BDADDR,
+	.expected_property.val = NULL,
+	.expected_property.len = sizeof(bt_bdaddr_t)
+};
+
 static bt_callbacks_t bt_callbacks = {
 	.size = sizeof(bt_callbacks),
 	.adapter_state_changed_cb = adapter_state_changed_cb,
@@ -871,6 +879,19 @@ static void test_setprop_disctimeout_succes(const void *test_data)
 	check_expected_status(adapter_status);
 }
 
+static void test_getprop_bdaddr_success(const void *test_data)
+{
+	struct test_data *data = tester_get_data();
+	const struct generic_data *test = data->test_data;
+	const bt_property_t prop = test->expected_property;
+	bt_status_t adapter_status;
+
+	init_test_conditions(data);
+
+	adapter_status = data->if_bluetooth->get_adapter_property(prop.type);
+	check_expected_status(adapter_status);
+}
+
 #define test_bredrle(name, data, test_setup, test, test_teardown) \
 	do { \
 		struct test_data *user; \
@@ -916,6 +937,11 @@ int main(int argc, char *argv[])
 				setup_enabled_adapter,
 				test_setprop_disctimeout_succes, teardown);
 
+	test_bredrle("Test Get BDADDR - Success",
+					&bluetooth_getprop_bdaddr_success_test,
+					setup_enabled_adapter,
+					test_getprop_bdaddr_success, teardown);
+
 	test_bredrle("Test Socket Init", NULL, setup_socket_interface,
 						test_dummy, teardown);
 
-- 
1.8.4.2


  parent reply	other threads:[~2013-12-12 17:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-12 17:14 [PATCH 1/5] android/tester: Add property check and bdname set success test case Grzegorz Kolodziejczyk
2013-12-12 17:14 ` [PATCH 2/5] android/tester: Add scan mode set prop " Grzegorz Kolodziejczyk
2013-12-12 17:14 ` [PATCH 3/5] android/tester: Add discovery timeout " Grzegorz Kolodziejczyk
2013-12-12 17:14 ` Grzegorz Kolodziejczyk [this message]
2013-12-12 17:14 ` [PATCH 5/5] android/tester: Add bdname get " Grzegorz Kolodziejczyk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1386868475-9610-4-git-send-email-grzegorz.kolodziejczyk@tieto.com \
    --to=grzegorz.kolodziejczyk@tieto.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.