From: Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 2/3] android/tester: Check return status for enable()
Date: Wed, 18 Dec 2013 10:55:12 +0200 [thread overview]
Message-ID: <1387356913-32666-2-git-send-email-Andrei.Emeltchenko.news@gmail.com> (raw)
In-Reply-To: <1387356913-32666-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
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
next prev parent reply other threads:[~2013-12-18 8:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-18 8:55 [PATCH 1/3] android/tester: Check status returned from HAL calls Andrei Emeltchenko
2013-12-18 8:55 ` Andrei Emeltchenko [this message]
2013-12-18 8:55 ` [PATCH 3/3] android/tester: Enable bthost after device is enabled Andrei Emeltchenko
2013-12-18 10:26 ` [PATCH 1/3] android/tester: Check status returned from HAL calls Johan Hedberg
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=1387356913-32666-2-git-send-email-Andrei.Emeltchenko.news@gmail.com \
--to=andrei.emeltchenko.news@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).