Linux bluetooth development
 help / color / mirror / Atom feed
From: Szymon Janc <szymon.janc@gmail.com>
To: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 1/5] android/tester: Add BDADDR set prop fail test case
Date: Mon, 30 Dec 2013 16:30:43 +0100	[thread overview]
Message-ID: <3694279.3Ynmtzyg3t@athlon> (raw)
In-Reply-To: <1388413509-31265-1-git-send-email-grzegorz.kolodziejczyk@tieto.com>

Hi Grzegorz,

On Monday 30 December 2013 15:25:05 Grzegorz Kolodziejczyk wrote:
> This adds BDADDR set property fail test case due to only get
> possibility.
> ---
>  android/android-tester.c | 29 +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
> 
> diff --git a/android/android-tester.c b/android/android-tester.c
> index ee23fff..d7ebc02 100644
> --- a/android/android-tester.c
> +++ b/android/android-tester.c
> @@ -798,6 +798,17 @@ static const struct generic_data
>  	.set_property.len = sizeof(setprop_remote_service),
>  };
> 
> +static bt_bdaddr_t setprop_bdaddr = {
> +	.address = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
> +};
> +
> +static const struct generic_data bluetooth_setprop_bdaddr_invalid_test = {
> +	.expected_adapter_status = BT_STATUS_FAIL,
> +	.set_property.type = BT_PROPERTY_BDADDR,
> +	.set_property.val = &setprop_bdaddr,
> +	.set_property.len = sizeof(setprop_bdaddr),
> +};
> +
>  static const struct generic_data bluetooth_discovery_start_success_test = {
> .expected_hal_cb.discovery_state_changed_cb =
>  						discovery_start_success_cb,
> @@ -1134,6 +1145,19 @@ static void test_setprop_service_record_invalid(const
> void *test_data) check_expected_status(adapter_status);
>  }
> 
> +static void test_setprop_bdaddr_invalid(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->set_adapter_property(prop);
> +	check_expected_status(adapter_status);
> +}
> +
>  static void test_discovery_start_success(const void *test_data)
>  {
>  	struct test_data *data = tester_get_data();
> @@ -1693,6 +1717,11 @@ int main(int argc, char *argv[])
>  				setup_enabled_adapter,
>  				test_setprop_service_record_invalid, teardown);
> 
> +	test_bredrle("Bluetooth Set BDADDR - Invalid",
> +					&bluetooth_setprop_bdaddr_invalid_test,
> +					setup_enabled_adapter,
> +					test_setprop_bdaddr_invalid, teardown);
> +
>  	test_bredrle("Bluetooth BREDR Discovery Start - Success",
>  				&bluetooth_discovery_start_success_test,
>  				setup_enabled_adapter,

All patches applied, thanks.

-- 
Szymon K. Janc
szymon.janc@gmail.com

      parent reply	other threads:[~2013-12-30 15:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-30 14:25 [PATCH 1/5] android/tester: Add BDADDR set prop fail test case Grzegorz Kolodziejczyk
2013-12-30 14:25 ` [PATCH 2/5] android/tester: Add SCAN_MODE=CONNECTABLE set prop success " Grzegorz Kolodziejczyk
2013-12-30 14:25 ` [PATCH 3/5] android/tester: Add BONDED_DEVICES set prop fail " Grzegorz Kolodziejczyk
2013-12-30 14:25 ` [PATCH 4/5] android/tester: Add CLASS_OF_DEVICE get prop success " Grzegorz Kolodziejczyk
2013-12-30 14:25 ` [PATCH 5/5] android/tester: Add TYPE_OF_DEVICE " Grzegorz Kolodziejczyk
2013-12-30 15:30 ` Szymon Janc [this message]

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=3694279.3Ynmtzyg3t@athlon \
    --to=szymon.janc@gmail.com \
    --cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox