linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/8] android/tester: Add Socket test invalid params: chan and uuid
@ 2013-12-12 15:17 Andrei Emeltchenko
  2013-12-12 15:17 ` [PATCH 2/8] android/tester: Check that fd is valid for Success case Andrei Emeltchenko
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: Andrei Emeltchenko @ 2013-12-12 15:17 UTC (permalink / raw)
  To: linux-bluetooth

From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>

For the socket listen() call parameters channel and uuid cannot be both
zeroes.
---
 android/android-tester.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/android/android-tester.c b/android/android-tester.c
index a50ed7b..3f763d8 100644
--- a/android/android-tester.c
+++ b/android/android-tester.c
@@ -716,6 +716,16 @@ static const struct socket_data btsock_inv_param_socktype_l2cap = {
 	.expected_status = BT_STATUS_UNSUPPORTED,
 };
 
+/* Test invalid: channel & uuid are both zeroes */
+static const struct socket_data btsock_inv_params_chan_uuid = {
+	.sock_type = BTSOCK_RFCOMM,
+	.channel = 0,
+	.service_uuid = NULL,
+	.service_name = "Test service",
+	.flags = 0,
+	.expected_status = BT_STATUS_PARM_INVALID,
+};
+
 static void setup_socket_interface(const void *test_data)
 {
 	struct test_data *data = tester_get_data();
@@ -795,5 +805,9 @@ int main(int argc, char *argv[])
 			&btsock_inv_param_socktype_l2cap,
 			setup_socket_interface, test_generic_listen, teardown);
 
+	test_bredrle("Test Socket Listen - Invalid: chan, uuid",
+			&btsock_inv_params_chan_uuid,
+			setup_socket_interface, test_generic_listen, teardown);
+
 	return tester_run();
 }
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-12-13 14:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-12 15:17 [PATCH 1/8] android/tester: Add Socket test invalid params: chan and uuid Andrei Emeltchenko
2013-12-12 15:17 ` [PATCH 2/8] android/tester: Check that fd is valid for Success case Andrei Emeltchenko
2013-12-12 15:17 ` [PATCH 3/8] android/tester: trivial: Make test cases prints look nice Andrei Emeltchenko
2013-12-12 15:17 ` [PATCH 4/8] android/tester: Add Socket test success with valid fd Andrei Emeltchenko
2013-12-12 15:17 ` [PATCH 5/8] android/socket: Do not close fd on unref Andrei Emeltchenko
2013-12-13 14:39   ` Johan Hedberg
2013-12-12 15:17 ` [PATCH 6/8] android/tester: Add Socket test connect() invalid sock_type Andrei Emeltchenko
2013-12-12 15:17 ` [PATCH 7/8] android/tester: Add Socket test connect invalid sock_type L2CAP Andrei Emeltchenko
2013-12-12 15:17 ` [PATCH 8/8] android/hal-sock: Fix returning incorrect error code Andrei Emeltchenko
2013-12-13 14:45 ` [PATCH 1/8] android/tester: Add Socket test invalid params: chan and uuid Johan Hedberg

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).