Diff between 4823e85d51fdaf73a6f91d499e691a86ed6871a8 and 83313af7aeb6384eff78b0805d2c684f6546b1fb

Changed Files

File Additions Deletions Status
tools/mgmt-tester.c +20 -0 modified

Full Patch

diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index fd05e48..beddad9 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
@@ -306,6 +306,24 @@ static void test_condition_complete(struct test_data *data)
 				test_post_teardown, 2, user, free); \
 	} while (0)
 
+#define test_bredr(name, data, setup, func) \
+	do { \
+		struct test_data *user; \
+		user = malloc(sizeof(struct test_data)); \
+		if (!user) \
+			break; \
+		user->hciemu_type = HCIEMU_TYPE_BREDR; \
+		user->test_data = data; \
+		user->expected_version = 0x05; \
+		user->expected_manufacturer = 0x003f; \
+		user->expected_supported_settings = 0x000000ff; \
+		user->initial_settings = 0x00000080; \
+		user->unmet_conditions = 0; \
+		tester_add_full(name, data, \
+				test_pre_setup, setup, func, NULL, \
+				test_post_teardown, 2, user, free); \
+	} while (0)
+
 static void controller_setup(const void *test_data)
 {
 	tester_test_passed();
@@ -2322,6 +2340,8 @@ int main(int argc, char *argv[])
 	tester_init(&argc, &argv);
 
 	test_bredrle("Controller setup", NULL, NULL, controller_setup);
+	test_bredr("Controller setup (BR/EDR-only)", NULL, NULL,
+							controller_setup);
 	test_bredrle("Invalid command", &invalid_command_test,
 					NULL, test_command_generic);