|
From: Anders J. <and...@us...> - 2001-07-30 16:53:45
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
unplug_test.c 1.1 1.2=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added isInitalized to run the initialization first time the process_cmd is =
called
The diff of the modified file(s):
--- unplug_test.c 2001/07/30 11:03:11 1.1
+++ unplug_test.c 2001/07/30 16:53:43 1.2
@@ -251,6 +251,7 @@
=20
#define UPDATA_MAXLEN 16384
static u8 tmpdata[UPDATA_MAXLEN];
+static u8 isInitialized =3D 0;
=20
void
unplug_test_init()
@@ -263,6 +264,7 @@
for (i =3D 0; i < UPDATA_MAXLEN; i++) {
*(tmpdata+i) =3D (u8) i%0x100;
}
+ isInitialized =3D 1;
}
=20
#define SERVER 0
@@ -1378,6 +1380,11 @@
=20
void process_test_cmd(s32 test_case)
{
+ if(!isInitialized)
+ {
+ unplug_test_init();
+ }
+=20=20=20=20
printf("test_case %d\n",test_case);
=20
switch(test_case){
|
|
From: Peter K. <pk...@us...> - 2001-07-31 19:28:57
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
unplug_test.c 1.2 1.3=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Corrected includes.
* Made all local functions static.
* Corrected indentation.
The diff of the modified file(s):
--- unplug_test.c 2001/07/30 16:53:43 1.2
+++ unplug_test.c 2001/07/31 19:28:55 1.3
@@ -41,34 +41,26 @@
=20
#define __NO_VERSION__ /* don't define kernel_version in module.h */
=20
-#ifndef UNPLUG_TEST_C=20
-#define UNPLUG_TEST_C
+#ifdef __KERNEL__
+#include <linux/malloc.h>
=20
+#include <linux/bluetooth/hci.h>
+#include <linux/bluetooth/l2cap_con.h>
+#include <linux/bluetooth/sdp.h>
+#include <linux/bluetooth/tcs.h>
+#include <linux/bluetooth/test.h>
+#include <linux/bluetooth/rfcomm.h>
+#include <linux/bluetooth/btcommon.h>
+#else
#include <string.h>
=20
-#ifdef BTD_USERSTACK
-#include "include/btmem.h"
#include "include/hci.h"
-#include "include/l2cap.h"
#include "include/l2cap_con.h"
#include "include/sdp.h"
#include "include/tcs.h"
#include "include/test.h"
#include "include/rfcomm.h"
-#include "include/btdebug.h"
#include "include/btcommon.h"
-#else
-#include <linux/bluetooth/btmem.h>
-#include <linux/bluetooth/hci.h>
-#include <linux/bluetooth/l2cap.h>
-#include <linux/bluetooth/l2cap_con.h>
-#include <linux/bluetooth/sdp.h>
-#include <linux/bluetooth/tcs.h>
-#include <linux/bluetooth/test.h>
-#include <linux/bluetooth/rfcomm.h>
-#include <linux/bluetooth/btdebug.h>
-#include <linux/bluetooth/btcommon.h>
-#define printf printk
#endif
=20
=20
@@ -251,10 +243,10 @@
=20
#define UPDATA_MAXLEN 16384
static u8 tmpdata[UPDATA_MAXLEN];
-static u8 isInitialized =3D 0;
+static u8 test_is_initialized =3D 0;
=20
-void
-unplug_test_init()
+static void
+unplug_test_init(void)
{
/* initializes temp data */
s32 i;
@@ -264,21 +256,21 @@
for (i =3D 0; i < UPDATA_MAXLEN; i++) {
*(tmpdata+i) =3D (u8) i%0x100;
}
- isInitialized =3D 1;
+ test_is_initialized =3D 1;
}
=20
#define SERVER 0
#define CLIENT 1
=20
-void test_server(void)
+static void test_server(void)
{
- printf("Now we are test server (device A)\n");
+ printk("Now we are test server (device A)\n");
test_role =3D SERVER;
}
=20
-void test_client(void)
+static void test_client(void)
{
- printf("Now we are test client (device B)\n");
+ printk("Now we are test client (device B)\n");
test_role =3D CLIENT;
}
=20
@@ -310,42 +302,42 @@
* Test case : Data transfer via Open L2CAP Channel (L2CAP Test 3)
*/
=20
-void test_2_2_1(void)
+static void test_2_2_1(void)
{
/* client sends 10 bytes */
printk("test_2_2_1, client sends 10 bytes\n");=20
test_send_data(testcon, tmpdata, 10);
}
=20
-void test_2_2_2(void)
+static void test_2_2_2(void)
{
/* client sends 350 bytes */
printk("test_2_2_2, client sends 350 bytes\n");=20
test_send_data(testcon, tmpdata, 350);
}
=20
-void test_2_2_3(void)
+static void test_2_2_3(void)
{
/* client sends 672 bytes */
printk("test_2_2_3, client sends 672 bytes\n");=20
test_send_data(testcon, tmpdata, 672);
}
=20
-void test_2_2_4(void)
+static void test_2_2_4(void)
{
/* server sends 10 bytes */
printk("test_2_2_4, server sends 10 bytes\n");=20
test_send_data(testcon, tmpdata, 10);
}
=20
-void test_2_2_5(void)
+static void test_2_2_5(void)
{
/* server sends 350 bytes */
printk("test_2_2_5, server sends 350 bytes\n");=20
test_send_data(testcon, tmpdata, 350);
}
=20
-void test_2_2_6(void)
+static void test_2_2_6(void)
{
/* server sends 672 bytes */
printk("test_2_2_6, server sends 672 bytes\n");=20
@@ -373,7 +365,7 @@
*/
=20
=20
-void test_2_5_1(void)
+static void test_2_5_1(void)
{
/* FIXME - Client sends configure request with MTU 4096 */
if(l2ca_config_req(testcon, 48, NULL, 0, 0)){
@@ -381,7 +373,7 @@
}
}
=20
-void test_2_5_3(void)
+static void test_2_5_3(void)
{
/* FIXME - Server sends configure request with MTU 16384 */
if(l2ca_config_req(testcon, 16384, NULL, 0xffff, 0)){
@@ -389,21 +381,19 @@
}
}
=20
-void test_2_5_4(void)
+static void test_2_5_4(void)
{
-=20
/* FIXME - Client responds success in configure response */
-=20
}
=20
-void test_2_5_5(void)
+static void test_2_5_5(void)
{
/* Client sends 8192 bytes of data */
printk("test_2_5_6, client sends 8192 bytes\n");
test_send_data(testcon, tmpdata, 8192);
}
=20
-void test_2_5_6(void)
+static void test_2_5_6(void)
{
printk("test_2_5_6, server sends 4096 bytes\n");
/* Server sends 4096 bytes of data */
@@ -414,7 +404,7 @@
* Test case : Connection reject on psm 0x4561
*/
=20
-void test_2_6_1(void)
+static void test_2_6_1(void)
{
printk("Now disabling test psm\n");
disable_testpsm =3D 1;
@@ -431,37 +421,37 @@
*/
=20
=20
-void test_2_7_2()
+static void test_2_7_2(void)
{
printk("Emulating authorization pending...\n");
emulate_pending =3D 1;
}
=20
-void test_2_8_1()
+static void test_2_8_1(void)
{
printk("Client sends 350 bytes on testcon 1\n");
test_send_data(testcon, tmpdata, 350);
}
=20
-void test_2_8_2()
+static void test_2_8_2(void)
{
printk("Server sends 350 bytes on testcon 1\n");
test_send_data(testcon, tmpdata, 350);
}
=20
-void test_2_8_3()
+static void test_2_8_3(void)
{
printk("Client sends 350 bytes on testcon 2\n");
test_send_data(testcon2, tmpdata, 350);
}
=20
-void test_2_8_4()
+static void test_2_8_4(void)
{
printk("Server sends 350 bytes on testcon 2\n");
test_send_data(testcon2, tmpdata, 350);
}
=20
-void test_2_9_1()
+static void test_2_9_1(void)
{
printk("Now testing timeout in reconfigure state\n");
printk("Client tries to reconfigure mtu 4096\n");
@@ -471,14 +461,14 @@
}
}
=20
-void test_2_9_2()
+static void test_2_9_2(void)
{
printk("Server won't send a config req back...\n");
dont_send_config_req =3D 1;
}
=20
=20
-void test_2_10()
+static void test_2_10(void)
{
/* set to use mutiple config parameters */
printk("Using multiple config parameters\n");
@@ -499,7 +489,7 @@
} flow;
#endif
=20
-void test_2_13_1()
+static void test_2_13_1(void)
{
flow qos;
init_flow(&qos);
@@ -515,15 +505,15 @@
=20
=20
=20
-void test_2_13_5(void)
+static void test_2_13_5(void)
{
printk("test_2_13_5, client sending 672 bytes\n");=20
test_send_data(testcon, tmpdata, 672);=09
}
=20
-void test_2_13_6(void)
+static void test_2_13_6(void)
{
- printk("test_2_13_5, server sending 672 bytes\n");=20
+ printk("test_2_13_6, server sending 672 bytes\n");=20
test_send_data(testcon, tmpdata, 672);=09
}
=20
@@ -532,185 +522,176 @@
* SDP Stuff
*/
=20
-void sdp_test_52111(void)
+static void sdp_test_52111(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_52111, sdp_data_52111[4] + 5);
}
=20
-void sdp_test_52113(void)
+static void sdp_test_52113(void)
{
static int t =3D 0;
=20
- if (!t)
- {
+ if (!t) {
sdp_send_data(&sdp_con_list[0], sdp_data_52113_1, sdp_data_52113_1[4] =
+ 5);
t =3D 1;
- }
- else
- {
+ } else {
sdp_send_data(&sdp_con_list[0], sdp_data_52113_2, sdp_data_52113_2[4] =
+ 5);
t =3D 0;
}
}
=20
=20
-void sdp_test_52114(void)
+static void sdp_test_52114(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_52114, sdp_data_52114[4] + 5);
}
=20
-void sdp_test_52121(void)
+static void sdp_test_52121(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_52121, sdp_data_52121[4] + 5);
}
=20
-void sdp_test_52122(void)
+static void sdp_test_52122(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_52122, sdp_data_52122[4] + 5);
}
=20
-void sdp_test_53111(void)
+static void sdp_test_53111(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_53111, sdp_data_53111[4] + 5);
}
=20
-void sdp_test_53113(void)
+static void sdp_test_53113(void)
{
static int t =3D 0;
=20=20=20
- if (!t)
- {
+ if (!t) {
sdp_send_data(&sdp_con_list[0], sdp_data_53113_1, sdp_data_53113_2[4] =
+ 5);
t =3D 1;
- }
- else
- {
+ } else {
sdp_send_data(&sdp_con_list[0], sdp_data_53113_2, sdp_data_53113_2[4] =
+ 5);
t =3D 0;
}
}
=20
-void sdp_test_53114(void)
+static void sdp_test_53114(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_53114, sdp_data_53114[4] + 5);
}
=20
-void sdp_test_53115(void)
+static void sdp_test_53115(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_53115, sdp_data_53115[4] + 5);
}
=20
-void sdp_test_53118(void)
+static void sdp_test_53118(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_53118, sdp_data_53118[4] + 5);
}
=20
-void sdp_test_531110(void)
+static void sdp_test_531110(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_531110, sdp_data_531110[4] + 5);
}
=20
-void sdp_test_531117(void)
+static void sdp_test_531117(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_531117, sdp_data_531117[4] + 5);
}
=20
-void sdp_test_531120(void)
+static void sdp_test_531120(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_531120, sdp_data_531120[4] + 5);
}
=20
-void sdp_test_53121(void)
+static void sdp_test_53121(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_53121, sdp_data_53121[4] + 5);
}
=20
-void sdp_test_53122(void)
+static void sdp_test_53122(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_53122, sdp_data_53122[4] + 5);
}
=20
-void sdp_test_53123(void)
+static void sdp_test_53123(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_53123, sdp_data_53123[4] + 5);
}
=20
-void sdp_test_54111(void)
+static void sdp_test_54111(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_54111, sdp_data_54111[4] + 5);
}
=20
-void sdp_test_54112(void)
+static void sdp_test_54112(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_54112, sdp_data_54112[4] + 5);
}
=20
-void sdp_test_54113(void)
+static void sdp_test_54113(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_54113, sdp_data_54113[4] + 5);
}
=20
-void sdp_test_54114(void)
+static void sdp_test_54114(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_54114, sdp_data_54114[4] + 5);
}
=20
-void sdp_test_54116(void)
+static void sdp_test_54116(void)
{
static int t =3D 0;
=20
- if(!t)
- {
+ if (!t) {
sdp_send_data(&sdp_con_list[0], sdp_data_54116_1, sdp_data_54116_1[4] =
+ 5);
t =3D 1;
- }
- else
- {
+ } else {
sdp_send_data(&sdp_con_list[0], sdp_data_54116_2, sdp_data_54116_2[4] =
+ 5);
t =3D 0;
}=20
}
=20
-void sdp_test_541110(void)
+static void sdp_test_541110(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_541110, sdp_data_541110[4] + 5);
}
=20
-void sdp_test_541111(void)
+static void sdp_test_541111(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_541111, sdp_data_541111[4] + 5);
}
=20
-void sdp_test_541112(void)
+static void sdp_test_541112(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_541112, sdp_data_541112[4] + 5);
}
=20
-void sdp_test_541120(void)
+static void sdp_test_541120(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_541120, sdp_data_541120[4] + 5);
}
=20
-void sdp_test_54121(void)
+static void sdp_test_54121(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_54121, sdp_data_54121[4] + 5);
}
=20
-void sdp_test_54122(void)
+static void sdp_test_54122(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_54122, sdp_data_54122[4] + 5);
}
=20
-void sdp_test_55111(void)
+static void sdp_test_55111(void)
{
static int t =3D 0;
=20
- switch(t)
- {
+ switch (t) {
case 0:
sdp_send_data(&sdp_con_list[0], sdp_data_55111_1, sdp_data_55111_1[4] =
+ 5);
t =3D 1;
break;
+
case 1:
sdp_send_data(&sdp_con_list[0], sdp_data_55111_2, sdp_data_55111_2[4] =
+ 5);
t =3D 2;
@@ -742,16 +723,16 @@
}=20
}
=20
-void sdp_test_55112(void)
+static void sdp_test_55112(void)
{
static int t =3D 0;
=20
- switch(t)
- {
+ switch (t) {
case 0:
sdp_send_data(&sdp_con_list[0], sdp_data_55112_1, sdp_data_55112_1[4] =
+ 5);
t =3D 1;
break;
+
case 1:
sdp_send_data(&sdp_con_list[0], sdp_data_55112_2, sdp_data_55112_2[4] =
+ 5);
t =3D 0;
@@ -764,7 +745,7 @@
* Serial Port Profile Stuff
*/
=20
-void spp_test_52211(void)
+static void spp_test_52211(void)
{
static int t =3D 0;
=20=20=20
@@ -777,17 +758,20 @@
sdp_send_data(&sdp_con_list[0], sdp_query, sdp_query[4] + 5);
t++;
break;
+
case 1:
- printf(__FUNCTION__": Establish RFCOMM on channel 0\n");
+ printk(__FUNCTION__": Establish RFCOMM on channel 0\n");
t++;
break;
- printf(__FUNCTION__": Establish RFCOMM on channel 2\n");
+
+ case 2:
+ printk(__FUNCTION__": Establish RFCOMM on channel 2\n");
t =3D 0;
break;
}
}
=20
-void spp_test_52311(void)
+static void spp_test_52311(void)
{
static int t =3D 0;
=20
@@ -796,6 +780,7 @@
hci_sniff_mode(rfcomm_con_list[0].l2cap->hci_hdl, 0xff, 0xf0, 0x10, 0x=
05);
t =3D 1;
break;
+
case 1:
hci_exit_sniff_mode(rfcomm_con_list[0].l2cap->hci_hdl);
t =3D 0;
@@ -803,7 +788,7 @@
}
}
=20
-void spp_test_52312(void)
+static void spp_test_52312(void)
{
static int t =3D 0;
=20
@@ -812,6 +797,7 @@
hci_park_mode(rfcomm_con_list[0].l2cap->hci_hdl, 0xfff, 0xf0);
t =3D 1;
break;
+
case 1:
hci_exit_park_mode(rfcomm_con_list[0].l2cap->hci_hdl);
t =3D 0;
@@ -819,76 +805,77 @@
}
}
=20
-void spp_test_52313(void)
+static void spp_test_52313(void)
{
hci_hold_mode(rfcomm_con_list[0].l2cap->hci_hdl, 0xfff, 0xf0);
}
=20
-void spp_test_52314(void)
+static void spp_test_52314(void)
{
- printf(__FUNCTION__": Do test 52211, then do a M/S switch\n");
+ printk(__FUNCTION__": Do test 52211, then do a M/S switch\n");
}
=20
=20
-void spp_test_53112(void)
+static void spp_test_53112(void)
{
/* Establish a L2CAP channel in PSM 3 (RFCOMM), before doing this test */
=20
rfcomm_sabm_msg(&rfcomm_con_list[0], 0);
}
=20
-void spp_test_53211(void)
-{ /* This test has to be done rigth after test 53112 */
+static void spp_test_53211(void)
+{
+ /* This test has to be done rigth after test 53112 */
=20
rfcomm_disc_msg(&rfcomm_con_list[0], 0);
}
=20
-void spp_test_53312(void)
+static void spp_test_53312(void)
{
- /* Establish a L2CAP channel in PSM 3 (RFCOMM), and establish DLCI 0 bef=
ore
- doing this test */
+ /* Establish a L2CAP channel in PSM 3 (RFCOMM), and establish DLCI 0
+ before doing this test */
=20
rfcomm_sabm_msg(&rfcomm_con_list[0], 2);
}
=20
-void spp_test_53411(void)
+static void spp_test_53411(void)
{
- /* Establish a L2CAP channel in PSM 3 (RFCOMM), and establish DLCI 0 and=
2
- before doing this test */
-
- /* Here the BAP should send the disc command so we just have to wait for
- that, rf_disc should probably work in the BAP */
+ /* Establish a L2CAP channel in PSM 3 (RFCOMM), and establish DLCI 0
+ and 2 before doing this test */
=20=09
+ /* Here the BAP should send the disc command so we just have to wait
+ for that, rf_disc should probably work in the BAP */
}
=20
-void spp_test_53412(void)
-{ /* This test has to be done rigth after test 53116 */
+static void spp_test_53412(void)
+{
+ /* This test has to be done rigth after test 53116 */
=20
rfcomm_disc_msg(&rfcomm_con_list[0], 2);
}
=20
-void spp_test_53511(void)
+static void spp_test_53511(void)
{
- /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also have=
to
- verify so both sides have sent a MSC command with flow on */
+ /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also
+ have to verify so both sides have sent a MSC command with flow on */
=20
/* Send data from the BAp with the rf_send command */
=20=20=20
rfcomm_msc_msg(&rfcomm_con_list[0], 0x85 ,MCC_CMD, 2);
}
=20
-void spp_test_53611(void)
+static void spp_test_53611(void)
{
- /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also have=
to
- verify so both sides have sent a MSC command with flow on */
+ /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also
+ have to verify so both sides have sent a MSC command with flow on */
=20=20=20
/* Then send data from the BAP with the rf_send command */
}
=20
-void spp_test_53711(void)
+static void spp_test_53711(void)
{
- /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also have=
to
- verify so both sides have sent a MSC command with flow on */
+ /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also
+ have to verify so both sides have sent a MSC command with flow on */
=20
unsigned char data[] =3D {0,1,2,3,4,5,6,7,9};
=20=20=20
@@ -896,39 +883,40 @@
rfcomm_test_msg(&rfcomm_con_list[0], data, 10, MCC_CMD);
}
=20
-void spp_test_53811(void)
+static void spp_test_53811(void)
{
- /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also have=
to
- verify so both sides have sent a MSC command with flow on */
+ /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also
+ have to verify so both sides have sent a MSC command with flow on */
=20
static int t =3D 0;
=20
switch (t) {
case 0:
rfcomm_fcoff_msg(&rfcomm_con_list[0], MCC_CMD);
- printf(__FUNCTION__": Flow is set to OFF\n");
+ printk(__FUNCTION__": Flow is set to OFF\n");
t++;
break;
+
case 1:
rfcomm_fcon_msg(&rfcomm_con_list[0], MCC_CMD);
- printf(__FUNCTION__": Flow is set to ON\n");
+ printk(__FUNCTION__": Flow is set to ON\n");
t =3D 0;
break;
}
}
=20
-void spp_test_53911(void)
+static void spp_test_53911(void)
{
- /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also have=
to
- verify so both sides have sent a MSC command with flow on */
+ /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also
+ have to verify so both sides have sent a MSC command with flow on */
=20
rfcomm_rls_msg(&rfcomm_con_list[0], MCC_CMD, 2, 0x05);
}
=20
-void spp_test_531011(void)
+static void spp_test_531011(void)
{
- /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also have=
to
- verify so both sides have sent a MSC command with flow on */
+ /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also
+ have to verify so both sides have sent a MSC command with flow on */
=20
static int t =3D 0;
=20=20=20
@@ -937,29 +925,30 @@
rfcomm_pn_msg(&rfcomm_con_list[0], 2, 0, 1000);
t++;
break;
+
case 1:
rfcomm_pn_msg(&rfcomm_con_list[0], 2, 0, 667);
break;
}
}
=20
-void spp_test_531111(void)
+static void spp_test_531111(void)
{
- /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also have=
to
- verify so both sides have sent a MSC command with flow on */
+ /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also
+ have to verify so both sides have sent a MSC command with flow on */
=20
rfcomm_rpn_msg(&rfcomm_con_list[0], MCC_CMD, 4, 0);
}
=20
-void spp_test_531112(void)
+static void spp_test_531112(void)
{
- /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also have=
to
- verify so both sides have sent a MSC command with flow on */
+ /* Do test 52211 before to establish RFCOMM, DLCI 1 and 2. You also
+ have to verify so both sides have sent a MSC command with flow on */
=20
rfcomm_rpn_msg(&rfcomm_con_list[0], MCC_CMD, 4, 1);
}
=20
-void spp_test_55111(void)
+static void spp_test_55111(void)
{
/* Establish a L2CAP channel on PSM 1 (SDP) before doing this test */
=20
@@ -969,7 +958,7 @@
sdp_send_data(&sdp_con_list[0], sdp_query, sdp_query[4] + 5);
}
=20
-void spp_test_55112(void)
+static void spp_test_55112(void)
{
/* Establish a L2CAP channel on PSM 1 (SDP) before doing this test */
=20
@@ -978,11 +967,10 @@
0x09, 0x00, 0x01, 0x09, 0x00, 0x04, 0x09, 0x01,
0x00, 0x00};
=20
-
sdp_send_data(&sdp_con_list[0], sdp_query, sdp_query[4] + 5);
}
=20
-void spp_test_55113(void)
+static void spp_test_55113(void)
{
/* Establish a L2CAP channel on PSM 1 (SDP) before doing this test */
=20
@@ -991,12 +979,11 @@
0x09, 0x09, 0x00, 0x01, 0x09, 0x00, 0x04, 0x09,
0x01, 0x00, 0x00};
=20
-
sdp_send_data(&sdp_con_list[0], sdp_query, sdp_query[4] + 5);
}
=20
=20
-void spp_test_56211(void)
+static void spp_test_56211(void)
{
/* Run the hci_write_encryption_mode(1) in hci_init */
}
@@ -1005,41 +992,41 @@
* RFCOMM stuff=20
*/
=20
-void test_4_1(void)
+static void test_4_1(void)
{
/* Create a connection */
printk("Please use rf_conn server channel 2\n");
}
=20
-void test_4_2_1(void)
+static void test_4_2_1(void)
{
/* Send stop flow command on dlci 4*/
printk("test_4_2\n");
rfcomm_msc_msg(&rfcomm_con_list[0], 0x87 ,MCC_CMD, 4);
}
=20
-void test_4_2_2(void)
+static void test_4_2_2(void)
{
/* Send start flow command on dlci 4 */
printk("test_4_2\n");
rfcomm_msc_msg(&rfcomm_con_list[0], 0x85 ,MCC_CMD, 4);
}
=20
-void test_4_2_3(void)
+static void test_4_2_3(void)
{
/* Send start flow command on dlci 4 */
printk("test_4_2\n");
rfcomm_msc_msg(&rfcomm_con_list[0], 0x85 ,MCC_CMD, 3);
}
=20
-void test_4_2_4(void)
+static void test_4_2_4(void)
{
/* Send start flow command on dlci 4 */
printk("test_4_2\n");
rfcomm_msc_msg(&rfcomm_con_list[0], 0x85 ,MCC_CMD, 2);
}
=20
-void test_4_3(void)
+static void test_4_3(void)
{
/* Here we should send data after we received a flow stop command */
printk("test_4_3\n");
@@ -1049,20 +1036,20 @@
}
}
=20
-void test_4_4(void)
+static void test_4_4(void)
{
/* If we should initiate the disconnection we do this */
printk("test_4_4\n");
rfcomm_disconnect_req(0);
}
=20
-void test_4_5_1(void)
+static void test_4_5_1(void)
{
printk("test_4_5_1\n");
rfcomm_rpn_msg(&rfcomm_con_list[0], MCC_CMD, 4, 1);
}
=20
-void test_4_5_2(void)
+static void test_4_5_2(void)
{
printk("test_4_5_2\n");
rpn_val.rtr_input =3D 1;
@@ -1074,7 +1061,7 @@
rpn_val.pm.rtr_output =3D 0;
}
=20
-void test_4_6(void)
+static void test_4_6(void)
{
u8 data[1];
=20
@@ -1084,54 +1071,53 @@
rfcomm_test_msg(&rfcomm_con_list[0], data, 1, MCC_CMD);
}
=20
-void test_4_7(void)
+static void test_4_7(void)
{
-=09
printk("test_4_7\n");
rfcomm_rls_msg(&rfcomm_con_list[0], MCC_CMD, 4, 0x03);
}
=20
-void test_4_8_1(void)
+static void test_4_8_1(void)
{
/* Here we send a fcoff command */
printk("test_4_8\n");
rfcomm_fcoff_msg(&rfcomm_con_list[0], MCC_CMD);
}
=20
-void test_4_8_2(void)
+static void test_4_8_2(void)
{
/* Here we send a fcon command */
printk("test_4_8\n");
rfcomm_fcon_msg(&rfcomm_con_list[0], MCC_CMD);
}
=20
-void test_4_9(void)
+static void test_4_9(void)
{
/* Test to send data after received fcoff command */
printk("test_4_9\n");
test_4_3();
}
=20
-void test_4_10(void)
+static void test_4_10(void)
{
/* Create a connection on serverchannel one */
printk("Please use rfcomm_connect server channel 1, line 0 instead\n");
}
=20
-void test_4_11(void)
+static void test_4_11(void)
{
/* Same as test 4.10, but here we should be the responder */
printk("test_4_11\n");
test_4_10();
}
=20
-void test_4_12(void)
+static void test_4_12(void)
{
printk("test_4_12\n");
test_4_4();
}
=20
-void test_4_13(void)
+static void test_4_13(void)
{=09
printk("test_4_13\n");
rfcomm_set_mtu(&rfcomm_con_list[0], 4, 500);
@@ -1139,31 +1125,31 @@
printk("Please use rfcomm_connect server channel 2, line 0 to connect\n"=
);
}
=20
-void test_4_14(void)
+static void test_4_14(void)
{
printk("test_4_14\n");
printk("PLease use rfcomm_conn on serverchannel 4\n");
}
=20
-void test_4_15(void)
+static void test_4_15(void)
{
printk("test_4_15\n");
rfcomm_crap_msg(&rfcomm_con_list[0]);
}
=20
-void test_4_16(void)
+static void test_4_16(void)
{
printk("test_4_16\n");
rfcomm_msc_msg(&rfcomm_con_list[0], 0x8d ,MCC_CMD, 8);
}
=20
-void test_4_21_1(void)
+static void test_4_21_1(void)
{
printk("test_4_21_1\n");
rfcomm_rpn_msg(&rfcomm_con_list[0], MCC_CMD, 2, 1);
}
=20
-void test_4_21_2(void)
+static void test_4_21_2(void)
{
printk("test_4_21_2\n");
rpn_val.rtr_input =3D 1;
@@ -1175,7 +1161,7 @@
rpn_val.pm.rtr_output =3D 0;
}
=20
-void test_4_22_1(void)
+static void test_4_22_1(void)
{
printk("test_4_22_1\n");
rpn_val.rtr_input =3D 1;
@@ -1187,98 +1173,97 @@
rpn_val.pm.rtr_output =3D 0;
}
=20
-void test_4_22_2(void)
+static void test_4_22_2(void)
{
printk("test_4_22_2\n");
rfcomm_sabm_msg(&rfcomm_con_list[0], 2);;
}
=20
-void test_4_22_3(void)
+static void test_4_22_3(void)
{
printk("test_4_21_1\n");
rfcomm_rpn_msg(&rfcomm_con_list[0], MCC_CMD, 2, 1);
}
=20
-void test_4_23_1(void)
+static void test_4_23_1(void)
{
printk("test_4_23_1\n");
test_4_22_1();
}
=20
-void test_4_23_2(void)
+static void test_4_23_2(void)
{
printk("test_4_23_2\n");
rfcomm_pn_msg(&rfcomm_con_list[0], 2, 0, 127);
}
=20
-void test_4_23_3(void)
+static void test_4_23_3(void)
{
printk("test_4_23_2\n");
rfcomm_sabm_msg(&rfcomm_con_list[0], 2);
}
=20
-void test_4_23_4(void)
+static void test_4_23_4(void)
{
printk("test_4_23_1\n");
test_4_22_3();
}
=20
-void test_4_24_1(void)
+static void test_4_24_1(void)
{
printk("test_4_23_1\n");
test_4_23_2();
}
=20
-void test_4_24_2(void)
+static void test_4_24_2(void)
{
printk("test_4_23_2\n");
test_4_23_1();
}
=20
-void test_4_24_3(void)
+static void test_4_24_3(void)
{
printk("test_4_23_2\n");
rfcomm_sabm_msg(&rfcomm_con_list[0], 2);
-=20=20
}
=20
-void test_4_24_4(void)
+static void test_4_24_4(void)
{
printk("test_4_23_1\n");
rfcomm_sabm_msg(&rfcomm_con_list[0], 2);
}
=20
-void test_4_25_1(void)
+static void test_4_25_1(void)
{
printk("test_4_25_1\n");
rfcomm_pn_msg(&rfcomm_con_list[0], 2, 0, 500);
}
=20
-void test_4_25_2(void)
+static void test_4_25_2(void)
{
printk("test_4_25_2\n");
rfcomm_con_list[0].l2cap->local_mtu =3D 65;
}
=20
-void test_4_25_3(void)
+static void test_4_25_3(void)
{
printk("test_4_25_3\n");
rfcomm_sabm_msg(&rfcomm_con_list[0] ,2);=20
}
=20
-void test_4_26(void)
+static void test_4_26(void)
{
printk("test_4_26\n");
rfcomm_pn_msg(&rfcomm_con_list[0], 4, 0, 127);
}
=20
-void test_4_27(void)
+static void test_4_27(void)
{
printk("test_4_27\n");
rfcomm_pn_msg(&rfcomm_con_list[0], 4, 10, 127);
}
=20
-void test_4_28(void)
+static void test_4_28(void)
{
printk("test_4_28\n");
rfcomm_send_credits(&rfcomm_con_list[0], 4, 10);
@@ -1290,7 +1275,7 @@
* TCS stuff
*/
=20
-void test_5_1(void)
+static void test_5_1(void)
{
if (!tcs[0].l2cap) {
printk("Please connect TCS first with tcs_connect bd_addr\n");
@@ -1299,7 +1284,7 @@
tcs_setup(tcs[0].l2cap, NULL, 0);
}
=20
-void test_5_1_1(void)
+static void test_5_1_1(void)
{
u8 nbr[2];
=20
@@ -1325,7 +1310,7 @@
}
=20
=20
-void test_5_2(void)
+static void test_5_2(void)
{
if (!tcs[0].l2cap) {
printk("Please connect TCS first with tcs_connect bd_addr\n");
@@ -1334,7 +1319,7 @@
tcs_connect(tcs[0].l2cap);
}
=20
-void test_5_3(void)
+static void test_5_3(void)
{
if (!tcs[0].l2cap) {
printk("Please connect TCS first with tcs_connect bd_addr\n");
@@ -1343,22 +1328,22 @@
tcs_disconnect(tcs[0].l2cap);
}
=20
-void test_5_4(void)
+static void test_5_4(void)
{
test_5_1();
}
=20
-void test_5_5(void)
+static void test_5_5(void)
{
test_5_2();
}
=20
-void test_5_6(void)
+static void test_5_6(void)
{
test_5_3();
}
=20
-void test_5_7(void)
+static void test_5_7(void)
{
if (!tcs[0].l2cap) {
printk("Please connect TCS first with tcs_connect bd_addr\n");
@@ -1367,9 +1352,10 @@
tcs_send_information(tcs[0].l2cap, '1');
}
=20
-void test_gateway_call()
+static void test_gateway_call(void)
{
unsigned char *atd =3D "ATD4257272353\r\n";
+
printk("test_gateway_call, sending %s\n", atd);
rfcomm_send_data(CREATE_RFCOMM_ID(0,2), atd, strlen(atd));
}
@@ -1379,16 +1365,14 @@
*/
=20
void process_test_cmd(s32 test_case)
-{
- if(!isInitialized)
{
+ if (!test_is_initialized) {
unplug_test_init();
}
=20=20=20=20=20
- printf("test_case %d\n",test_case);
+ printk("test_case %d\n",test_case);
=20
switch(test_case){
-=20=20=20=20
case 0: test_server();
break;
case 1: test_client();
@@ -1641,9 +1625,7 @@
break;
=20
default:
- printf("Unknown test case\n");
+ printk("Unknown test case\n");
break;
}
}
-
-#endif /* UNPLUG_TEST_C */
|
|
From: Mattias A. <mat...@us...> - 2001-08-27 15:22:05
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
unplug_test.c 1.4 1.5=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* added real unplug SDP test cases
The diff of the modified file(s):
--- unplug_test.c 2001/08/02 16:04:47 1.4
+++ unplug_test.c 2001/08/27 15:22:04 1.5
@@ -80,6 +80,76 @@
extern s32 disable_testpsm;
s32 test_role;
=20
+/* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */=
=20
+/* Unplug Test Cases 1-13 */
+
+/* [Test-01] Service search request for UUID 0x1103 (DialUp Profile) */
+unsigned char q1_1[] =3D {0x02, 0x77, 0x77, 0x00, 0x08,
+ 0x35, 0x03, 0x19, 0x11, 0x03, 0x00, 0xff, 0x00};
+
+/* Service attribute request for Rec Hdl 00010000
+ * Attr : ProtDescrList=20
+ */
+unsigned char q1_2[] =3D {0x04, 0x77, 0x77, 0x00, 0x0c,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0x35, 0x03,
+ 0x09, 0x00, 0x04, 0x00};
+
+/* [Test-02] Service browsing.=20
+ * Service Search Attribute Req for UUID 1002 (Public=20
+ * Browse Group) Attr : ServiceName=20
+ */
+unsigned char q2[] =3D {0x06, 0x77, 0x77, 0x00, 0x0d,
+ 0x35, 0x03, 0x19, 0x10, 0x02, 0x00, 0xff, 0x35,
+ 0x03, 0x09, 0x01, 0x00, 0x00};
+
+/* [Test-3]=20
+ * Continued query with limiting MaximumAttrByteCount
+ */
+unsigned char q3_1[] =3D {0x06, 0x77, 0x77, 0x00, 0x0f,
+ 0x35, 0x03, 0x19, 0x11, 0x05, 0x00, 0x45, 0x35,
+ 0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00};
+
+/* The continued request */
+unsigned char q3_2[] =3D {0x06, 0x88, 0x88, 0x00, 0x13,
+ 0x35, 0x03, 0x19, 0x11, 0x05, 0x00, 0x45, 0x35,
+ 0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00};
+
+/* [Test-04]=20
+ * Search for non-existing service=20
+ */
+unsigned char q4[] =3D {0x02, 0x88, 0x88, 0x00, 0x08,
+ 0x35, 0x03, 0x19, 0x12, 0x35, 0x00, 0xff, 0x00};
+
+unsigned char q5[] =3D {0x04, 0x88, 0x88, 0x00, 0x0c,
+ 0x12, 0x34, 0x56, 0x78, 0x00, 0xff, 0x35, 0x03,
+ 0x09, 0x00, 0x06, 0x00};
+
+unsigned char q6[] =3D {0x06, 0x88, 0x88, 0x00, 0x0d,
+ 0x35, 0x03, 0x19, 0x11, 0x11, 0x00, 0xff, 0x35, 0x03,
+ 0x09, 0xab, 0xcd, 0x00};
+
+unsigned char q7[] =3D {0x04, 0x88, 0x88, 0x00, 0x50,
+ 0x00, 0x01, 0x00, 0x02, 0x00, 0xff, 0x35, 0x03, 0x09,
+ 0x00, 0x09, 0x00};
+
+unsigned char q8[] =3D {0x06, 0x88, 0x88, 0x00, 0x0d,
+ 0x35, 0x03, 0x09, 0x11, 0x11, 0x00, 0xff, 0x35, 0x03,
+ 0x09, 0x00, 0x09, 0x00};
+
+unsigned char q9[] =3D {0x06, 0x88, 0x88, 0x00, 0x13,
+ 0x35, 0x09, 0x19, 0x11, 0x05, 0x19, 0x00, 0x03, 0x19,
+ 0x01, 0x00, 0x00, 0xff, 0x35, 0x03, 0x09, 0x00, 0x04,
+ 0x00};
+
+unsigned char q10[] =3D {0x02, 0x88, 0x88, 0x00, 0x08,
+ 0x35, 0x03, 0x19, 0x00, 0x03, 0x00, 0x02, 0x00};
+
+unsigned char q11[] =3D {0x04, 0x88, 0x88, 0x00, 0x12,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0x35, 0x09, 0x09,
+ 0x00, 0x06, 0x09, 0x00, 0x11, 0x09, 0x01, 0x00, 0x00};
+
+/* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */=
=20
+
unsigned char sdp_data_52111[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08,
0x35, 0x03, 0x19, 0x00, 0x01, 0x00, 0xff,
0x00 };
@@ -241,8 +311,7 @@
0x35, 0x05, 0x0a, 0x00, 0x00, 0xff, 0xff,
0x00 };
=20
-#define UPDATA_MAXLEN 16384
-static u8 tmpdata[UPDATA_MAXLEN];
+extern u8 testdata[];
static u8 test_is_initialized =3D 0;
=20
static void
@@ -253,8 +322,8 @@
printk("Initializing Unplug Test\n");
=20
/* group data into 0xff chunks */
- for (i =3D 0; i < UPDATA_MAXLEN; i++) {
- *(tmpdata+i) =3D (u8) i%0x100;
+ for (i =3D 0; i < UPTEST_DATA_LEN; i++) {
+ *(testdata+i) =3D (u8) i%0x100;
}
test_is_initialized =3D 1;
}
@@ -304,42 +373,42 @@
{
/* client sends 10 bytes */
printk("test_2_2_1, client sends 10 bytes\n");=20
- test_send_data(testcon, tmpdata, 10);
+ test_send_data(testcon, testdata, 10);
}
=20
static void test_2_2_2(void)
{
/* client sends 350 bytes */
printk("test_2_2_2, client sends 350 bytes\n");=20
- test_send_data(testcon, tmpdata, 350);
+ test_send_data(testcon, testdata, 350);
}
=20
static void test_2_2_3(void)
{
/* client sends 672 bytes */
printk("test_2_2_3, client sends 672 bytes\n");=20
- test_send_data(testcon, tmpdata, 672);
+ test_send_data(testcon, testdata, 672);
}
=20
static void test_2_2_4(void)
{
/* server sends 10 bytes */
printk("test_2_2_4, server sends 10 bytes\n");=20
- test_send_data(testcon, tmpdata, 10);
+ test_send_data(testcon, testdata, 10);
}
=20
static void test_2_2_5(void)
{
/* server sends 350 bytes */
printk("test_2_2_5, server sends 350 bytes\n");=20
- test_send_data(testcon, tmpdata, 350);
+ test_send_data(testcon, testdata, 350);
}
=20
static void test_2_2_6(void)
{
/* server sends 672 bytes */
printk("test_2_2_6, server sends 672 bytes\n");=20
- test_send_data(testcon, tmpdata, 672);
+ test_send_data(testcon, testdata, 672);
}
=20
/*
@@ -398,14 +467,14 @@
{
/* Client sends 8192 bytes of data */
printk("Sends 8192 bytes\n");
- test_send_data(testcon, tmpdata, 8192);
+ test_send_data(testcon, testdata, 8192);
}
=20
static void test_2_5_6(void)
{
printk("Sending 4096 bytes\n");
/* Server sends 4096 bytes of data */
- test_send_data(testcon, tmpdata, 4096);
+ test_send_data(testcon, testdata, 4096);
}
=20
/*
@@ -438,25 +507,25 @@
static void test_2_8_1(void)
{
printk("Client sends 350 bytes on testcon 1\n");
- test_send_data(testcon, tmpdata, 350);
+ test_send_data(testcon, testdata, 350);
}
=20
static void test_2_8_2(void)
{
printk("Server sends 350 bytes on testcon 1\n");
- test_send_data(testcon, tmpdata, 350);
+ test_send_data(testcon, testdata, 350);
}
=20
static void test_2_8_3(void)
{
printk("Client sends 350 bytes on testcon 2\n");
- test_send_data(testcon2, tmpdata, 350);
+ test_send_data(testcon2, testdata, 350);
}
=20
static void test_2_8_4(void)
{
printk("Server sends 350 bytes on testcon 2\n");
- test_send_data(testcon2, tmpdata, 350);
+ test_send_data(testcon2, testdata, 350);
}
=20
static void test_2_9_1(void)
@@ -516,20 +585,50 @@
static void test_2_13_5(void)
{
printk("test_2_13_5, client sending 672 bytes\n");=20
- test_send_data(testcon, tmpdata, 672);=09
+ test_send_data(testcon, testdata, 672);=09
}
=20
static void test_2_13_6(void)
{
printk("test_2_13_6, server sending 672 bytes\n");=20
- test_send_data(testcon, tmpdata, 672);=09
+ test_send_data(testcon, testdata, 672);=09
}
=20
-
/*
* SDP Stuff
*/
=20
+void do_sdp_test(int n)
+{
+ unsigned char *q;
+ int q_len;
+ printk(__FUNCTION__" -- %d\n", n);
+ switch(n) {
+=09=09
+ case 101: q =3D q1_1; break;
+ case 102: q =3D q1_2; break;
+ case 2: q =3D q2; break;
+ case 301: q =3D q3_1; break;
+ case 302: q =3D q3_2; break;
+ case 4: q =3D q4; break;
+ case 5: q =3D q5; break;
+ case 6: q =3D q6; break;
+ case 7: q =3D q7; break;
+ case 8: q =3D q8; break;
+ case 9: q =3D q9; break;
+ case 10: q =3D q10; break;
+ case 11: q =3D q11; break;
+ default: printk("Unknown SDP test.\n");return;
+ }
+
+ q_len =3D q[4] + 5; /* assumes less than 255 bytes long pdu:s */
+=09
+ /* Now send the request */=20=20
+ sdp_send_data(&sdp_con_list[0], q, q_len);
+}
+
+
+
static void sdp_test_52111(void)
{
sdp_send_data(&sdp_con_list[0], sdp_data_52111, sdp_data_52111[4] + 5);
@@ -1039,7 +1138,7 @@
/* Here we should send data after we received a flow stop command */
printk("test_4_3\n");
=20=09
- if (rfcomm_send_data(CREATE_RFCOMM_ID(0,4),tmpdata, 1024) =3D=3D 0) {
+ if (rfcomm_send_data(CREATE_RFCOMM_ID(0,4),testdata, 1024) =3D=3D 0) {
printk("Success!\n");
}
}
@@ -1367,10 +1466,6 @@
printk("test_gateway_call, sending %s\n", atd);
rfcomm_send_data(CREATE_RFCOMM_ID(0,2), atd, strlen(atd));
}
-
-/*=20
- * main switch case called from btd in process_cmd=20
- */
=20
void process_test_cmd(s32 test_case)
{
|
|
From: Anders J. <and...@us...> - 2001-11-06 18:08:09
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
unplug_test.c 1.6 1.7=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Corrected SDP test 55111, added UUID 128 and UUID 32.
The diff of the modified file(s):
--- unplug_test.c 2001/10/16 16:23:45 1.6
+++ unplug_test.c 2001/11/06 18:08:07 1.7
@@ -269,48 +269,127 @@
0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0xff,
0x35, 0x03, 0x09, 0x00, 0x01, 0x00 };
=20
+
+#if 0
+/* UUID 16 */
unsigned char sdp_data_55111_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08,
0x35, 0x03, 0x19, 0x10, 0x02, 0x00, 0xff,
0x00 };
=20
-unsigned char sdp_data_55111_2[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e,
- 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0x35,
+unsigned char sdp_data_55111_2_1[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x35,
0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00 };
=20
-unsigned char sdp_data_55111_3[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e,
+unsigned char sdp_data_55111_2_2[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e,
0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0x35,
0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00 };
=20
-unsigned char sdp_data_55111_4[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e,
+unsigned char sdp_data_55111_2_3[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e,
0x00, 0x10, 0xff, 0xff, 0x00, 0xff, 0x35,
0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00 };
=20
-unsigned char sdp_data_55111_5[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e,
- 0x00, 0x11, 0xff, 0xff, 0x00, 0xff, 0x35,
+
+unsigned char sdp_data_55111_3[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08,
+ 0x35, 0x03, 0x19, 0x10, 0x01, 0x00, 0xff,
+ 0x00 };
+
+unsigned char sdp_data_55111_4[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
+ 0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0x35,
+ 0x03, 0x09, 0x02, 0x00, 0x00 };
+
+unsigned char sdp_data_55111_5[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08,
+ 0x35, 0x03, 0x19, 0x10, 0x01, 0x00, 0xff,
+ 0x00 };
+
+unsigned char sdp_data_55111_6[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
+ 0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0x35,
+ 0x03, 0x09, 0x00, 0x01, 0x00 };
+#endif
+#if 0
+/* UUID 32 */
+unsigned char sdp_data_55111_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x0a,
+ 0x35, 0x05, 0x1a, 0x00, 0x00, 0x10, 0x02, 0x00, 0xff,
+ 0x00 };
+
+unsigned char sdp_data_55111_2_1[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x35,
0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00 };
=20
-unsigned char sdp_data_55111_6[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e,
- 0x01, 0x00, 0xff, 0xff, 0x00, 0xff, 0x35,
+unsigned char sdp_data_55111_2_2[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e,
+ 0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0x35,
0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00 };
=20
-unsigned char sdp_data_55111_7[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e,
- 0x01, 0x01, 0xff, 0xff, 0x00, 0xff, 0x35,
+unsigned char sdp_data_55111_2_3[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e,
+ 0x00, 0x10, 0xff, 0xff, 0x00, 0xff, 0x35,
0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00 };
=20
-unsigned char sdp_data_55111_8[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08,
- 0x35, 0x03, 0x19, 0x10, 0x01, 0x00, 0xff,
+
+unsigned char sdp_data_55111_3[] =3D { 0x02, 0x77, 0x77, 0x00, 0x0a,
+ 0x35, 0x05, 0x1a, 0x00, 0x00, 0x10, 0x01, 0x00, 0xff,
0x00 };
=20
-unsigned char sdp_data_55112_1[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0f,
- 0x35, 0x03, 0x19, 0x10, 0x02, 0x00, 0xff,
- 0x35, 0x05, 0x0a, 0x00, 0x00, 0xff, 0xff,
+unsigned char sdp_data_55111_4[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
+ 0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0x35,
+ 0x03, 0x09, 0x02, 0x00, 0x00 };
+
+unsigned char sdp_data_55111_5[] =3D { 0x02, 0x77, 0x77, 0x00, 0x0a,
+ 0x35, 0x05, 0x1a, 0x00, 0x00, 0x10, 0x01, 0x00, 0xff,
0x00 };
=20
-unsigned char sdp_data_55112_2[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0f,
- 0x35, 0x03, 0x19, 0x10, 0x01, 0x00, 0xff,
- 0x35, 0x05, 0x0a, 0x00, 0x00, 0xff, 0xff,
+unsigned char sdp_data_55111_6[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
+ 0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0x35,
+ 0x03, 0x09, 0x00, 0x01, 0x00 };
+#endif
+
+/* UUID 128 */
+unsigned char sdp_data_55111_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x16,
+ 0x35, 0x11,=20
+ 0x1c,=20
+ 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 0x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
+ 0x00, 0xff,
0x00 };
=20
+unsigned char sdp_data_55111_2_1[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x35,
+ 0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00 };
+
+unsigned char sdp_data_55111_2_2[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e,
+ 0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0x35,
+ 0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00 };
+
+unsigned char sdp_data_55111_2_3[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0e,
+ 0x00, 0x10, 0xff, 0xff, 0x00, 0xff, 0x35,
+ 0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00 };
+
+
+unsigned char sdp_data_55111_3[] =3D { 0x02, 0x77, 0x77, 0x00, 0x16,
+ 0x35, 0x11,=20
+ 0x1c,=20
+ 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
+ 0x00, 0xff,
+ 0x00 };
+
+unsigned char sdp_data_55111_4[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
+ 0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0x35,
+ 0x03, 0x09, 0x02, 0x00, 0x00 };
+
+unsigned char sdp_data_55111_5[] =3D { 0x02, 0x77, 0x77, 0x00, 0x16,
+ 0x35, 0x11,=20
+ 0x1c,=20
+ 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
+ 0x00, 0xff,
+ 0x00 };
+
+unsigned char sdp_data_55111_6[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
+ 0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0x35,
+ 0x03, 0x09, 0x00, 0x01, 0x00 };
+
+
+
+
extern u8 testdata[];
static u8 test_is_initialized =3D 0;
=20
@@ -817,6 +896,8 @@
static int t =3D 0;
s32 retval =3D 0;
=20=09
+ printk("NOW RUNNING TESTCASE 55111, case %d\n", t);
+
switch (t) {
case 0:
retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_1, sdp_data_55=
111_1[4] + 5);
@@ -824,41 +905,45 @@
break;
=20
case 1:
- retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_2, sdp_data_55=
111_2[4] + 5);
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_2_1, sdp_data=
_55111_2_1[4] + 5);
t =3D 2;
-// break;
+ break;
case 2:
- retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_3, sdp_data_55=
111_3[4] + 5);
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_2_2, sdp_data=
_55111_2_2[4] + 5);
t =3D 3;
-// break;
+ break;
case 3:
- retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_4, sdp_data_55=
111_4[4] + 5);
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_2_3, sdp_data=
_55111_2_3[4] + 5);
t =3D 4;
-// break;
+ break;
+=09=20=20
case 4:
- retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_5, sdp_data_55=
111_5[4] + 5);
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_3, sdp_data_5=
5111_3[4] + 5);
t =3D 5;
-// break;
+ break;
case 5:
- retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_6, sdp_data_55=
111_6[4] + 5);
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_4, sdp_data_5=
5111_4[4] + 5);
t =3D 6;
-// break;
+ break;
case 6:
- retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_7, sdp_data_55=
111_7[4] + 5);
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_5, sdp_data_5=
5111_5[4] + 5);
t =3D 7;
-// break;
+ break;
case 7:
- retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_8, sdp_data_55=
111_8[4] + 5);
+ retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55111_6, sdp_data_5=
5111_6[4] + 5);
t =3D 0;
break;=20=20
+=09=20=20
}=20
return retval;
}
=20
static s32 sdp_test_55112(void)
{
+=20=20
static int t =3D 0;
s32 retval =3D 0;
+ /*
switch (t) {
case 0:
retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55112_1, sdp_data_55=
112_1[4] + 5);
@@ -869,7 +954,7 @@
retval =3D sdp_send_data(&sdp_con_list[0], sdp_data_55112_2, sdp_data_55=
112_2[4] + 5);
t =3D 0;
break;
- }
+ }*/
return retval;
}
=20
|
|
From: Anders J. <and...@us...> - 2001-11-13 10:42:04
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
unplug_test.c 1.7 1.8=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Corrected testdata for SDP to reflect current sdp-database.
* Added UUID32, UUID128 to some testcases.
The diff of the modified file(s):
--- unplug_test.c 2001/11/06 18:08:07 1.7
+++ unplug_test.c 2001/11/13 10:42:03 1.8
@@ -150,10 +150,26 @@
=20
/* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */=
=20
=20
-unsigned char sdp_data_52111[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08,
+/* UUID 16 */
+unsigned char sdp_data_52111_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08,
0x35, 0x03, 0x19, 0x00, 0x01, 0x00, 0xff,
0x00 };
=20
+/* UUID 32 */
+unsigned char sdp_data_52111_2[] =3D { 0x02, 0x77, 0x77, 0x00, 0x0a,
+ 0x35, 0x05, 0x1a, 0x00, 0x00, 0x00, 0x01, 0x00, 0xff,
+ 0x00 };
+
+/* UUID 128 */
+unsigned char sdp_data_52111_3[] =3D { 0x02, 0x77, 0x77, 0x00, 0x16,
+ 0x35, 0x11,=20
+ 0x1c,=20
+ 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
+ 0x00, 0xff,
+ 0x00 };
+
+
unsigned char sdp_data_52113_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08,
0x35, 0x03, 0x19, 0x00, 0x01, 0x00, 0x01,
0x00 };
@@ -166,17 +182,38 @@
0x35, 0x03, 0x19, 0x12, 0x34, 0x00, 0xff,
0x00 };
=20
-unsigned char sdp_data_52121[] =3D { 0x02, 0x77, 0x77, 0x00, 0x0a,
+/* UUID 16 */
+unsigned char sdp_data_52121_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x0a,
0x35, 0x03, 0x19, 0x00, 0x01, 0x00, 0xff,
0x00 };
=20
+/* UUID 32 */
+unsigned char sdp_data_52121_2[] =3D { 0x02, 0x77, 0x77, 0x00, 0x0c,
+ 0x35, 0x05, 0x1a, 0x00, 0x00, 0x00, 0x01, 0x00, 0xff,
+ 0x00 };
+
+/* UUID 128 */
+unsigned char sdp_data_52121_3[] =3D { 0x02, 0x77, 0x77, 0x00, 0x18,
+ 0x35, 0x11,=20
+ 0x1c,=20
+ 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb,
+ 0x00, 0xff,
+ 0x00 };
+
unsigned char sdp_data_52122[] =3D { 0x02, 0x77, 0x77, 0x00, 0x06,
0x19, 0x00, 0x01, 0x00, 0xff, 0x00 };
=20=20=20
-unsigned char sdp_data_53111[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
- 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0x35,
+unsigned char sdp_data_53111_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08,
+ 0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0xff,
+ 0x00 };
+
+unsigned char sdp_data_53111_2[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x35,
0x03, 0x09, 0x00, 0x01, 0x00 };
=20
+
+
unsigned char sdp_data_53113_1[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x35,
0x03, 0x09, 0x00, 0x01, 0x00 };
@@ -221,10 +258,20 @@
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x35,
0x03, 0x09, 0x00, 0x01, 0x00 };
=20
-unsigned char sdp_data_54111[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d,
+unsigned char sdp_data_54111_1[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d,
0x35, 0x03, 0x19, 0x12, 0x34, 0x00, 0xff,
0x35, 0x03, 0x09, 0x00, 0x01, 0x00 };
=20
+unsigned char sdp_data_54111_2[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0f,
+ 0x35, 0x05, 0x1a, 0x00, 0x00, 0x12, 0x34, 0x00, 0xff,
+ 0x35, 0x03, 0x09, 0x00, 0x01, 0x00 };
+
+unsigned char sdp_data_54111_3[] =3D { 0x06, 0x88, 0x88, 0x00, 0x1b, 0x35,=
0x11, 0x1c,
+ 0x00, 0x00, 0x12, 0x34, 0x00, 0x00, 0=
x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0=
x34, 0xfb,
+ 0x00, 0xff ,0x35, 0x03, 0x09, 0x00, 0=
x01, 0x00};
+
+
unsigned char sdp_data_54112[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d,
0x35, 0x03, 0x19, 0x00, 0x01, 0x00, 0xff,
0x35, 0x03, 0x09, 0x01, 0xff, 0x00 };
@@ -261,9 +308,16 @@
0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0xff,
0x35, 0x03, 0x09, 0x00, 0x09, 0x00 };
=20
-unsigned char sdp_data_54121[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0b,
+unsigned char sdp_data_54121_1[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0b,
0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0xff,
0x09, 0x00, 0x09, 0x00 };
+unsigned char sdp_data_54121_2[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0d,
+ 0x35, 0x05, 0x1a, 0x00, 0x00, 0x10, 0x00, 0x00, 0xff,
+ 0x09, 0x00, 0x09, 0x00 };
+unsigned char sdp_data_54121_3[] =3D { 0x06, 0x88, 0x88, 0x00, 0x19, 0x35,=
0x11, 0x1c,
+ 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0=
x10, 0x00,
+ 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0=
x34, 0xfb,=20
+ 0x00, 0xff, 0x09, 0x00, 0x09, 0x00 };
=20
unsigned char sdp_data_54122[] =3D { 0x06, 0x88, 0x88, 0x00, 0x0f,
0x35, 0x03, 0x19, 0x10, 0x00, 0x00, 0xff,
@@ -341,6 +395,7 @@
0x03, 0x09, 0x00, 0x01, 0x00 };
#endif
=20
+#if 1
/* UUID 128 */
unsigned char sdp_data_55111_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x16,
0x35, 0x11,=20
@@ -386,8 +441,8 @@
unsigned char sdp_data_55111_6[] =3D { 0x04, 0x88, 0x88, 0x00, 0x0c,
0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0x35,
0x03, 0x09, 0x00, 0x01, 0x00 };
-
=20
+#endif
=20
=20
extern u8 testdata[];
@@ -728,8 +783,18 @@
=20
static s32 sdp_test_52111(void)
{
- return sdp_send_data(&sdp_con_list[0], sdp_data_52111, sdp_data_52111[4] =
+ 5);
+ static int t =3D 0;
+ if(t =3D=3D 0) {
+ t =3D 1;
+ return sdp_send_data(&sdp_con_list[0], sdp_data_52111_1, sdp_data_52111_=
1[4] + 5);
+ } else if(t =3D=3D 1) {
+ t =3D 2;
+ return sdp_send_data(&sdp_con_list[0], sdp_data_52111_2, sdp_data_52111_=
2[4] + 5);
+ } else {
+ t =3D 0;
+ return sdp_send_data(&sdp_con_list[0], sdp_data_52111_3, sdp_data_52111_=
3[4] + 5);
}
+}
=20
static s32 sdp_test_52113(void)
{
@@ -754,8 +819,18 @@
=20
static s32 sdp_test_52121(void)
{
- return sdp_send_data(&sdp_con_list[0], sdp_data_52121, sdp_data_52121[4] =
+ 5);
+ static int t =3D 0;
+ if(t =3D=3D 0) {
+ t =3D 1;
+ return sdp_send_data(&sdp_con_list[0], sdp_data_52121_1, sdp_data_52121_=
1[4] + 5 - 2);
+ } else if(t =3D=3D 1) {
+ t =3D 2;
+ return sdp_send_data(&sdp_con_list[0], sdp_data_52121_2, sdp_data_52121_=
2[4] + 5 - 2);
+ } else {
+ t =3D 0;
+ return sdp_send_data(&sdp_con_list[0], sdp_data_52121_3, sdp_data_52121_=
3[4] + 5 - 2);
}
+}
=20
static s32 sdp_test_52122(void)
{
@@ -764,7 +839,16 @@
=20
static s32 sdp_test_53111(void)
{
- return sdp_send_data(&sdp_con_list[0], sdp_data_53111, sdp_data_53111[4] =
+ 5);
+ static int t =3D 0;
+ s32 retval;
+ if(!t) {
+ t =3D 1;
+ return sdp_send_data(&sdp_con_list[0], sdp_data_53111_1, sdp_data_53111_=
1[4] + 5);
+ } else {
+ t =3D 0;
+ return sdp_send_data(&sdp_con_list[0], sdp_data_53111_2, sdp_data_53111_=
2[4] + 5);
+ }
+=09
}
=20
static s32 sdp_test_53113(void)
@@ -829,7 +913,17 @@
=20
static s32 sdp_test_54111(void)
{
- return sdp_send_data(&sdp_con_list[0], sdp_data_54111, sdp_data_54111[4] =
+ 5);
+ static int t =3D 0;
+ if(t =3D=3D 0) {
+ t =3D 1;
+ return sdp_send_data(&sdp_con_list[0], sdp_data_54111_1, sdp_data_54111_=
1[4] + 5);
+ } else if(t =3D=3D 1) {
+ t =3D 2;
+ return sdp_send_data(&sdp_con_list[0], sdp_data_54111_2, sdp_data_54111_=
2[4] + 5);
+ } else {
+ t =3D 0;
+ return sdp_send_data(&sdp_con_list[0], sdp_data_54111_3, sdp_data_54111_=
3[4] + 5);
+ }
}
=20
static s32 sdp_test_54112(void)
@@ -883,7 +977,17 @@
=20
static s32 sdp_test_54121(void)
{
- return sdp_send_data(&sdp_con_list[0], sdp_data_54121, sdp_data_54121[4] =
+ 5);
+ static int t =3D 0;
+ if(t =3D=3D 0) {
+ t =3D 1;
+ return sdp_send_data(&sdp_con_list[0], sdp_data_54121_1, sdp_data_54121_=
1[4] + 5);
+ } else if(t =3D=3D 1) {
+ t =3D 2;
+ return sdp_send_data(&sdp_con_list[0], sdp_data_54121_2, sdp_data_54121_=
2[4] + 5);
+ } else {
+ t =3D 0;
+ return sdp_send_data(&sdp_con_list[0], sdp_data_54121_3, sdp_data_54121_=
3[4] + 5);
+ }
}
=20
static s32 sdp_test_54122(void)
|
|
From: Anders J. <and...@us...> - 2002-01-09 10:55:59
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
unplug_test.c 1.8 1.9=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Added some SDP tests.
* Corrected Unplug SDP tests.
The diff of the modified file(s):
--- unplug_test.c 2001/11/13 10:42:03 1.8
+++ unplug_test.c 2002/01/09 10:55:58 1.9
@@ -79,7 +79,7 @@
extern s32 use_multiple_conf_params;
extern s32 disable_testpsm;
s32 test_role;
-
+s32 emulate_hw_error =3D 0;
/* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */=
=20
/* Unplug Test Cases 1-13 */
=20
@@ -148,8 +148,21 @@
0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0x35, 0x09, 0x09,
0x00, 0x06, 0x09, 0x00, 0x11, 0x09, 0x01, 0x00, 0x00};
=20
+/* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D PAN =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */
+
+/* [pan_1] Service search request for UUID 0x1116 (PAN Profile) */
+unsigned char pan_1[] =3D {0x02, 0x77, 0x77, 0x00, 0x08,
+ 0x35, 0x03, 0x19, 0x11, 0x16, 0x00, 0xff, 0x00};
+
+unsigned char pan_2[] =3D {0x04, 0x88, 0x88, 0x00, 0x0e,
+ 0x00, 0x01, 0x00, 0x00,=20=20
+ 0x00, 0xff,=20
+ 0x35, 0x05, 0x0a, 0x00, 0x00, 0xff, 0xff,=20
+ 0x00 };
+
/* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */=
=20
=20
+
/* UUID 16 */
unsigned char sdp_data_52111_1[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08,
0x35, 0x03, 0x19, 0x00, 0x01, 0x00, 0xff,
@@ -664,13 +677,13 @@
static s32 test_2_8_3(void)
{
printk("Client sends 350 bytes on testcon 2\n");
- return test_send_data(testcon2, testdata, 350);
+ return test_send_data(testcon3, testdata, 350);
}
=20
static s32 test_2_8_4(void)
{
printk("Server sends 350 bytes on testcon 2\n");
- return test_send_data(testcon2, testdata, 350);
+ return test_send_data(testcon3, testdata, 350);
}
=20
static s32 test_2_9_1(void)
@@ -1745,6 +1758,7 @@
case 210: return test_2_10();
=20
case 2131 : return test_2_13_1();
+ case 2135 : return test_2_13_5();
=20
case 52111: return sdp_test_52111();
case 52113: return sdp_test_52113();
@@ -1845,6 +1859,12 @@
case 56: return test_5_6();
case 57: return test_5_7();
case 100: return test_gateway_call();
+ case 9001: return sdp_send_data(&sdp_con_list[0], pan_1, pan_1[4] =
+ 5);
+ case 9002: return sdp_send_data(&sdp_con_list[0], pan_2, pan_2[4] + 5);=
=20=20
+=20=20=20=20=20=20=20=20
+ case 99999:=20
+ emulate_hw_error =3D 1;
+ break;
default:
printk("Unknown test case\n");
return -1;
|
|
From: Willy S. <sag...@us...> - 2002-04-11 14:31:13
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Tag Comment ---- ----------- ----------- --- ------- unplug_test.c 1.10 1.11=20=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added version ifdef for malloc.h/slab.h The diff of the modified file(s): --- unplug_test.c 7 Mar 2002 21:32:28 -0000 1.10 +++ unplug_test.c 11 Apr 2002 11:53:22 -0000 1.11 @@ -43,8 +43,11 @@ #define __NO_VERSION__ /* don't define kernel_version in module.h */ =20 #ifdef __KERNEL__ +#if LINUX_VERSION_CODE >=3D 0x20200 +#include <linux/slab.h> +#else #include <linux/malloc.h> - +#endif #include <linux/bluetooth/hci.h> #include <linux/bluetooth/l2cap_con.h> #include <linux/bluetooth/sdp.h> |