From d57a9e5d370c1489c888e29281b3e6b711e38e19 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 16 Jan 2013 15:17:20 +0200 Subject: [PATCH] tools: Add mgmt-tester support for testing for unset settings --- tools/mgmt-tester.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c index 0906a5233..f1dfdcafd 100644 --- a/tools/mgmt-tester.c +++ b/tools/mgmt-tester.c @@ -291,6 +291,7 @@ struct generic_data { const void *expect_param; uint16_t expect_len; uint32_t expect_settings_set; + uint32_t expect_settings_unset; uint16_t expect_hci_command; const void *expect_hci_param; uint8_t expect_hci_len; @@ -839,12 +840,19 @@ static void command_generic_new_settings_alt(uint16_t index, uint16_t length, tester_print("New settings 0x%08x received", settings); + if (test->expect_settings_unset) { + if ((settings & ~test->expect_settings_unset) != 0) + return; + goto done; + } + if (!test->expect_settings_set) return; if ((settings & test->expect_settings_set) != test->expect_settings_set) return; +done: tester_print("Unregistering new settings notification"); mgmt_unregister_index(data->mgmt_alt, index); -- 2.47.3