Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add tests for Bluetooth RFCOMM, HCI and SCO#132023

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@serhiy-storchaka
Copy link
Member

Test parsing and unparsing of address.

The tests expose some errors in implementation: the format of the returned address for HCI and SCO is not compatible with acceptable format.

@serhiy-storchaka
Copy link
MemberAuthor

!buildbot FreeBSD

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@serhiy-storchaka for commit909871a 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F132023%2Fmerge

The command will test the builders whose names match following regular expression:FreeBSD

The builders matched are:

  • AMD64 FreeBSD Refleaks PR
  • AMD64 FreeBSD15 PR
  • AMD64 FreeBSD14 PR
  • AMD64 FreeBSD PR

@serhiy-storchaka
Copy link
MemberAuthor

!buildbot BSD

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@serhiy-storchaka for commit94c9287 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F132023%2Fmerge

The command will test the builders whose names match following regular expression:BSD

The builders matched are:

  • AMD64 FreeBSD Refleaks PR
  • AMD64 FreeBSD15 PR
  • AMD64 FreeBSD14 PR
  • AMD64 FreeBSD PR

@serhiy-storchaka
Copy link
MemberAuthor

@furkanonder, could you please test new tests on NetBSD?

@vstinner
Copy link
Member

The problem is that tests are skipped on FreeBSD buildbots since they cannot create bluetooth sockets. Extract of FreeBSD 15test.pythoninfo:

test_socket.HAVE_SOCKET_BLUETOOTH: Falsetest_socket.HAVE_SOCKET_BLUETOOTH_L2CAP: False

HAVE_SOCKET_BLUETOOTH creates:

socket.socket(socket.AF_BLUETOOTH,socket.SOCK_STREAM,socket.BTPROTO_RFCOMM)

HAVE_SOCKET_BLUETOOTH_L2CAP creates:

socket.socket(socket.AF_BLUETOOTH,socket.SOCK_SEQPACKET,socket.BTPROTO_L2CAP)

I had the same problem on my FreeBSD VM to test my recent socket changes. I don't know why I cannot create bluetooth sockets.

@vstinner
Copy link
Member

Copy link
Member

@vstinnervstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM. I don't understand bluetooth, but I trust the CI: if tests pass, the new tests are correct :-) More tests is always a good thing for better code coverage.

@serhiy-storchaka
Copy link
MemberAuthor

bind() for RFCOMM socket works on standalone Windows, but fails in VM, because Bluetooth is not supported in VM by default. There may be similar situation on FreeBSD.

@serhiy-storchaka
Copy link
MemberAuthor

!buildbot BSD

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@serhiy-storchaka for commit9266445 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F132023%2Fmerge

The command will test the builders whose names match following regular expression:BSD

The builders matched are:

  • AMD64 FreeBSD Refleaks PR
  • AMD64 FreeBSD15 PR
  • AMD64 FreeBSD14 PR
  • AMD64 FreeBSD PR

@furkanonder
Copy link
Contributor

@furkanonder, could you please test new tests on NetBSD?

I ran the tests on NetBSD, but all tests were skipped. I'm running NetBSD on a Proxmox virtualization environment.

╰─$ ./python-mtesttest_socket-mBasicBluetoothTest-v==CPython3.14.0a6+ (heads/test-socket-bluetooth:fc992e3a17a,Apr32025,18:06:54) [GCC10.5.0]==NetBSD-10.0-amd64-x86_64-64bit-ELFlittle-endian==Pythonbuild:debug==cwd:/home/blue/Desktop/cpython/build/test_python_worker_24709æ==CPUcount:16==encodings:locale=UTF-8FS=utf-8==resources:alltestresourcesaredisabled,use-uoptiontounskiptestsUsingrandomseed:34345567990:00:00loadavg:0.25Run1testsequentiallyinasingleprocess0:00:00loadavg:0.25 [1/1]test_sockettestBadHciAddr (test.test_socket.BasicBluetoothTest.testBadHciAddr) ...skipped'Bluetooth sockets required for this test.'testBadL2capAddr (test.test_socket.BasicBluetoothTest.testBadL2capAddr) ...skipped'Bluetooth sockets required for this test.'testBadRfcommAddr (test.test_socket.BasicBluetoothTest.testBadRfcommAddr) ...skipped'Bluetooth sockets required for this test.'testBadScoAddr (test.test_socket.BasicBluetoothTest.testBadScoAddr) ...skipped'Bluetooth sockets required for this test.'testBindBrEdrL2capSocket (test.test_socket.BasicBluetoothTest.testBindBrEdrL2capSocket) ...skipped'Bluetooth sockets required for this test.'testBindHciSocket (test.test_socket.BasicBluetoothTest.testBindHciSocket) ...skipped'Bluetooth sockets required for this test.'testBindLeAttL2capSocket (test.test_socket.BasicBluetoothTest.testBindLeAttL2capSocket) ...skipped'Bluetooth sockets required for this test.'testBindLePsmL2capSocket (test.test_socket.BasicBluetoothTest.testBindLePsmL2capSocket) ...skipped'Bluetooth sockets required for this test.'testBindRfcommSocket (test.test_socket.BasicBluetoothTest.testBindRfcommSocket) ...skipped'Bluetooth sockets required for this test.'testBindScoSocket (test.test_socket.BasicBluetoothTest.testBindScoSocket) ...skipped'Bluetooth sockets required for this test.'testBluetoothConstants (test.test_socket.BasicBluetoothTest.testBluetoothConstants) ...skipped'Bluetooth sockets required for this test.'testCreateHciSocket (test.test_socket.BasicBluetoothTest.testCreateHciSocket) ...skipped'Bluetooth sockets required for this test.'testCreateL2capSocket (test.test_socket.BasicBluetoothTest.testCreateL2capSocket) ...skipped'Bluetooth sockets required for this test.'testCreateRfcommSocket (test.test_socket.BasicBluetoothTest.testCreateRfcommSocket) ...skipped'Bluetooth sockets required for this test.'testCreateScoSocket (test.test_socket.BasicBluetoothTest.testCreateScoSocket) ...skipped'Bluetooth sockets required for this test.'----------------------------------------------------------------------Ran15testsin0.004sOK (skipped=15)0:00:00loadavg:0.25 [1/1]test_socketpassed==Testsresult:SUCCESS==1testOK.Totalduration:332msTotaltests:run=15 (filtered)skipped=15Totaltestfiles:run=1/1 (filtered)Result:SUCCESS
>>>importsysconfig>>>config_vars=sysconfig.get_config_vars()>>>forkeyinconfig_vars:...if'BLUETOOTH'inkey:...print(f"{key}:{config_vars[key]}")...HAVE_BLUETOOTH_BLUETOOTH_H:0HAVE_BLUETOOTH_H:1

@serhiy-storchaka
Copy link
MemberAuthor

Thanks,@furkanonder. It seems difficult to test Bluetooth on virtual machine.

I'll only backport these tests to 3.13, so we will have more chance to fix them.

furkanonder reacted with thumbs up emoji

@serhiy-storchakaserhiy-storchaka merged commit2ccd6aa intopython:mainApr 4, 2025
38 checks passed
@serhiy-storchakaserhiy-storchaka deleted the test-socket-bluetooth branchApril 4, 2025 11:33
@serhiy-storchakaserhiy-storchaka added the needs backport to 3.13bugs and security fixes labelApr 4, 2025
@miss-islington-app
Copy link

Thanks@serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelApr 4, 2025
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure⚠️⚠️⚠️

Hi! The buildbotAMD64 Fedora Stable Clang 3.x (tier-2) has failed when building commit2ccd6aa.

What do you need to do:

  1. Don't panic.
  2. Checkthe buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/441/builds/7621) and take a look at the build logs.
  4. Check if the failure is related to this commit (2ccd6aa) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/441/builds/7621

Failed tests:

  • test_socket

Failed subtests:

  • testBindHciSocket - test.test_socket.BasicBluetoothTest.testBindHciSocket

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):  File"/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.clang/build/Lib/test/test_socket.py", line2728, intestBindHciSocket    s.bind((dev,))~~~~~~^^^^^^^^OSError:[Errno 22] Invalid argument

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure⚠️⚠️⚠️

Hi! The buildbotAMD64 Fedora Stable Clang Installed 3.x (tier-2) has failed when building commit2ccd6aa.

What do you need to do:

  1. Don't panic.
  2. Checkthe buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/350/builds/7629) and take a look at the build logs.
  4. Check if the failure is related to this commit (2ccd6aa) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/350/builds/7629

Failed tests:

  • test_socket

Failed subtests:

  • testBindHciSocket - test.test_socket.BasicBluetoothTest.testBindHciSocket

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):  File"/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.clang-installed/build/target/lib/python3.14/test/test_socket.py", line2728, intestBindHciSocket    s.bind((dev,))~~~~~~^^^^^^^^OSError:[Errno 19] No such device

@vstinner
Copy link
Member

I can reproduce a failure on my Fedora laptop:

ERROR: testBindHciSocket (test.test_socket.BasicBluetoothTest.testBindHciSocket)----------------------------------------------------------------------Traceback (most recent call last):  File "/home/vstinner/python/main/Lib/test/test_socket.py", line 2728, in testBindHciSocket    s.bind((dev,))    ~~~~~~^^^^^^^^OSError: [Errno 22] Invalid argument

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure⚠️⚠️⚠️

Hi! The buildbotAMD64 RHEL8 FIPS Only Blake2 Builtin Hash 3.x (no tier) has failed when building commit2ccd6aa.

What do you need to do:

  1. Don't panic.
  2. Checkthe buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/469/builds/10638) and take a look at the build logs.
  4. Check if the failure is related to this commit (2ccd6aa) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/469/builds/10638

Failed tests:

  • test_socket

Failed subtests:

  • testBindHciSocket - test.test_socket.BasicBluetoothTest.testBindHciSocket

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):  File"/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/test/test_socket.py", line2728, intestBindHciSocket    s.bind((dev,))~~~~~~^^^^^^^^OSError:[Errno 19] No such device

@vstinner
Copy link
Member

Hi! The buildbot ARM Raspbian 3.x (tier-3) has failed when building commit2ccd6aa.
testBindHciSocket - test.test_socket.BasicBluetoothTest.testBindHciSocket

Ah, it's the same failure than on Fedora.

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure⚠️⚠️⚠️

Hi! The buildbotAMD64 Fedora Stable LTO + PGO 3.x (tier-1) has failed when building commit2ccd6aa.

What do you need to do:

  1. Don't panic.
  2. Checkthe buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/29/builds/8015) and take a look at the build logs.
  4. Check if the failure is related to this commit (2ccd6aa) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/29/builds/8015

Failed tests:

  • test_socket

Failed subtests:

  • testBindHciSocket - test.test_socket.BasicBluetoothTest.testBindHciSocket

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):  File"/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto-pgo/build/Lib/test/test_socket.py", line2728, intestBindHciSocket    s.bind((dev,))~~~~~~^^^^^^^^OSError:[Errno 22] Invalid argument

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure⚠️⚠️⚠️

Hi! The buildbotAMD64 Fedora Stable LTO 3.x (tier-1) has failed when building commit2ccd6aa.

What do you need to do:

  1. Don't panic.
  2. Checkthe buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/271/builds/6812) and take a look at the build logs.
  4. Check if the failure is related to this commit (2ccd6aa) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/271/builds/6812

Failed tests:

  • test_socket

Failed subtests:

  • testBindHciSocket - test.test_socket.BasicBluetoothTest.testBindHciSocket

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):  File"/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/test/test_socket.py", line2728, intestBindHciSocket    s.bind((dev,))~~~~~~^^^^^^^^OSError:[Errno 22] Invalid argument

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure⚠️⚠️⚠️

Hi! The buildbotaarch64 Fedora Stable LTO + PGO 3.x (tier-2) has failed when building commit2ccd6aa.

What do you need to do:

  1. Don't panic.
  2. Checkthe buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/524/builds/7312) and take a look at the build logs.
  4. Check if the failure is related to this commit (2ccd6aa) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/524/builds/7312

Failed tests:

  • test_perf_profiler
  • test_socket

Failed subtests:

  • testBindHciSocket - test.test_socket.BasicBluetoothTest.testBindHciSocket
  • test_python_calls_appear_in_the_stack_if_perf_activated - test.test_perf_profiler.TestPerfProfilerWithDwarf.test_python_calls_appear_in_the_stack_if_perf_activated

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):  File"/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto-pgo/build/Lib/test/test_socket.py", line2728, intestBindHciSocket    s.bind((dev,))~~~~~~^^^^^^^^OSError:[Errno 22] Invalid argumentTraceback (most recent call last):  File"/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto-pgo/build/Lib/test/test_perf_profiler.py", line364, intest_python_calls_appear_in_the_stack_if_perf_activatedself.assertIn(f"py::foo:{script}", stdout)~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^AssertionError: 'py::foo:/tmp/test_python_u61_gpvw/tmp09o4zslx/perftest.py' not found in 'python 3106145 925918.386514:          1 cycles:Pu: \n\tffffaa282d37fc78 [unknown] ([unknown])\n\tffffaa282d38049c [unknown] ([unknown])\n\tffffaa282bf215e4 [unknown] ([unknown])\n\t    ffff80af6ac0 _start+0x0 (/usr/lib/ld-linux-aarch64.so.1)\n\npython 3106145 925918.386564:          1 cycles:Pu: \n\t    ffff80af6ac0 _start+0x0 (/usr/lib/ld-linux-aarch64.so.1)\n\npython 3106145 925918.387141:          1 cycles:Pu: \n\t    ffff80ae25ec _dl_postprocess_loadcmd+0x90c (inlined)\n\t    ffff80ae25ec _dl_map_segments+0x90c (inlined)\n\t    ffff80ae25ec _dl_map_object_from_fd+0x90c (/usr/lib/ld-linux-aarch64.so.1)\n\t    ffff80ae3133 _dl_map_object+0x1e7 (/usr/lib/ld-linux-aarch64.so.1)\n\t    ffff80ade5bf openaux+0x3f (/usr/lib/ld-linux-aarch64.so.1)\n\t    ffff80add303 _dl_catch_exception+0x63 (/usr/lib/ld-linux-aarch64.so.1)\n\t    ffff80adeb33 _dl_map_object_deps+0x553 (/usr/lib/ld-linux-aarch64.so.1)\n\t    ffff80af419f dl_main+0x139f (/usr/lib/ld-linux-aarch64.so.1)\n\t    ffff80af15ff _dl_sysdep_start+0x1df (/usr/lib/ld-linux-aarch64.so.1)\n\t    ffff80af2b17 _dl_start_final+0x5ab (inlined)\n\t    ffff80af2b17 _dl_start+0x5ab (/usr/lib/ld-linux-aarch64.so.1)\n\t    ffff80af6ad3 _start+0x13 (/usr/lib/ld-linux-aarch64.so.1)\n\npython 3106145 925918.387189:        394 cycles:Pu: \n\tffffaa282d37f654 [unknown] ([unknown])\n\tffffaa282d380484 [unknown] ([unknown])\n\tffffaa282bf215e4 [unknown] ([unknown])\n\t    ffff80af9c24 __memset_generic+0x24 (inlined)\n\t    ffff80ae20db _dl_map_segments+0x3fb (inlined)\n\t    ffff80ae20db _dl_map_object_from_fd+0x3fb (/usr/lib/ld-linux-aarch64.so.1)\n-fedora-stable-aarch64.lto-pgo/build/python)\n\t          588127 pymain_init+0x3b (/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto-pgo/build/python)\n\t          58806f pymain_main+0xf (/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto-pgo/build/python)\n\t          587fe3 Py_BytesMain+0x23 (/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto-pgo/build/python)\n\t    ffff8088625b __libc_start_call_main+0x7b (/usr/lib64/libc.so.6)\n\t    ffff8088633b __libc_start_main@@GLIBC_2.34+0x9b (/usr/lib64/libc.so.6)\n\t          586c2f _start+0x2f (/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto-pgo/build/python)\n\npython 3106145 925918.389185:      62577 cycles:Pu: \n\t          486040 _PyUnicode_DATA+0x50 (inlined)\n\t          486040 unicode_hash+0x50 (inlined)\n\t          486040 unicode_hash+0x50 (inlined)\n\t          486040 hashtable_unicode_hash+0x50 (inlined)\n\t          486040 _Py_hashtable_get_entry_generic+0x50 (inlined)\n\t          486040 _Py_hashtable_get+0x50 (/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto-pgo/build/python)\n\t          592a53 intern_static.isra.0+0x27 (/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto-pgo/build/python)\n\t          591e8b _PyUnicode_InternStatic+0x23c7 (inlined)\n\t          591e8b _PyUnicode_InitStaticStrings+0x23c7 (inlined)\n\t          591e8b init_global_interned_strings+0x23c7 (inlined)\n\t          591e8b _PyUnicode_InitGlobalObjects+0x23c7 (inlined)\n\t          591e8b pycore_init_global_objects+0x23c7 (inlined)\n\t          591e8b pycore_interp_init+0x23c7 (/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto-pgo/build/python)\n\t          58a3af pyinit_config+0x3cf (inlined)\n\t          58a3af pyinit_core.constprop.0+0x3cf (/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto-pgo/build/python)\n\t          589ea3 Py_InitializeFromConfig+0x33 (/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto-pgo/build/python)\n\t          5881af pymain_init+0xc3 (/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto-pgo/build/python)\n\t          58806f pymain_main+0xf (/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto-pgo/build/python)\n\t          587fe3 Py_BytesMain+0x23 (/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto-pgo/build/python)\n\t    ffff8088625b __libc_start_call_main+0x7b (/usr/lib64/libc.so.6)\n\t    ffff8088633b __libc_start_main@@GLIBC_2.34+0x9b (/usr/lib64/libc.so.6)\n\t          586c2f _start+0x2f (/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto-pgo/build/python)\n\npython 3106145 925918.390479:    1598128 cycles:Pu: \n\t          594250 _PyObject_GC_TRACK+0x410 (inlined)\n\t          594250 PyType_GenericAlloc+0x410 (inlined)\n\t          594250 descr_new+0x410 (inlined)\n\t          594250 PyDescr_NewWrapper+0x410 (inlined)\n\t          594250 add_operators+0x410 (inlined)\n\t          594250 type_ready_fill_dict+0x410 (inlined)\n\t          594250 type_ready+0x410 (/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto-pgo/build/python)\n\t          593ca7 init_static_type+0xc7 (/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto-pgo/build/python)\n\t          5931cf _PyTypes_InitTypes+0x47 (inlined)\n\t          5931cf pycore_init_types+0x47 (/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto-pgo/build/python)\n\t          59209b pycore_interp_init+0x25d7 (/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto-pgo/build/python)\n\t          58a3af pyinit_config+0x3cf (inlined)\n\t          58a3af pyinit_core.constprop.0+0x3cf (/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto-pgo/build/python)\n\t          589ea3 Py_InitializeFromConfig+0x33 (/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto-pgo/build/python)\n\t          5881af pymain_init+0xc3 (/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto-pgo/build/python)\n\t          58806f pymain_main+0xf (/home/buildbot/buildarea/3.x.cstratak-fedora-stable

@serhiy-storchaka
Copy link
MemberAuthor

What surprises me here is that it fails with different error codes: EINVAL and ENODEV.

Thesockaddr_hci structure has also thehci_channel member, but I do not see it initialized.

structsockaddr_hci {sa_family_thci_family;unsigned shorthci_dev;unsigned shorthci_channel;};

@vstinner, could you please add the following line and test it on your Fedora laptop?

diff --git a/Modules/socketmodule.c b/Modules/socketmodule.cindex 6e44a7ebfd1..54ba6885564 100644--- a/Modules/socketmodule.c+++ b/Modules/socketmodule.c@@ -2104,6 +2104,7 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,         case BTPROTO_HCI:         {             struct sockaddr_hci *addr = &addrbuf->bt_hci;+            memset(addr, 0, sizeof(struct sockaddr_hci)); #if defined(__NetBSD__) || defined(__DragonFly__)             const char *straddr;             _BT_HCI_MEMB(addr, family) = AF_BLUETOOTH;

serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull requestApr 4, 2025
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure⚠️⚠️⚠️

Hi! The buildbotaarch64 Fedora Stable LTO 3.x (tier-2) has failed when building commit2ccd6aa.

What do you need to do:

  1. Don't panic.
  2. Checkthe buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/336/builds/6619) and take a look at the build logs.
  4. Check if the failure is related to this commit (2ccd6aa) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/336/builds/6619

Failed tests:

  • test_socket

Failed subtests:

  • testBindHciSocket - test.test_socket.BasicBluetoothTest.testBindHciSocket

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):  File"/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto/build/Lib/test/test_socket.py", line2728, intestBindHciSocket    s.bind((dev,))~~~~~~^^^^^^^^OSError:[Errno 22] Invalid argument

@serhiy-storchaka
Copy link
MemberAuthor

It was a real bug (see#132075).

vstinner reacted with thumbs up emoji

serhiy-storchaka added a commit that referenced this pull requestApr 5, 2025
@hugovk
Copy link
Member

After fixing#132075,test_socket is still failing on tier-1 buildbots:

https://buildbot.python.org/#/release_status

For example:

https://buildbot.python.org/#/builders/29/builds/8023

======================================================================ERROR: testBindHciSocket (test.test_socket.BasicBluetoothTest.testBindHciSocket)----------------------------------------------------------------------Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto-pgo/build/Lib/test/test_socket.py", line 2728, in testBindHciSocket s.bind((dev,)) ~~~~~~^^^^^^^^OSError: [Errno 19] No such device----------------------------------------------------------------------Ran 744 tests in 53.289sFAILED (errors=1, skipped=41)test test_socket failed

@serhiy-storchaka
Copy link
MemberAuthor

Thank you for noticing@hugovk. Reopened#132072.

hugovk reacted with thumbs up emoji

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure⚠️⚠️⚠️

Hi! The buildbotPPC64LE Fedora Stable 3.13 (tier-2) has failed when building commita5ed920.

What do you need to do:

  1. Don't panic.
  2. Checkthe buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1388/builds/517) and take a look at the build logs.
  4. Check if the failure is related to this commit (a5ed920) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1388/builds/517

Failed tests:

  • test_socket

Failed subtests:

  • testBindHciSocket - test.test_socket.BasicBluetoothTest.testBindHciSocket

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):  File"/home/buildbot/buildarea/3.13.cstratak-fedora-stable-ppc64le/build/Lib/test/test_socket.py", line2702, intestBindHciSocket    s.bind((dev,))~~~~~~^^^^^^^^OSError:[Errno 19] No such device

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure⚠️⚠️⚠️

Hi! The buildbotAMD64 RHEL8 FIPS Only Blake2 Builtin Hash 3.13 (no tier) has failed when building commita5ed920.

What do you need to do:

  1. Don't panic.
  2. Checkthe buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1455/builds/963) and take a look at the build logs.
  4. Check if the failure is related to this commit (a5ed920) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1455/builds/963

Failed tests:

  • test_socket

Failed subtests:

  • testBindHciSocket - test.test_socket.BasicBluetoothTest.testBindHciSocket

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):  File"/home/buildbot/buildarea/3.13.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/test/test_socket.py", line2702, intestBindHciSocket    s.bind((dev,))~~~~~~^^^^^^^^OSError:[Errno 19] No such device

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure⚠️⚠️⚠️

Hi! The buildbotPPC64LE Fedora Stable Clang 3.13 (tier-3) has failed when building commita5ed920.

What do you need to do:

  1. Don't panic.
  2. Checkthe buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1395/builds/520) and take a look at the build logs.
  4. Check if the failure is related to this commit (a5ed920) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1395/builds/520

Failed tests:

  • test_socket

Failed subtests:

  • testBindHciSocket - test.test_socket.BasicBluetoothTest.testBindHciSocket

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):  File"/home/buildbot/buildarea/3.13.cstratak-fedora-stable-ppc64le.clang/build/Lib/test/test_socket.py", line2702, intestBindHciSocket    s.bind((dev,))~~~~~~^^^^^^^^OSError:[Errno 19] No such device

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure⚠️⚠️⚠️

Hi! The buildbotPPC64LE Fedora Stable Clang Installed 3.13 (tier-3) has failed when building commita5ed920.

What do you need to do:

  1. Don't panic.
  2. Checkthe buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1429/builds/520) and take a look at the build logs.
  4. Check if the failure is related to this commit (a5ed920) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1429/builds/520

Failed tests:

  • test_socket

Failed subtests:

  • testBindHciSocket - test.test_socket.BasicBluetoothTest.testBindHciSocket

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):  File"/home/buildbot/buildarea/3.13.cstratak-fedora-stable-ppc64le.clang-installed/build/target/lib/python3.13/test/test_socket.py", line2702, intestBindHciSocket    s.bind((dev,))~~~~~~^^^^^^^^OSError:[Errno 19] No such device

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestApr 5, 2025
… fails (pythonGH-132072)(cherry picked from commitef70f02)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure⚠️⚠️⚠️

Hi! The buildbotPPC64LE Fedora Stable LTO + PGO 3.13 (tier-2) has failed when building commita5ed920.

What do you need to do:

  1. Don't panic.
  2. Checkthe buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1494/builds/523) and take a look at the build logs.
  4. Check if the failure is related to this commit (a5ed920) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1494/builds/523

Failed tests:

  • test_socket

Failed subtests:

  • testBindHciSocket - test.test_socket.BasicBluetoothTest.testBindHciSocket

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):  File"/home/buildbot/buildarea/3.13.cstratak-fedora-stable-ppc64le.lto-pgo/build/Lib/test/test_socket.py", line2702, intestBindHciSocket    s.bind((dev,))~~~~~~^^^^^^^^OSError:[Errno 19] No such device

serhiy-storchaka added a commit that referenced this pull requestApr 5, 2025
…t fails (GH-132072) (GH-132125)(cherry picked from commitef70f02)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure⚠️⚠️⚠️

Hi! The buildbotPPC64LE Fedora Stable LTO 3.13 (tier-2) has failed when building commita5ed920.

What do you need to do:

  1. Don't panic.
  2. Checkthe buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1492/builds/510) and take a look at the build logs.
  4. Check if the failure is related to this commit (a5ed920) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1492/builds/510

Failed tests:

  • test_socket

Failed subtests:

  • testBindHciSocket - test.test_socket.BasicBluetoothTest.testBindHciSocket

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):  File"/home/buildbot/buildarea/3.13.cstratak-fedora-stable-ppc64le.lto/build/Lib/threading.py", line1041, in_bootstrap_innerself.run()~~~~~~~~^^  File"/home/buildbot/buildarea/3.13.cstratak-fedora-stable-ppc64le.lto/build/Lib/threading.py", line992, inrunself._target(*self._args,**self._kwargs)~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File"/home/buildbot/buildarea/3.13.cstratak-fedora-stable-ppc64le.lto/build/Lib/test/test_interpreters/test_stress.py", line30, intask    interp= interpreters.create()  File"/home/buildbot/buildarea/3.13.cstratak-fedora-stable-ppc64le.lto/build/Lib/test/support/interpreters/__init__.py", line76, increateid= _interpreters.create(reqrefs=True)interpreters.InterpreterError:interpreter creation failedkTraceback (most recent call last):  File"/home/buildbot/buildarea/3.13.cstratak-fedora-stable-ppc64le.lto/build/Lib/test/test_socket.py", line2702, intestBindHciSocket    s.bind((dev,))~~~~~~^^^^^^^^OSError:[Errno 19] No such device

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure⚠️⚠️⚠️

Hi! The buildbotAMD64 Fedora Stable Refleaks 3.13 (tier-1) has failed when building commita5ed920.

What do you need to do:

  1. Don't panic.
  2. Checkthe buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1471/builds/651) and take a look at the build logs.
  4. Check if the failure is related to this commit (a5ed920) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1471/builds/651

Failed tests:

  • test_socket

Failed subtests:

  • testBindHciSocket - test.test_socket.BasicBluetoothTest.testBindHciSocket

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):  File"/home/buildbot/buildarea/3.13.cstratak-fedora-stable-x86_64.refleak/build/Lib/test/test_socket.py", line2702, intestBindHciSocket    s.bind((dev,))~~~~~~^^^^^^^^OSError:[Errno 19] No such device

seehwan pushed a commit to seehwan/cpython that referenced this pull requestApr 16, 2025
seehwan pushed a commit to seehwan/cpython that referenced this pull requestApr 16, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@vstinnervstinnervstinner approved these changes

Labels

skip issueskip newstestsTests in the Lib/test dir

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@serhiy-storchaka@bedevere-bot@vstinner@furkanonder@hugovk

[8]ページ先頭

©2009-2025 Movatter.jp