Loading system/Android.mk +6 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,9 @@ LOCAL_host_executables := \ LOCAL_host_python_hci_packets_library := \ $(SOONG_OUT_DIR)/.intermediates/packages/modules/Bluetooth/system/gd/gd_hci_packets_python3_gen/gen/hci_packets.py LOCAL_host_python_smp_packets_library := \ $(SOONG_OUT_DIR)/.intermediates/packages/modules/Bluetooth/system/gd/gd_smp_packets_python3_gen/gen/smp_packets.py LOCAL_host_python_extension_libraries := \ $(HOST_OUT_SHARED_LIBRARIES)/bluetooth_packets_python3.so Loading Loading @@ -94,16 +97,19 @@ $(bluetooth_cert_src_and_bin_zip): PRIVATE_host_executables := $(LOCAL_host_exec $(bluetooth_cert_src_and_bin_zip): PRIVATE_host_libraries := $(LOCAL_host_libraries) $(bluetooth_cert_src_and_bin_zip): PRIVATE_host_python_extension_libraries := $(LOCAL_host_python_extension_libraries) $(bluetooth_cert_src_and_bin_zip): PRIVATE_host_python_hci_packets_library := $(LOCAL_host_python_hci_packets_library) $(bluetooth_cert_src_and_bin_zip): PRIVATE_host_python_smp_packets_library := $(LOCAL_host_python_smp_packets_library) $(bluetooth_cert_src_and_bin_zip): PRIVATE_target_executables := $(LOCAL_target_executables) $(bluetooth_cert_src_and_bin_zip): PRIVATE_target_libraries := $(LOCAL_target_libraries) $(bluetooth_cert_src_and_bin_zip): $(SOONG_ZIP) $(LOCAL_cert_test_sources) \ $(LOCAL_host_executables) $(LOCAL_host_libraries) $(LOCAL_host_python_libraries) \ $(LOCAL_host_python_extension_libraries) \ $(LOCAL_host_python_hci_packets_library) \ $(LOCAL_host_python_smp_packets_library) \ $(LOCAL_target_executables) $(LOCAL_target_libraries) $(hide) $(SOONG_ZIP) -d -o $@ \ -C $(PRIVATE_bluetooth_project_dir) $(addprefix -f ,$(PRIVATE_cert_test_sources)) \ -C $(dir $(PRIVATE_host_python_hci_packets_library)) -f $(PRIVATE_host_python_hci_packets_library) \ -C $(dir $(PRIVATE_host_python_smp_packets_library)) -f $(PRIVATE_host_python_smp_packets_library) \ -C $(HOST_OUT_EXECUTABLES) $(addprefix -f ,$(PRIVATE_host_executables)) \ -C $(HOST_OUT_SHARED_LIBRARIES) $(addprefix -f ,$(PRIVATE_host_python_extension_libraries)) \ -P lib64 \ Loading system/blueberry/tests/gd/security/le_security_test.py +3 −3 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ # limitations under the License. import hci_packets as hci from bluetooth_packets_python3.security_packets import PairingFailedReason import smp_packets as smp from blueberry.tests.gd.cert.matchers import SecurityMatchers from blueberry.tests.gd.cert.metadata import metadata from blueberry.tests.gd.cert.py_hci import PyHci Loading Loading @@ -585,7 +585,7 @@ class LeSecurityTest(gd_base_test.GdBaseTestClass): # 3. IUT transmits the Pairing Failed command. assertThat(self.dut_security.get_bond_stream()).emits( SecurityMatchers.BondMsg(BondMsgType.DEVICE_BOND_FAILED, self.cert_address, int(PairingFailedReason.ENCRYPTION_KEY_SIZE))) int(smp.PairingFailedReason.ENCRYPTION_KEY_SIZE))) @metadata(pts_test_id="SM/SLA/EKS/BI-02-C", pts_test_name="IUT Responder, Lower Tester Maximum Encryption Key Size < Min_Encryption_Key_Length") Loading Loading @@ -622,7 +622,7 @@ class LeSecurityTest(gd_base_test.GdBaseTestClass): #3. IUT transmits the Pairing Failed command. assertThat(self.cert_security.get_bond_stream()).emits( SecurityMatchers.BondMsg(BondMsgType.DEVICE_BOND_FAILED, self.dut_address, int(PairingFailedReason.ENCRYPTION_KEY_SIZE))) int(smp.PairingFailedReason.ENCRYPTION_KEY_SIZE))) @metadata(pts_test_id="SM/MAS/SCPK/BV-01-C", pts_test_name="Passkey Entry, IUT Initiator, Secure Connections – Success") Loading system/gd/Android.bp +16 −12 Original line number Diff line number Diff line Loading @@ -701,7 +701,6 @@ genrule { cmd: "$(location bluetooth_packetgen) --include=packages/modules/Bluetooth/system/gd --out=$(genDir) --num_shards=10 $(in)", srcs: [ "l2cap/l2cap_packets.pdl", "security/smp_packets.pdl", ], out: [ "l2cap/l2cap_packets_python3.cc", Loading @@ -715,17 +714,6 @@ genrule { "l2cap/l2cap_packets_python3_shard_7.cc", "l2cap/l2cap_packets_python3_shard_8.cc", "l2cap/l2cap_packets_python3_shard_9.cc", "security/smp_packets_python3.cc", "security/smp_packets_python3_shard_0.cc", "security/smp_packets_python3_shard_1.cc", "security/smp_packets_python3_shard_2.cc", "security/smp_packets_python3_shard_3.cc", "security/smp_packets_python3_shard_4.cc", "security/smp_packets_python3_shard_5.cc", "security/smp_packets_python3_shard_6.cc", "security/smp_packets_python3_shard_7.cc", "security/smp_packets_python3_shard_8.cc", "security/smp_packets_python3_shard_9.cc", ], } Loading Loading @@ -847,3 +835,19 @@ genrule { "hci_packets.py", ], } // Generate the python parser+serializer backend for // smp_packets.pdl. genrule { name: "gd_smp_packets_python3_gen", defaults: ["pdl_python_generator_defaults"], cmd: "$(location :pdlc) $(in) |" + " $(location :pdl_python_generator)" + " --output $(out) --custom-type-location blueberry.utils.bluetooth", srcs: [ "security/smp_packets.pdl", ], out: [ "smp_packets.py", ], } system/gd/cert/bluetooth_packets_python3_setup.py +0 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,6 @@ BT_PACKETS_BASE_SRCS = [ BT_PACKETS_PY3_SRCs = \ [os.path.join(GD_DIR, "packet/python3_module.cc")] \ + glob.glob(os.path.join(BT_PACKETS_PY3_GEN_DIR, "l2cap", "*.cc")) \ + glob.glob(os.path.join(BT_PACKETS_PY3_GEN_DIR, "security", "*.cc")) bluetooth_packets_python3_module = Extension( 'bluetooth_packets_python3', Loading system/gd/cert/run +2 −2 Original line number Diff line number Diff line Loading @@ -82,8 +82,8 @@ OUT_TARGET="${ANDROID_BUILD_TOP}/out/target" TEST_CONFIG="${ANDROID_BUILD_TOP}/packages/modules/Bluetooth/system/blueberry/tests/gd/host_config.yaml" TEST_FILTER="--presubmit" TEST_RUNNER="blueberry/tests/gd/gd_test_runner.py" CPP_BUILD_TARGET="bluetooth_stack_with_facade root-canal bluetooth_packets_python3 gd_hci_packets_python3_gen" RUST_BUILD_TARGET="bluetooth_with_facades root-canal bluetooth_packets_python3 bt_topshim_facade gd_hci_packets_python3_gen" CPP_BUILD_TARGET="bluetooth_stack_with_facade root-canal bluetooth_packets_python3 gd_hci_packets_python3_gen gd_smp_packets_python3_gen" RUST_BUILD_TARGET="bluetooth_with_facades root-canal bluetooth_packets_python3 bt_topshim_facade gd_hci_packets_python3_gen gd_smp_packets_python3_gen" BUILD_TARGET=$CPP_BUILD_TARGET CLEAN_VENV=false Loading Loading
system/Android.mk +6 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,9 @@ LOCAL_host_executables := \ LOCAL_host_python_hci_packets_library := \ $(SOONG_OUT_DIR)/.intermediates/packages/modules/Bluetooth/system/gd/gd_hci_packets_python3_gen/gen/hci_packets.py LOCAL_host_python_smp_packets_library := \ $(SOONG_OUT_DIR)/.intermediates/packages/modules/Bluetooth/system/gd/gd_smp_packets_python3_gen/gen/smp_packets.py LOCAL_host_python_extension_libraries := \ $(HOST_OUT_SHARED_LIBRARIES)/bluetooth_packets_python3.so Loading Loading @@ -94,16 +97,19 @@ $(bluetooth_cert_src_and_bin_zip): PRIVATE_host_executables := $(LOCAL_host_exec $(bluetooth_cert_src_and_bin_zip): PRIVATE_host_libraries := $(LOCAL_host_libraries) $(bluetooth_cert_src_and_bin_zip): PRIVATE_host_python_extension_libraries := $(LOCAL_host_python_extension_libraries) $(bluetooth_cert_src_and_bin_zip): PRIVATE_host_python_hci_packets_library := $(LOCAL_host_python_hci_packets_library) $(bluetooth_cert_src_and_bin_zip): PRIVATE_host_python_smp_packets_library := $(LOCAL_host_python_smp_packets_library) $(bluetooth_cert_src_and_bin_zip): PRIVATE_target_executables := $(LOCAL_target_executables) $(bluetooth_cert_src_and_bin_zip): PRIVATE_target_libraries := $(LOCAL_target_libraries) $(bluetooth_cert_src_and_bin_zip): $(SOONG_ZIP) $(LOCAL_cert_test_sources) \ $(LOCAL_host_executables) $(LOCAL_host_libraries) $(LOCAL_host_python_libraries) \ $(LOCAL_host_python_extension_libraries) \ $(LOCAL_host_python_hci_packets_library) \ $(LOCAL_host_python_smp_packets_library) \ $(LOCAL_target_executables) $(LOCAL_target_libraries) $(hide) $(SOONG_ZIP) -d -o $@ \ -C $(PRIVATE_bluetooth_project_dir) $(addprefix -f ,$(PRIVATE_cert_test_sources)) \ -C $(dir $(PRIVATE_host_python_hci_packets_library)) -f $(PRIVATE_host_python_hci_packets_library) \ -C $(dir $(PRIVATE_host_python_smp_packets_library)) -f $(PRIVATE_host_python_smp_packets_library) \ -C $(HOST_OUT_EXECUTABLES) $(addprefix -f ,$(PRIVATE_host_executables)) \ -C $(HOST_OUT_SHARED_LIBRARIES) $(addprefix -f ,$(PRIVATE_host_python_extension_libraries)) \ -P lib64 \ Loading
system/blueberry/tests/gd/security/le_security_test.py +3 −3 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ # limitations under the License. import hci_packets as hci from bluetooth_packets_python3.security_packets import PairingFailedReason import smp_packets as smp from blueberry.tests.gd.cert.matchers import SecurityMatchers from blueberry.tests.gd.cert.metadata import metadata from blueberry.tests.gd.cert.py_hci import PyHci Loading Loading @@ -585,7 +585,7 @@ class LeSecurityTest(gd_base_test.GdBaseTestClass): # 3. IUT transmits the Pairing Failed command. assertThat(self.dut_security.get_bond_stream()).emits( SecurityMatchers.BondMsg(BondMsgType.DEVICE_BOND_FAILED, self.cert_address, int(PairingFailedReason.ENCRYPTION_KEY_SIZE))) int(smp.PairingFailedReason.ENCRYPTION_KEY_SIZE))) @metadata(pts_test_id="SM/SLA/EKS/BI-02-C", pts_test_name="IUT Responder, Lower Tester Maximum Encryption Key Size < Min_Encryption_Key_Length") Loading Loading @@ -622,7 +622,7 @@ class LeSecurityTest(gd_base_test.GdBaseTestClass): #3. IUT transmits the Pairing Failed command. assertThat(self.cert_security.get_bond_stream()).emits( SecurityMatchers.BondMsg(BondMsgType.DEVICE_BOND_FAILED, self.dut_address, int(PairingFailedReason.ENCRYPTION_KEY_SIZE))) int(smp.PairingFailedReason.ENCRYPTION_KEY_SIZE))) @metadata(pts_test_id="SM/MAS/SCPK/BV-01-C", pts_test_name="Passkey Entry, IUT Initiator, Secure Connections – Success") Loading
system/gd/Android.bp +16 −12 Original line number Diff line number Diff line Loading @@ -701,7 +701,6 @@ genrule { cmd: "$(location bluetooth_packetgen) --include=packages/modules/Bluetooth/system/gd --out=$(genDir) --num_shards=10 $(in)", srcs: [ "l2cap/l2cap_packets.pdl", "security/smp_packets.pdl", ], out: [ "l2cap/l2cap_packets_python3.cc", Loading @@ -715,17 +714,6 @@ genrule { "l2cap/l2cap_packets_python3_shard_7.cc", "l2cap/l2cap_packets_python3_shard_8.cc", "l2cap/l2cap_packets_python3_shard_9.cc", "security/smp_packets_python3.cc", "security/smp_packets_python3_shard_0.cc", "security/smp_packets_python3_shard_1.cc", "security/smp_packets_python3_shard_2.cc", "security/smp_packets_python3_shard_3.cc", "security/smp_packets_python3_shard_4.cc", "security/smp_packets_python3_shard_5.cc", "security/smp_packets_python3_shard_6.cc", "security/smp_packets_python3_shard_7.cc", "security/smp_packets_python3_shard_8.cc", "security/smp_packets_python3_shard_9.cc", ], } Loading Loading @@ -847,3 +835,19 @@ genrule { "hci_packets.py", ], } // Generate the python parser+serializer backend for // smp_packets.pdl. genrule { name: "gd_smp_packets_python3_gen", defaults: ["pdl_python_generator_defaults"], cmd: "$(location :pdlc) $(in) |" + " $(location :pdl_python_generator)" + " --output $(out) --custom-type-location blueberry.utils.bluetooth", srcs: [ "security/smp_packets.pdl", ], out: [ "smp_packets.py", ], }
system/gd/cert/bluetooth_packets_python3_setup.py +0 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,6 @@ BT_PACKETS_BASE_SRCS = [ BT_PACKETS_PY3_SRCs = \ [os.path.join(GD_DIR, "packet/python3_module.cc")] \ + glob.glob(os.path.join(BT_PACKETS_PY3_GEN_DIR, "l2cap", "*.cc")) \ + glob.glob(os.path.join(BT_PACKETS_PY3_GEN_DIR, "security", "*.cc")) bluetooth_packets_python3_module = Extension( 'bluetooth_packets_python3', Loading
system/gd/cert/run +2 −2 Original line number Diff line number Diff line Loading @@ -82,8 +82,8 @@ OUT_TARGET="${ANDROID_BUILD_TOP}/out/target" TEST_CONFIG="${ANDROID_BUILD_TOP}/packages/modules/Bluetooth/system/blueberry/tests/gd/host_config.yaml" TEST_FILTER="--presubmit" TEST_RUNNER="blueberry/tests/gd/gd_test_runner.py" CPP_BUILD_TARGET="bluetooth_stack_with_facade root-canal bluetooth_packets_python3 gd_hci_packets_python3_gen" RUST_BUILD_TARGET="bluetooth_with_facades root-canal bluetooth_packets_python3 bt_topshim_facade gd_hci_packets_python3_gen" CPP_BUILD_TARGET="bluetooth_stack_with_facade root-canal bluetooth_packets_python3 gd_hci_packets_python3_gen gd_smp_packets_python3_gen" RUST_BUILD_TARGET="bluetooth_with_facades root-canal bluetooth_packets_python3 bt_topshim_facade gd_hci_packets_python3_gen gd_smp_packets_python3_gen" BUILD_TARGET=$CPP_BUILD_TARGET CLEAN_VENV=false Loading