From 83313af7aeb6384eff78b0805d2c684f6546b1fb Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 31 Jan 2013 16:04:32 -0600 Subject: [PATCH] tools: Add BR/EDR-only test case support to mgmt-tester --- tools/mgmt-tester.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c index fd05e487a..beddad93b 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); -- 2.47.3