python / python/cpython

test_timerfd_initval fails with large time difference on NetBSD

オープン
#131,266 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

3.13 3.14 3.15 OS-netbsd tests type-bug
主要言語
Python
スター
77.2k
フォーク
35.9k
PR マージ指標
PR 指標を取得中

説明

Bug report

Bug description:

The test_timerfd_initval test in test_os.TimerfdTests is failing on NetBSD with a very large time difference between the expected and actual expiration values. The test expects values to be almost equal within 3 decimal places, but the actual difference is over 1.7 billion seconds.

Configuration:
./configure --with-pydebug
Test
./python -m test test_os -m test_timerfd_initval -v

Output:

== CPython 3.14.0a6+ (heads/main:26511993e63, Mar 15 2025, 01:30:33) [GCC 10.5.0]
== NetBSD-10.0-amd64-x86_64-64bit-ELF little-endian
== Python build: debug
== cwd: /home/blue/cpython/build/test_python_worker_20567æ
== CPU count: 16
== encodings: locale=UTF-8 FS=utf-8
== resources: all test resources are disabled, use -u option to unskip tests
Using random seed: 3011250179
0:00:00 load avg: 2.25 Run 1 test sequentially in a single process
0:00:00 load avg: 2.25 [1/1] test_os
test_timerfd_initval (test.test_os.TimerfdTests.test_timerfd_initval) ... FAIL
======================================================================
FAIL: test_timerfd_initval (test.test_os.TimerfdTests.test_timerfd_initval)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_os.py", line 4327, in test_timerfd_initval
    self.assertAlmostEqual(next_expiration, initial_expiration, places=self.CLOCK_RES_PLACES)
    ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 1741991497.5326333 != 0.25 within 3 places (1741991497.2826333 difference)
----------------------------------------------------------------------
Ran 1 test in 0.010s
FAILED (failures=1)
test test_os failed
0:00:00 load avg: 2.25 [1/1/1] test_os failed (1 failure)
== Tests result: FAILURE ==
1 test failed:
    test_os
Total duration: 958 ms
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE

OS: NetBSD-10.0-amd64

CPython versions tested on:

CPython main branch, 3.14, 3.13

Operating systems tested on:

Other

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

Lib/test/test_os.py と TimerfdTests.test_timerfd_initval から始め、報告された構成で NetBSD 上で ./python -m test test_os -m test_timerfd_initval -v を実行します。タイマーの期待される満了値と実際の満了値を比較し、NetBSD 固有の動作を調査します。影響を受けるプラットフォームでテストが正しく成功すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
operating-systems, testing-qa
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。