Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-123978: Fix test_thread_time failure on NetBSD by adjusting threshold for time difference #123979

Closed
wants to merge 1 commit into from

Conversation

furkanonder
Copy link
Contributor

@furkanonder furkanonder commented Sep 11, 2024

@furkanonder furkanonder added type-bug An unexpected behavior, bug, or error tests Tests in the Lib/test dir skip news 3.12 bugs and security fixes 3.13 bugs and security fixes 3.14 new features, bugs and security fixes labels Sep 11, 2024
@furkanonder furkanonder changed the title Fix test_thread_time failure on NetBSD by adjusting threshold for time difference gh-123968: Fix test_thread_time failure on NetBSD by adjusting threshold for time difference Sep 11, 2024
@furkanonder furkanonder changed the title gh-123968: Fix test_thread_time failure on NetBSD by adjusting threshold for time difference gh-123978: Fix test_thread_time failure on NetBSD by adjusting threshold for time difference Sep 11, 2024
@Eclips4 Eclips4 added needs backport to 3.12 bug and security fixes needs backport to 3.13 bugs and security fixes and removed 3.12 bugs and security fixes 3.13 bugs and security fixes 3.14 new features, bugs and security fixes labels Sep 12, 2024
# on Windows
self.assertLess(stop - start, 0.020)
if sys.platform.startswith("netbsd"):
self.assertLess(stop - start, 0.3)
Copy link
Member

Choose a reason for hiding this comment

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

The purpose of the test is to test that the returned value is much smaller than the sleep() argument. Using 0.3 here does not make sense. Try to run the test with time.sleep(1.0) or time.sleep(2.0). Is it still passed?

Copy link
Contributor Author

@furkanonder furkanonder Sep 13, 2024

Choose a reason for hiding this comment

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

for time.sleep(2.0)

localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 519419936
0:00:00 load avg: 5.54 Run 1 test sequentially in a single process
0:00:00 load avg: 5.54 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.65 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 1701939771
0:00:00 load avg: 5.50 Run 1 test sequentially in a single process
0:00:00 load avg: 5.50 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.99 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 3726776671
0:00:00 load avg: 5.46 Run 1 test sequentially in a single process
0:00:00 load avg: 5.46 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.66 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 3937662487
0:00:00 load avg: 5.46 Run 1 test sequentially in a single process
0:00:00 load avg: 5.46 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.62 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 345311402
0:00:00 load avg: 5.42 Run 1 test sequentially in a single process
0:00:00 load avg: 5.42 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.61 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 1270421924
0:00:00 load avg: 5.42 Run 1 test sequentially in a single process
0:00:00 load avg: 5.42 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.62 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 1033672393
0:00:00 load avg: 5.39 Run 1 test sequentially in a single process
0:00:00 load avg: 5.39 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.6000000000000001 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 3077507841
0:00:00 load avg: 5.39 Run 1 test sequentially in a single process
0:00:00 load avg: 5.39 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.91 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ [A
-sh: [A: not found
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 865686688
0:00:00 load avg: 5.06 Run 1 test sequentially in a single process
0:00:00 load avg: 5.06 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.44 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.4 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 2034744043
0:00:00 load avg: 5.12 Run 1 test sequentially in a single process
0:00:00 load avg: 5.12 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.5899999999999999 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 3194439630
0:00:00 load avg: 5.11 Run 1 test sequentially in a single process
0:00:00 load avg: 5.11 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.7799999999999998 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 3735706350
0:00:00 load avg: 5.10 Run 1 test sequentially in a single process
0:00:00 load avg: 5.10 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.65 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 3814569497
0:00:00 load avg: 5.10 Run 1 test sequentially in a single process
0:00:00 load avg: 5.10 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.63 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 1086046472
0:00:00 load avg: 5.18 Run 1 test sequentially in a single process
0:00:00 load avg: 5.18 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.76 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 614218096
0:00:00 load avg: 5.16 Run 1 test sequentially in a single process
0:00:00 load avg: 5.16 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.6099999999999999 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 3906044982
0:00:00 load avg: 5.15 Run 1 test sequentially in a single process
0:00:00 load avg: 5.15 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.65 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$

Copy link
Contributor Author

@furkanonder furkanonder Sep 13, 2024

Choose a reason for hiding this comment

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

for time.sleep(1.0)

localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 3001545883
0:00:00 load avg: 5.80 Run 1 test sequentially in a single process
0:00:00 load avg: 5.80 [1/1] test_time

== Tests result: SUCCESS ==

1 test OK.

Total duration: 389 ms
Total tests: run=1 (filtered)
Total test files: run=1/1 (filtered)
Result: SUCCESS
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 2730425917
0:00:00 load avg: 5.57 Run 1 test sequentially in a single process
0:00:00 load avg: 5.57 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.48 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.4 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 1553039181
0:00:00 load avg: 5.57 Run 1 test sequentially in a single process
0:00:00 load avg: 5.57 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.5999999999999999 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 2419678783
0:00:00 load avg: 5.52 Run 1 test sequentially in a single process
0:00:00 load avg: 5.52 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.5999999999999999 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 3226566423
0:00:00 load avg: 5.56 Run 1 test sequentially in a single process
0:00:00 load avg: 5.56 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.8599999999999999 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 1197532604
0:00:00 load avg: 5.56 Run 1 test sequentially in a single process
0:00:00 load avg: 5.56 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.68 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ git diff
diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py
index 293799ff68e..129f659773e 100644
--- a/Lib/test/test_time.py
+++ b/Lib/test/test_time.py
@@ -527,11 +527,14 @@ def test_thread_time(self):

         # thread_time() should not include time spend during a sleep
         start = time.thread_time()
-        time.sleep(0.100)
+        time.sleep(2.0)
         stop = time.thread_time()
-        # use 20 ms because thread_time() has usually a resolution of 15 ms
-        # on Windows
-        self.assertLess(stop - start, 0.020)
+        if sys.platform.startswith("netbsd"):
+            self.assertLess(stop - start, 0.3)
+        else:
+            # use 20 ms because thread_time() has usually a resolution of 15 ms
+            # on Windows
+            self.assertLess(stop - start, 0.020)

         info = time.get_clock_info('thread_time')
         self.assertTrue(info.monotonic)
localhost$ ^D
Connection to 192.168.1.8 closed.
╭─arf@akarsu ~
╰─$
╭─arf@akarsu ~
╰─$ ssh [email protected]
([email protected]) Password for [email protected]:
Last login: Sat Sep 14 00:01:01 2024 from 192.168.1.13
NetBSD 10.0 (GENERIC) #0: Thu Mar 28 08:33:33 UTC 2024

Welcome to NetBSD!

localhost$ cd cpython/
localhost$ cd cpython/
localhost$ ls
Android             Makefile.pre        Python              config.sub          pyconfig.h.in
Doc                 Makefile.pre.in     README.rst          configure           python
Grammar             Misc                Tools               configure.ac        python-config
Include             Modules             _bootstrap_python   iOS                 python-config.py
InternalDocs        Objects             aclocal.m4          install-sh          python-gdb.py
LICENSE             PC                  build               libpython3.14d.a
Lib                 PCbuild             config.guess        platform
Mac                 Parser              config.log          pybuilddir.txt
Makefile            Programs            config.status       pyconfig.h
localhost$ pwd
/home/blue/cpython
localhost$
localhost$ localhost$ ./python -m test test_time -m test_thread_time
ssertionError: 1.5999999999999999 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 2419678783
0:00:00 load avg: 5.52 Run 1 test sequentially in a single process
0:00:00 load avg: 5.52 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.5999999999999999 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -sh: localhost$: not found
localhost$ ssertionError: 1.5999999999999999 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 2419678783
0:00:00 load avg: 5.52 Run 1 test sequentially in a single process
0:00:00 load avg: 5.52 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.5999999999999999 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 3226566423
0-sh: ssertionError:: not found
localhost$
localhost$ test_time failed (1 failure)
-sh: 7: Syntax error: "(" unexpected
localhost$
localhost$ == Tests result: FAILURE ==
test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.8599999999999999 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 1197532604
0:00:00 load avg: 5.56 Run 1 test sequentially in a single process
0:00:00 load avg: 5.56 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.68 not less than 0.3

test_time failed (1 failure)

== Tests res-sh: ==: not found
localhost$ test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.8599999999999999 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 1197532604
0:00:00 load avg: 5.56 Run 1 test sequentially in a single process
0:00:00 load avg: 5.56 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.68 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILUR-sh: test_time: not found
localhost$ test test_time failed -- Traceback (most recent call last):
-sh: 10: Syntax error: "(" unexpected
localhost$   File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.8599999999999999 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 1197532604
0:00:00 load avg: 5.56 Run 1 test sequentially in a single process
0:00:00 load avg: 5.56 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.68 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 t  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.8599999999999999 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 1197532604
0:00:00 load avg: 5.56 Run 1 test sequentially in a single process
0:00:00 load avg: 5.56 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.68 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered-sh: File: not found
localhost$     self.assertLess(stop - start, 0.3)
-sh: 11: Syntax error: Word "stop" unexpected (expecting ")")
localhost$     ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
-sh: ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^: not found
localhost$ AssertionError: 1.8599999999999999 not less than 0.3
-sh: AssertionError:: not found
localhost$
localhost$ test_time failed (1 failure)
-sh: 14: Syntax error: "(" unexpected
localhost$
localhost$ == Tests result: FAILURE ==
-sh: ==: not found
localhost$
localhost$ 1 test failed:
-sh: 1: not found
localhost$     test_time
-sh: test_time: not found
localhost$
localhost$ Total duration: 2.3 sec
-sh: Total: not found
localhost$ Total tests: run=1 (filtered) failures=1
-sh: 21: Syntax error: "(" unexpected
localhost$ Total test files: run=1/1 (filtered) failed=1
-sh: 21: Syntax error: "(" unexpected
localhost$ Result: FAILURE
-sh: Result:: not found
localhost$ localhost$ ./python -m test test_time -m test_thread_time
-sh: localhost$: not found
localhost$ Using random seed: 1197532604
-sh: Using: not found
localhost$ 0:00:00 load avg: 5.56 Run 1 test sequentially in a single process
-sh: 0:00:00: not found
localhost$ 0:00:00 load avg: 5.56 [1/1] test_time
-sh: 0:00:00: not found
localhost$ test test_time failed -- Traceback (most recent call last):
-sh: 26: Syntax error: "(" unexpected
localhost$   File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
-sh: File: not found
localhost$     self.assertLess(stop - start, 0.3)
-sh: 27: Syntax error: Word "stop" unexpected (expecting ")")
localhost$     ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
-sh: ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^: not found
localhost$ AssertionError: 1.68 not less than 0.3
-sh: AssertionError:: not found
localhost$
localhost$ test_time failed (1 failure)
-sh: 30: Syntax error: "(" unexpected
localhost$
localhost$ == Tests result: FAILURE ==
-sh: ==: not found
localhost$
localhost$ 1 test failed:
-sh: 1: not found
localhost$     test_time
-sh: test_time: not found
localhost$
localhost$ Total duration: 2.3 sec
-sh: Total: not found
localhost$ Total tests: run=1 (filtered) failures=1
-sh: 37: Syntax error: "(" unexpected
localhost$ Total test files: run=1/1 (filtered) failed=1
-sh: 37: Syntax error: "(" unexpected
localhost$ Result: FAILURE
localhost$
localhost$ localhost$ ./python -m test test_time -m test_thread_time
ssertionError: 1.5999999999999999 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 2419678783
0:00:00 load avg: 5.52 Run 1 test sequentially in a single process
0:00:00 load avg: 5.52 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.5999999999999999 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -sh: localhost$: not found
localhost$ ssertionError: 1.5999999999999999 not less than 0.3
-sh:
test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 2419678783
0:00:00 load avg: 5.52 Run 1 test sequentially in a single process
0:00:00 load avg: 5.52 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.5999999999999999 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random sUsing random sUsinssertionError:: not found
localhost$
localhost$ test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 2419678783
0:00:00 load avg: 5.52 Run 1 test sequentially in a single process
0:00:00 load avg: 5.52 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.5999999999999999 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@test_time failed (1 failure)
-sh: 0:00:00 load avg: 5.56 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.8599999999999999 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 1197532604
0:00:00 load avg: 5.56 Run 1 test sequentially in a single process
0:00:00 load avg: 5.56 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.68 not less than 0.3

test_time faile40: Syntax error: "(" unexpected
localhost$ 0:00:00 load avg: 5.56 [1/1] test_time
-sh: test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.8599999999999999 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 1197532604
0:00:00 load avg: 5.56 Run 1 test sequentially in a single process
0:00:00 load avg: 5.56 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.68 not less than 0.3

test_time failed (1 failure)

== Tests resu== Tests r0:00:00: not found
localhost$ test test_time failed -- Traceback (most recent call last):
-sh: failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE41: Syntax error: "(" unexpected
localhost$ failures=1
localhost$ Total test files: run=1/1 (filtered) failed=1
-sh: 42: Syntax error: "(" unexpected
localhost$ Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 4029684868
0:00:00 load avg: 5.28 Run 1 test sequentially in a single process
0:00:00 load avg: 5.28 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.01 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.4 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 3943496928
0:00:00 load avg: 5.28 Run 1 test sequentially in a single process
0:00:00 load avg: 5.28 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.5800000000000001 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 261580529
0:00:00 load avg: 5.34 Run 1 test sequentially in a single process
0:00:00 load avg: 5.34 [1/1] test_time

== Tests result: SUCCESS ==

1 test OK.

Total duration: 1.3 sec
Total tests: run=1 (filtered)
Total test files: run=1/1 (filtered)
Result: SUCCESS
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 2362210007
0:00:00 load avg: 5.34 Run 1 test sequentially in a single process
0:00:00 load avg: 5.34 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.5800000000000001 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 1990312139
0:00:00 load avg: 5.31 Run 1 test sequentially in a single process
0:00:00 load avg: 5.31 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.73 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 3445810772
0:00:00 load avg: 5.31 Run 1 test sequentially in a single process
0:00:00 load avg: 5.31 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.5900000000000001 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 1350869417
0:00:00 load avg: 5.29 Run 1 test sequentially in a single process
0:00:00 load avg: 5.29 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.8200000000000001 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 2507978946
0:00:00 load avg: 5.29 Run 1 test sequentially in a single process
0:00:00 load avg: 5.29 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.62 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 4284492744
0:00:00 load avg: 5.34 Run 1 test sequentially in a single process
0:00:00 load avg: 5.34 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.71 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 2175220585
0:00:00 load avg: 5.34 Run 1 test sequentially in a single process
0:00:00 load avg: 5.34 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.88 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 2059750312
0:00:00 load avg: 5.32 Run 1 test sequentially in a single process
0:00:00 load avg: 5.32 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.63 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 4154558023
0:00:00 load avg: 5.32 Run 1 test sequentially in a single process
0:00:00 load avg: 5.32 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.01 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 2484933059
0:00:00 load avg: 5.29 Run 1 test sequentially in a single process
0:00:00 load avg: 5.29 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.5900000000000001 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 314135838
0:00:00 load avg: 5.27 Run 1 test sequentially in a single process
0:00:00 load avg: 5.27 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.0 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 3344858287
0:00:00 load avg: 5.38 Run 1 test sequentially in a single process
0:00:00 load avg: 5.38 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.43000000000000005 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.4 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 3170265470
0:00:00 load avg: 5.59 Run 1 test sequentially in a single process
0:00:00 load avg: 5.59 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.01 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 519419936
0:00:00 load avg: 5.54 Run 1 test sequentially in a single process
0:00:00 load avg: 5.54 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.65 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 1701939771
0:00:00 load avg: 5.50 Run 1 test sequentially in a single process
0:00:00 load avg: 5.50 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.99 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 3726776671
0:00:00 load avg: 5.46 Run 1 test sequentially in a single process
0:00:00 load avg: 5.46 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.66 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 3937662487
0:00:00 load avg: 5.46 Run 1 test sequentially in a single process
0:00:00 load avg: 5.46 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.62 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 345311402
0:00:00 load avg: 5.42 Run 1 test sequentially in a single process
0:00:00 load avg: 5.42 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.61 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 1270421924
0:00:00 load avg: 5.42 Run 1 test sequentially in a single process
0:00:00 load avg: 5.42 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.62 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 1033672393
0:00:00 load avg: 5.39 Run 1 test sequentially in a single process
0:00:00 load avg: 5.39 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.6000000000000001 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 3077507841
0:00:00 load avg: 5.39 Run 1 test sequentially in a single process
0:00:00 load avg: 5.39 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.91 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ [A
-sh: [A: not found
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 865686688
0:00:00 load avg: 5.06 Run 1 test sequentially in a single process
0:00:00 load avg: 5.06 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.44 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.4 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 2034744043
0:00:00 load avg: 5.12 Run 1 test sequentially in a single process
0:00:00 load avg: 5.12 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.5899999999999999 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 3194439630
0:00:00 load avg: 5.11 Run 1 test sequentially in a single process
0:00:00 load avg: 5.11 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.7799999999999998 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 3735706350
0:00:00 load avg: 5.10 Run 1 test sequentially in a single process
0:00:00 load avg: 5.10 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.65 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 3814569497
0:00:00 load avg: 5.10 Run 1 test sequentially in a single process
0:00:00 load avg: 5.10 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.63 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 1086046472
0:00:00 load avg: 5.18 Run 1 test sequentially in a single process
0:00:00 load avg: 5.18 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.76 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 614218096
0:00:00 load avg: 5.16 Run 1 test sequentially in a single process
0:00:00 load avg: 5.16 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.6099999999999999 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 3906044982
0:00:00 load avg: 5.15 Run 1 test sequentially in a single process
0:00:00 load avg: 5.15 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 1.65 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 2.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ^D
Connection to 192.168.1.8 closed.
╭─arf@akarsu ~
╰─$                                                                                                 2 ↵
╭─arf@akarsu ~
╰─$                                                                                                 2 ↵
╭─arf@akarsu ~
╰─$ ssh [email protected]                                                                            2 ↵
([email protected]) Password for [email protected]:
Last login: Sat Sep 14 00:05:31 2024 from 192.168.1.13
NetBSD 10.0 (GENERIC) #0: Thu Mar 28 08:33:33 UTC 2024

Welcome to NetBSD!

localhost$ cd cpython/
localhost$ bash
bash-5.2$
bash-5.2$
exit
localhost$
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 716312302
0:00:00 load avg: 5.16 Run 1 test sequentially in a single process
0:00:00 load avg: 5.16 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.45999999999999996 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.4 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 1416895002
0:00:00 load avg: 5.16 Run 1 test sequentially in a single process
0:00:00 load avg: 5.16 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.9 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 3338163785
0:00:00 load avg: 5.23 Run 1 test sequentially in a single process
0:00:00 load avg: 5.23 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.76 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 2998314622
0:00:00 load avg: 5.23 Run 1 test sequentially in a single process
0:00:00 load avg: 5.23 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.6000000000000001 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.3 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 2989091254
0:00:00 load avg: 5.21 Run 1 test sequentially in a single process
0:00:00 load avg: 5.21 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.62 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 1793737819
0:00:00 load avg: 5.21 Run 1 test sequentially in a single process
0:00:00 load avg: 5.21 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.64 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$ ./python -m test test_time -m test_thread_time
Using random seed: 1927075117
0:00:00 load avg: 5.19 Run 1 test sequentially in a single process
0:00:00 load avg: 5.19 [1/1] test_time
test test_time failed -- Traceback (most recent call last):
  File "/home/blue/cpython/Lib/test/test_time.py", line 533, in test_thread_time
    self.assertLess(stop - start, 0.3)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
AssertionError: 0.61 not less than 0.3

test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 1.2 sec
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$

Copy link
Member

Choose a reason for hiding this comment

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

I suggest to skip test_thread_time() on NetBSD.

Copy link
Member

@serhiy-storchaka serhiy-storchaka Sep 13, 2024

Choose a reason for hiding this comment

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

Thank you @furkanonder. I his details in your comments.

It looks like this timer is not reliable on NetBSD. Perhaps this is the reason why they did not implement support for it in clock_getres().

To be sure, please run also the following script:

import time
names = ['time', 'monotonic', 'process_time', 'thread_time']
funcs = [getattr(time, name) for name in names]
times = [f() for f in funcs]
time.sleep(10)
for name, f, t in zip(names, funcs, times):
    print(name, f() - t)

Copy link
Contributor Author

@furkanonder furkanonder Sep 14, 2024

Choose a reason for hiding this comment

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

clocks is not defined :)

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, it should be names. I fixed the code, please try again.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

-bash-5.2$ ./python script.py
time 10.000223636627197
monotonic 10.000407570973039
process_time 0.00038799999999999946
thread_time 10.0
-bash-5.2$ ./python script.py
time 10.006309986114502
monotonic 10.007163722009864
process_time 0.0009599999999999956
thread_time 9.99
-bash-5.2$ ./python script.py
time 10.008317232131958
monotonic 10.008433873008471
process_time 0.0003119999999999998
thread_time 9.97
-bash-5.2$ ./python script.py
3time 10.004075527191162
monotonic 10.006077813042793
process_time 0.0028509999999999994
thread_time 9.97
-bash-5.2$ ./python script.py
time 10.002416610717773
monotonic 10.002602662018035
process_time 0.00043999999999999595
thread_time 10.01
-bash-5.2$

Copy link
Member

Choose a reason for hiding this comment

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

Thank you, @furkanonder. It seems that thread_time does not work on NetBSD at all.

@vstinner
Copy link
Member

This PR is not correct. I close it.

@vstinner vstinner closed this Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review needs backport to 3.12 bug and security fixes needs backport to 3.13 bugs and security fixes skip news tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants