Closed
Description
Bug report
Bug description:
The test case test_sys
failed when I ran rt.bat test_sys
. The unittest report is as follow
FAIL: test_remote_exec_raises_audit_event (test.test_sys.TestRemoteExec.test_remote_exec_raises_audit_event)
Test remote exec raises an audit event
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\project\cpython\Lib\test\test_sys.py", line 2106, in test_remote_exec_raises_audit_event
self.assertIn(b"Remote script executed successfully!", stdout)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: b'Remote script executed successfully!' not found in b'Target process running...\r\n'
----------------------------------------------------------------------
Ran 90 tests in 1.495s
FAILED (failures=1, skipped=7)
test test_sys failed
== Tests result: FAILURE ==
It seems that the problem is caused by an unfinished subprocess since it runs synchronizely. However, when I commented the first two assertion statements.
# self.assertIn(b"Remote script executed successfully!", stdout)
# self.assertIn(b"Audit event: remote_debugger_script, arg: ", stdout)
self.assertEqual(stderr, b"")
The stderr
is printed out as follow
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\project\cpython\Lib\test\test_sys.py", line 2108, in test_remote_exec_raises_audit_event
self.assertEqual(stderr, b"")
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
AssertionError: b'Exception ignored in audit hook:\r\nTrace[295 chars]\r\n' != b''
OS: Windows 10 22H2
CPython versions tested on:
CPython main branch
Operating systems tested on:
Windows