summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorInga Stotland <inga.stotland@intel.com>2021-02-12 13:42:43 -0800
committerAyush Garg <ayush.garg@samsung.com>2022-03-11 19:08:34 +0530
commitf3bb46d9abf631a1785fd3e08fbd5f04b95b038e (patch)
tree1e88053d51f62b65bb98934f87a35680561d5bab /test
parent1c4b11c89c01d575a658d58c4f6a365543f173fe (diff)
downloadbluez-f3bb46d9abf631a1785fd3e08fbd5f04b95b038e.tar.gz
bluez-f3bb46d9abf631a1785fd3e08fbd5f04b95b038e.tar.bz2
bluez-f3bb46d9abf631a1785fd3e08fbd5f04b95b038e.zip
test/test-mesh: Generate correct value for Device UUID
This ensures that the value of Device UUID when invoking Join method is compliant with RFC 4122. Signed-off-by: Anuj Jain <anuj01.jain@samsung.com> Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
Diffstat (limited to 'test')
-rwxr-xr-xtest/test-mesh7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/test-mesh b/test/test-mesh
index 9e478373..fbf2476b 100755
--- a/test/test-mesh
+++ b/test/test-mesh
@@ -887,12 +887,11 @@ class MainMenu(Menu):
print(set_error('Provisioning agent not found'))
return
- uuid = bytearray.fromhex("0a0102030405060708090A0B0C0D0E0F")
- random.shuffle(uuid)
- uuid_str = array_to_string(uuid)
+ uuid_bytes = uuid.uuid4().bytes
+ uuid_str = array_to_string(uuid_bytes)
print(set_yellow('Joining with UUID ') + set_green(uuid_str))
- mesh_net.Join(app.get_path(), uuid,
+ mesh_net.Join(app.get_path(), uuid_bytes,
reply_handler=join_cb,
error_handler=join_error_cb)