All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] unit/avctp: Add connection establishment dummy tests
Date: Tue, 4 Feb 2014 13:53:49 +0200	[thread overview]
Message-ID: <20140204115347.GL2930@aemeltch-MOBL1> (raw)
In-Reply-To: <1391430198-26823-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>

On Mon, Feb 03, 2014 at 02:23:18PM +0200, Andrei Emeltchenko wrote:
> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>

ping

> 
> Add some tests checking that L2CAP connection is established, so they
> are basically dummy tests.
> ---
>  unit/test-avctp.c | 30 +++++++++++++++++++++++++++---
>  1 file changed, 27 insertions(+), 3 deletions(-)
> 
> diff --git a/unit/test-avctp.c b/unit/test-avctp.c
> index 041e0c0..c0d16a4 100644
> --- a/unit/test-avctp.c
> +++ b/unit/test-avctp.c
> @@ -220,10 +220,8 @@ static struct context *create_context(uint16_t version, gconstpointer data)
>  	return context;
>  }
>  
> -static void execute_context(struct context *context)
> +static void destroy_context(struct context *context)
>  {
> -	g_main_loop_run(context->main_loop);
> -
>  	if (context->source > 0)
>  		g_source_remove(context->source);
>  
> @@ -235,6 +233,13 @@ static void execute_context(struct context *context)
>  	g_free(context);
>  }
>  
> +static void execute_context(struct context *context)
> +{
> +	g_main_loop_run(context->main_loop);
> +
> +	destroy_context(context);
> +}
> +
>  static void test_client(gconstpointer data)
>  {
>  	struct context *context = create_context(0x0100, data);
> @@ -253,6 +258,13 @@ static void test_server(gconstpointer data)
>  	execute_context(context);
>  }
>  
> +static void test_dummy(gconstpointer data)
> +{
> +	struct context *context = create_context(0x0100, data);
> +
> +	destroy_context(context);
> +}
> +
>  int main(int argc, char *argv[])
>  {
>  	g_test_init(&argc, &argv, NULL);
> @@ -260,6 +272,18 @@ int main(int argc, char *argv[])
>  	if (g_test_verbose())
>  		__btd_log_init("*", 0);
>  
> +	/* Connection Channel Management tests */
> +
> +	/*
> +	 * Tests are checking that IUT is able to request establishing
> +	 * channels, since we already have connection through socketpair
> +	 * the tests are dummy.
> +	 */
> +	define_test("/TP/CCM/BV-01-C", test_dummy, raw_pdu(0x00));
> +	define_test("/TP/CCM/BV-02-C", test_dummy, raw_pdu(0x00));
> +	define_test("/TP/CCM/BV-03-C", test_dummy, raw_pdu(0x00));
> +	define_test("/TP/CCM/BV-04-C", test_dummy, raw_pdu(0x00));
> +
>  	define_test("/TP/NFR/BV-01-C", test_client,
>  				raw_pdu(0x00, 0x11, 0x0e, 0x00, 0x00, 0x00));
>  
> -- 
> 1.8.3.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2014-02-04 11:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-03 12:23 [PATCH] unit/avctp: Add connection establishment dummy tests Andrei Emeltchenko
2014-02-04 11:53 ` Andrei Emeltchenko [this message]
2014-02-04 13:46   ` Luiz Augusto von Dentz

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=20140204115347.GL2930@aemeltch-MOBL1 \
    --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 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.