From cb320a6d2d6a80629d69ad1793cab23b85f526d0 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 22 Aug 2016 19:22:01 +0300 Subject: [PATCH] tests: Allow regdb missing some op classes in mbo_supp_oper_classes Not all installed regdb files include channels for global operating classes 121-123, and 129. Signed-off-by: Jouni Malinen --- tests/hwsim/test_mbo.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/hwsim/test_mbo.py b/tests/hwsim/test_mbo.py index 859eedeef..8f3d35866 100644 --- a/tests/hwsim/test_mbo.py +++ b/tests/hwsim/test_mbo.py @@ -116,9 +116,15 @@ def test_mbo_supp_oper_classes(dev, apdev): ("BD", bd, bd2, bd5, False), ("KZ", kz, kz2, kz5, False) ] for country, expected, res2, res5, inc5 in tests: - if res2 != expected: + # For now, allow operating class 129 to be missing since not all + # installed regdb files include the 160 MHz channels. + expected2 = expected.replace('808182', '8082') + # For now, allow operating classes 121-123 to be missing since not all + # installed regdb files include the related US DFS channels. + expected2 = expected2.replace('78797a7b7c', '787c') + if res2 != expected and res2 != expected2: raise Exception("Unexpected supp_op_class string (country=%s, 2.4 GHz): %s (expected: %s)" % (country, res2, expected)) - if inc5 and res5 != expected: + if inc5 and res5 != expected and res5 != expected2: raise Exception("Unexpected supp_op_class string (country=%s, 5 GHz): %s (expected: %s)" % (country, res5, expected)) def test_mbo_assoc_disallow(dev, apdev, params):