From e6356399c9f94c2c80965f73abf187462dcaf25a Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 31 Jan 2013 16:08:51 -0600 Subject: [PATCH] tools: Add LE-only test case support to mgmt-tester --- tools/mgmt-tester.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c index beddad93b..ad2900962 100644 --- a/tools/mgmt-tester.c +++ b/tools/mgmt-tester.c @@ -324,6 +324,24 @@ static void test_condition_complete(struct test_data *data) test_post_teardown, 2, user, free); \ } while (0) +#define test_le(name, data, setup, func) \ + do { \ + struct test_data *user; \ + user = malloc(sizeof(struct test_data)); \ + if (!user) \ + break; \ + user->hciemu_type = HCIEMU_TYPE_LE; \ + user->test_data = data; \ + user->expected_version = 0x06; \ + user->expected_manufacturer = 0x003f; \ + user->expected_supported_settings = 0x0000021f; \ + user->initial_settings = 0x00000000; \ + 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(); @@ -2342,6 +2360,7 @@ int main(int argc, char *argv[]) test_bredrle("Controller setup", NULL, NULL, controller_setup); test_bredr("Controller setup (BR/EDR-only)", NULL, NULL, controller_setup); + test_le("Controller setup (LE-only)", NULL, NULL, controller_setup); test_bredrle("Invalid command", &invalid_command_test, NULL, test_command_generic); -- 2.47.3