Skip to content

test_os windows failed test handling - #4764

Merged
youknowone merged 80 commits into
RustPython:mainfrom
derlih:indep_test_os
Apr 20, 2023
Merged

youknowone merged 80 commits into
RustPython:mainfrom
derlih:indep_test_os

Conversation

@derlih

@derlih derlih commented Mar 25, 2023

Copy link
Copy Markdown
Contributor

#3960 for test_os

In addition removed test_iter from platform dependant tests.

Comment thread Lib/test/test_os.py Resolved

@youknowone youknowone left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Other parts looks perfect. Thank you so much!

Comment thread .github/workflows/ci.yaml Resolved
youknowone
youknowone previously approved these changes Mar 26, 2023

@youknowone youknowone left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

@youknowone
youknowone dismissed their stale review March 27, 2023 06:08

test_os fails on windows

@youknowone

Copy link
Copy Markdown
Member

ah, removing test_os from platform independent tests allowed windows to run test_os, and it started failing

@derlih

derlih commented Mar 27, 2023

Copy link
Copy Markdown
Contributor Author

ah, removing test_os from platform independent tests allowed windows to run test_os, and it started failing

But it shouldn't fail on windows, should it?

@youknowone

Copy link
Copy Markdown
Member

Yes. In that case, skipping test is better than failing CI.
You were going to fix test_os run without error on windows, right?

@derlih

derlih commented Mar 27, 2023

Copy link
Copy Markdown
Contributor Author

I see the test failed, but it was run without -v flag, so it's hard to understand what failed.
Locally they pass :-)

@fanninpm

Copy link
Copy Markdown
Contributor

Locally they pass :-)

Did you run cargo run --release --features ssl,jit -- -m test -j 1 -u all --slowest --fail-env-changed -v test_os locally?

@youknowone

youknowone commented Mar 28, 2023 •

Copy link
Copy Markdown
Member

here is copy of the failing messages. They look like all coming from the same reason.
can this be related to ci environment?


======================================================================
ERROR: test_values (test.test_os.EnvironTests.test_values)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\a\RustPython\RustPython\pylib\Lib\test\mapping_tests.py", line 151, in test_values
    d = self._empty_mapping()
  File "D:\a\RustPython\RustPython\pylib\Lib\test\test_os.py", line 1007, in _empty_mapping
    os.environ.clear()
  File "D:\a\RustPython\RustPython\pylib/Lib\_collections_abc.py", line 981, in clear
    pass
  File "D:\a\RustPython\RustPython\pylib/Lib\_collections_abc.py", line 979, in clear
    self.popitem()
  File "D:\a\RustPython\RustPython\pylib/Lib\_collections_abc.py", line 972, in popitem
    del self[key]
  File "D:\a\RustPython\RustPython\pylib/Lib\os.py", line 690, in __delitem__
    unsetenv(encodedkey)
ValueError: illegal environment variable name

======================================================================
ERROR: test_values (test.test_os.EnvironTests.test_values)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\a\RustPython\RustPython\pylib\Lib\test\test_os.py", line 997, in tearDown
    os.environ.clear()
  File "D:\a\RustPython\RustPython\pylib/Lib\_collections_abc.py", line 981, in clear
    pass
  File "D:\a\RustPython\RustPython\pylib/Lib\_collections_abc.py", line 979, in clear
    self.popitem()
  File "D:\a\RustPython\RustPython\pylib/Lib\_collections_abc.py", line 972, in popitem
    del self[key]
  File "D:\a\RustPython\RustPython\pylib/Lib\os.py", line 690, in __delitem__
    unsetenv(encodedkey)
ValueError: illegal environment variable name

======================================================================
ERROR: test_write (test.test_os.EnvironTests.test_write)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\a\RustPython\RustPython\pylib\Lib\test\mapping_tests.py", line 93, in test_write
    p = self._empty_mapping()
  File "D:\a\RustPython\RustPython\pylib\Lib\test\test_os.py", line 1007, in _empty_mapping
    os.environ.clear()
  File "D:\a\RustPython\RustPython\pylib/Lib\_collections_abc.py", line 981, in clear
    pass
  File "D:\a\RustPython\RustPython\pylib/Lib\_collections_abc.py", line 979, in clear
    self.popitem()
  File "D:\a\RustPython\RustPython\pylib/Lib\_collections_abc.py", line 972, in popitem
    del self[key]
  File "D:\a\RustPython\RustPython\pylib/Lib\os.py", line 690, in __delitem__
    unsetenv(encodedkey)
ValueError: illegal environment variable name

======================================================================
ERROR: test_write (test.test_os.EnvironTests.test_write)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\a\RustPython\RustPython\pylib\Lib\test\test_os.py", line 997, in tearDown
    os.environ.clear()
  File "D:\a\RustPython\RustPython\pylib/Lib\_collections_abc.py", line 981, in clear
    pass
  File "D:\a\RustPython\RustPython\pylib/Lib\_collections_abc.py", line 979, in clear
    self.popitem()
  File "D:\a\RustPython\RustPython\pylib/Lib\_collections_abc.py", line 972, in popitem
    del self[key]
  File "D:\a\RustPython\RustPython\pylib/Lib\os.py", line 690, in __delitem__
    unsetenv(encodedkey)
ValueError: illegal environment variable name

@fanninpm

Copy link
Copy Markdown
Contributor

They look like all coming from the same reason.
can this be related to ci environment?

This is related to the --fail-env-changed flag.

@youknowone

Copy link
Copy Markdown
Member

@fanninpm do you have advices?

@fanninpm

Copy link
Copy Markdown
Contributor

Taking a look at what I did in #3807, you'd probably need to add @unittest.skipIf(sys.platform == "win32", "TODO: RUSTPYTHON, ValueError: illegal environment variable name") to each of those tests.

(After, of course, running cargo run --release --features ssl,jit -- -m test -j 1 -u all --slowest --fail-env-changed -v test_os locally. ;-) @derlih)

@derlih

derlih commented Mar 28, 2023 •

Copy link
Copy Markdown
Contributor Author

Just ran this command without any code changes

Ran 316 tests in 7.075s

OK (skipped=138, expected failures=52)

@fanninpm

Copy link
Copy Markdown
Contributor

this command

Which command? It would be helpful to type it out in full.

@derlih

derlih commented Mar 28, 2023

Copy link
Copy Markdown
Contributor Author

Command:
cargo run --release --features ssl,jit -- -m test -j 1 -u all --slowest --fail-env-changed -v test_os
Output:

WARNING: The filename '@test_36592_tmp-Õà▒┼üÔÖí═ú´┐¢' CAN be encoded by the filesystem encoding (utf-8). Unicode filename tests may not be effective
== RustPython 3.11.0alpha (heads/indep_test_os-dirty:a3baa13cb, Mar 25 2023, 19:19:10) [rustc 1.68.1]
== Windows-10-10.0.22621 little-endian
== cwd: C:\Users\derli\AppData\Local\Temp\test_python_36592
== CPU count: 16
== encodings: locale=utf-8, FS=utf-8
Run tests in parallel using 1 child processes
0:00:07 [1/1] test_os passed
WARNING: The filename '@test_40940_tmp-Õà▒┼üÔÖí═ú´┐¢' CAN be encoded by the filesystem encoding (utf-8). Unicode filename tests may not be effective
test_blocking (test.test_os.BlockingTests.test_blocking) ... skipped 'needs os.get_blocking() and os.set_blocking()'
test_compare_to_walk (test.test_os.BytesFwalkTests.test_compare_to_walk) ... skipped 'Test needs os.fwalk()'
test_dir_fd (test.test_os.BytesFwalkTests.test_dir_fd) ... skipped 'Test needs os.fwalk()'
test_fd_leak (test.test_os.BytesFwalkTests.test_fd_leak) ... skipped 'Test needs os.fwalk()'
test_file_like_path (test.test_os.BytesFwalkTests.test_file_like_path) ... skipped 'Test needs os.fwalk()'
test_walk_bad_dir (test.test_os.BytesFwalkTests.test_walk_bad_dir) ... skipped 'Test needs os.fwalk()'
test_walk_bottom_up (test.test_os.BytesFwalkTests.test_walk_bottom_up) ... skipped 'Test needs os.fwalk()'
test_walk_prune (test.test_os.BytesFwalkTests.test_walk_prune) ... skipped 'Test needs os.fwalk()'
test_walk_symlink (test.test_os.BytesFwalkTests.test_walk_symlink) ... skipped 'Test needs os.fwalk()'
test_walk_topdown (test.test_os.BytesFwalkTests.test_walk_topdown) ... skipped 'Test needs os.fwalk()'
test_yields_correct_dir_fd (test.test_os.BytesFwalkTests.test_yields_correct_dir_fd) ... skipped 'Test needs os.fwalk()'
test_file_like_path (test.test_os.BytesWalkTests.test_file_like_path) ... ok
test_walk_bad_dir (test.test_os.BytesWalkTests.test_walk_bad_dir) ... ok
test_walk_bottom_up (test.test_os.BytesWalkTests.test_walk_bottom_up) ... ok
test_walk_many_open_files (test.test_os.BytesWalkTests.test_walk_many_open_files) ... ok
test_walk_prune (test.test_os.BytesWalkTests.test_walk_prune) ... ok
test_walk_symlink (test.test_os.BytesWalkTests.test_walk_symlink) ... skipped 'need symlink support'
test_walk_topdown (test.test_os.BytesWalkTests.test_walk_topdown) ... ok
test_cpu_count (test.test_os.CPUCountTests.test_cpu_count) ... ok
test_chown_gid (test.test_os.ChownFileTests.test_chown_gid) ... skipped 'Test needs chown'
test_chown_uid_gid_arguments_must_be_index (test.test_os.ChownFileTests.test_chown_uid_gid_arguments_must_be_index) ... skipped 'Test needs chown'
test_chown_with_root (test.test_os.ChownFileTests.test_chown_with_root) ... skipped 'Test needs chown'
test_chown_without_permission (test.test_os.ChownFileTests.test_chown_without_permission) ... skipped 'Test needs chown'
test_devnull (test.test_os.DevNullTests.test_devnull) ... ok
test_bad_fd (test.test_os.DeviceEncodingTests.test_bad_fd) ... ok
test_device_encoding (test.test_os.DeviceEncodingTests.test_device_encoding) ... ok
test___repr__ (test.test_os.EnvironTests.test___repr__)
Check that the repr() of os.environ looks like environ({...}). ... ok
test_bool (test.test_os.EnvironTests.test_bool) ... ok
test_constructor (test.test_os.EnvironTests.test_constructor) ... ok
test_environb (test.test_os.EnvironTests.test_environb) ... skipped 'os.environb required for this test.'
test_get (test.test_os.EnvironTests.test_get) ... ok
test_get_exec_path (test.test_os.EnvironTests.test_get_exec_path) ... ok
test_getitem (test.test_os.EnvironTests.test_getitem) ... ok
test_ior_operator (test.test_os.EnvironTests.test_ior_operator) ... ok
test_ior_operator_invalid_dicts (test.test_os.EnvironTests.test_ior_operator_invalid_dicts) ... ok
test_ior_operator_key_value_iterable (test.test_os.EnvironTests.test_ior_operator_key_value_iterable) ... ok
test_items (test.test_os.EnvironTests.test_items) ... ok
test_iter_error_when_changing_os_environ (test.test_os.EnvironTests.test_iter_error_when_changing_os_environ) ... ok
test_iter_error_when_changing_os_environ_items (test.test_os.EnvironTests.test_iter_error_when_changing_os_environ_items) ... ok
test_iter_error_when_changing_os_environ_values (test.test_os.EnvironTests.test_iter_error_when_changing_os_environ_values) ... ok
test_key_type (test.test_os.EnvironTests.test_key_type) ... ok
test_keys (test.test_os.EnvironTests.test_keys) ... ok
test_keyvalue_types (test.test_os.EnvironTests.test_keyvalue_types) ... ok
test_len (test.test_os.EnvironTests.test_len) ... ok
test_or_operator (test.test_os.EnvironTests.test_or_operator) ... ok
test_os_popen_iter (test.test_os.EnvironTests.test_os_popen_iter) ... skipped 'requires a shell'
test_pop (test.test_os.EnvironTests.test_pop) ... ok
test_popitem (test.test_os.EnvironTests.test_popitem) ... ok
test_putenv_unsetenv (test.test_os.EnvironTests.test_putenv_unsetenv) ... ok
test_putenv_unsetenv_error (test.test_os.EnvironTests.test_putenv_unsetenv_error) ... expected failure
test_read (test.test_os.EnvironTests.test_read) ... ok
test_ror_operator (test.test_os.EnvironTests.test_ror_operator) ... ok
test_setdefault (test.test_os.EnvironTests.test_setdefault) ... ok
test_update (test.test_os.EnvironTests.test_update) ... ok
test_update2 (test.test_os.EnvironTests.test_update2) ... skipped 'requires a shell'
test_values (test.test_os.EnvironTests.test_values) ... ok
test_write (test.test_os.EnvironTests.test_write) ... ok
test_eventfd_initval (test.test_os.EventfdTests.test_eventfd_initval) ... skipped 'requires os.eventfd'
test_eventfd_select (test.test_os.EventfdTests.test_eventfd_select) ... skipped 'requires os.eventfd'
test_eventfd_semaphore (test.test_os.EventfdTests.test_eventfd_semaphore) ... skipped 'requires os.eventfd'
test_execv_with_bad_arglist (test.test_os.ExecTests.test_execv_with_bad_arglist) ... ok
test_execve_invalid_env (test.test_os.ExecTests.test_execve_invalid_env) ... expected failure
test_execve_with_empty_path (test.test_os.ExecTests.test_execve_with_empty_path) ... expected failure
test_execvpe_with_bad_arglist (test.test_os.ExecTests.test_execvpe_with_bad_arglist) ... expected failure
test_execvpe_with_bad_program (test.test_os.ExecTests.test_execvpe_with_bad_program) ... ok
test_internal_execvpe_str (test.test_os.ExecTests.test_internal_execvpe_str) ... ok
test_os_all (test.test_os.ExportsTests.test_os_all) ... ok
test_fds (test.test_os.ExtendedAttributeTests.test_fds) ... skipped 'no non-broken extended attribute support'
test_lpath (test.test_os.ExtendedAttributeTests.test_lpath) ... skipped 'no non-broken extended attribute support'
test_simple (test.test_os.ExtendedAttributeTests.test_simple) ... skipped 'no non-broken extended attribute support'
test_dup (test.test_os.FDInheritanceTests.test_dup) ... skipped 'TODO: RUSTPYTHON; os.dup on windows'
test_dup2 (test.test_os.FDInheritanceTests.test_dup2) ... skipped 'need os.dup2()'
test_dup_nul (test.test_os.FDInheritanceTests.test_dup_nul) ... expected failure
test_dup_standard_stream (test.test_os.FDInheritanceTests.test_dup_standard_stream) ... skipped 'TODO: RUSTPYTHON; os.dup on windows'
test_get_inheritable_cloexec (test.test_os.FDInheritanceTests.test_get_inheritable_cloexec) ... skipped 'need fcntl'
test_get_set_inheritable (test.test_os.FDInheritanceTests.test_get_set_inheritable) ... expected failure
test_get_set_inheritable_badf (test.test_os.FDInheritanceTests.test_get_set_inheritable_badf) ... expected failure
test_get_set_inheritable_o_path (test.test_os.FDInheritanceTests.test_get_set_inheritable_o_path) ... skipped 'need os.O_PATH'
test_open (test.test_os.FDInheritanceTests.test_open) ... expected failure
test_openpty (test.test_os.FDInheritanceTests.test_openpty) ... skipped 'need os.openpty()'
test_pipe (test.test_os.FDInheritanceTests.test_pipe) ... skipped 'need os.pipe()'
test_set_inheritable_cloexec (test.test_os.FDInheritanceTests.test_set_inheritable_cloexec) ... skipped 'need fcntl'
test_identity (test.test_os.FSEncodingTests.test_identity) ... ok
test_nop (test.test_os.FSEncodingTests.test_nop) ... ok
test_access (test.test_os.FileTests.test_access) ... ok
test_closerange (test.test_os.FileTests.test_closerange) ... skipped "TODO: RUSTPYTHON, BrokenPipeError: (32, 'The process cannot access the file because it is being used by another process. (os error 32)')"
test_copy_file_range (test.test_os.FileTests.test_copy_file_range) ... skipped 'test needs os.copy_file_range()'
test_copy_file_range_invalid_values (test.test_os.FileTests.test_copy_file_range_invalid_values) ... skipped 'test needs os.copy_file_range()'
test_copy_file_range_offset (test.test_os.FileTests.test_copy_file_range_offset) ... skipped 'test needs os.copy_file_range()'
test_fdopen (test.test_os.FileTests.test_fdopen) ... ok
test_large_read (test.test_os.FileTests.test_large_read) ... skipped 'implementation detail specific to cpython'
test_open_keywords (test.test_os.FileTests.test_open_keywords) ... ok
test_read (test.test_os.FileTests.test_read) ... ok
test_rename (test.test_os.FileTests.test_rename) ... skipped 'implementation detail specific to cpython'
test_replace (test.test_os.FileTests.test_replace) ... ok
test_splice (test.test_os.FileTests.test_splice) ... skipped 'test needs os.splice()'
test_splice_invalid_values (test.test_os.FileTests.test_splice_invalid_values) ... skipped 'test needs os.splice()'
test_splice_offset_in (test.test_os.FileTests.test_splice_offset_in) ... skipped 'test needs os.splice()'
test_splice_offset_out (test.test_os.FileTests.test_splice_offset_out) ... skipped 'test needs os.splice()'
test_symlink_keywords (test.test_os.FileTests.test_symlink_keywords) ... ok
test_write (test.test_os.FileTests.test_write) ... ok
test_write_windows_console (test.test_os.FileTests.test_write_windows_console) ... ok
test_fork (test.test_os.ForkTests.test_fork) ... skipped 'requires os.fork'
test_compare_to_walk (test.test_os.FwalkTests.test_compare_to_walk) ... skipped 'Test needs os.fwalk()'
test_dir_fd (test.test_os.FwalkTests.test_dir_fd) ... skipped 'Test needs os.fwalk()'
test_fd_leak (test.test_os.FwalkTests.test_fd_leak) ... skipped 'Test needs os.fwalk()'
test_file_like_path (test.test_os.FwalkTests.test_file_like_path) ... skipped 'Test needs os.fwalk()'
test_walk_bad_dir (test.test_os.FwalkTests.test_walk_bad_dir) ... skipped 'Test needs os.fwalk()'
test_walk_bottom_up (test.test_os.FwalkTests.test_walk_bottom_up) ... skipped 'Test needs os.fwalk()'
test_walk_prune (test.test_os.FwalkTests.test_walk_prune) ... skipped 'Test needs os.fwalk()'
test_walk_symlink (test.test_os.FwalkTests.test_walk_symlink) ... skipped 'Test needs os.fwalk()'
test_walk_topdown (test.test_os.FwalkTests.test_walk_topdown) ... skipped 'Test needs os.fwalk()'
test_yields_correct_dir_fd (test.test_os.FwalkTests.test_yields_correct_dir_fd) ... skipped 'Test needs os.fwalk()'
test_getrandom0 (test.test_os.GetRandomTests.test_getrandom0) ... skipped 'need os.getrandom()'
test_getrandom_nonblock (test.test_os.GetRandomTests.test_getrandom_nonblock) ... skipped 'need os.getrandom()'
test_getrandom_random (test.test_os.GetRandomTests.test_getrandom_random) ... skipped 'need os.getrandom()'
test_getrandom_type (test.test_os.GetRandomTests.test_getrandom_type) ... skipped 'need os.getrandom()'
test_getrandom_value (test.test_os.GetRandomTests.test_getrandom_value) ... skipped 'need os.getrandom()'
test_link (test.test_os.LinkTests.test_link) ... ok
test_link_bytes (test.test_os.LinkTests.test_link_bytes) ... ok
test_unicode_name (test.test_os.LinkTests.test_unicode_name) ... ok
test_getlogin (test.test_os.LoginTests.test_getlogin) ... skipped 'Skip due to platform/environment differences on *NIX buildbots'
test_exist_ok_existing_directory (test.test_os.MakedirTests.test_exist_ok_existing_directory) ... expected failure
test_exist_ok_existing_regular_file (test.test_os.MakedirTests.test_exist_ok_existing_regular_file) ... ok
test_exist_ok_s_isgid_directory (test.test_os.MakedirTests.test_exist_ok_s_isgid_directory) ... expected failure
test_makedir (test.test_os.MakedirTests.test_makedir) ... ok
test_mode (test.test_os.MakedirTests.test_mode) ... ok
test_memfd_create (test.test_os.MemfdCreateTests.test_memfd_create) ... skipped 'requires os.memfd_create'
test_getcwd (test.test_os.MiscTests.test_getcwd) ... ok
test_getcwd_long_path (test.test_os.MiscTests.test_getcwd_long_path) ... Tested current directory length: 246
ok
test_getcwdb (test.test_os.MiscTests.test_getcwdb) ... ok
test_directory_link_nonlocal (test.test_os.NonLocalSymlinkTests.test_directory_link_nonlocal)
The symlink target should resolve relative to the link, not relative ... skipped 'Requires functional symlink implementation'
test_oserror_filename (test.test_os.OSErrorTests.test_oserror_filename) ... expected failure
test_path_t_converter (test.test_os.PathTConverterTests.test_path_t_converter) ... expected failure
test_path_t_converter_and_custom_class (test.test_os.PathTConverterTests.test_path_t_converter_and_custom_class) ... ok
test_listdir (test.test_os.Pep383Tests.test_listdir) ... skipped 'Posix specific tests'
test_open (test.test_os.Pep383Tests.test_open) ... skipped 'Posix specific tests'
test_stat (test.test_os.Pep383Tests.test_stat) ... skipped 'Posix specific tests'
test_statvfs (test.test_os.Pep383Tests.test_statvfs) ... skipped 'Posix specific tests'
test_getppid (test.test_os.PidTests.test_getppid) ... skipped 'test needs os.getppid'
test_waitpid (test.test_os.PidTests.test_waitpid) ... expected failure
test_waitpid_windows (test.test_os.PidTests.test_waitpid_windows) ... expected failure
test_waitstatus_to_exitcode (test.test_os.PidTests.test_waitstatus_to_exitcode) ... expected failure
test_waitstatus_to_exitcode_kill (test.test_os.PidTests.test_waitstatus_to_exitcode_kill) ... skipped 'need signal.SIGKILL'
test_waitstatus_to_exitcode_windows (test.test_os.PidTests.test_waitstatus_to_exitcode_windows) ... expected failure
test_setegid (test.test_os.PosixUidGidTests.test_setegid) ... skipped 'Posix specific tests'
test_seteuid (test.test_os.PosixUidGidTests.test_seteuid) ... skipped 'Posix specific tests'
test_setgid (test.test_os.PosixUidGidTests.test_setgid) ... skipped 'Posix specific tests'
test_setregid (test.test_os.PosixUidGidTests.test_setregid) ... skipped 'Posix specific tests'
test_setregid_neg1 (test.test_os.PosixUidGidTests.test_setregid_neg1) ... skipped 'Posix specific tests'
test_setreuid (test.test_os.PosixUidGidTests.test_setreuid) ... skipped 'Posix specific tests'
test_setreuid_neg1 (test.test_os.PosixUidGidTests.test_setreuid_neg1) ... skipped 'Posix specific tests'
test_setuid (test.test_os.PosixUidGidTests.test_setuid) ... skipped 'Posix specific tests'
test_set_get_priority (test.test_os.ProgramPriorityTests.test_set_get_priority) ... skipped 'needs os.getpriority and os.setpriority'
test_bytes (test.test_os.ReadlinkTests.test_bytes) ... skipped 'Requires functional symlink implementation'
test_missing_link (test.test_os.ReadlinkTests.test_missing_link) ... ok
test_not_symlink (test.test_os.ReadlinkTests.test_not_symlink) ... ok
test_pathlike (test.test_os.ReadlinkTests.test_pathlike) ... skipped 'Requires functional symlink implementation'
test_pathlike_bytes (test.test_os.ReadlinkTests.test_pathlike_bytes) ... skipped 'Requires functional symlink implementation'
test_remove_all (test.test_os.RemoveDirsTests.test_remove_all) ... ok
test_remove_nothing (test.test_os.RemoveDirsTests.test_remove_nothing) ... ok
test_remove_partial (test.test_os.RemoveDirsTests.test_remove_partial) ... ok
test_nowait (test.test_os.SpawnTests.test_nowait) ... skipped 'requires os.spawnv'
test_spawnl (test.test_os.SpawnTests.test_spawnl) ... skipped 'requires os.spawnl'
test_spawnl_noargs (test.test_os.SpawnTests.test_spawnl_noargs) ... skipped 'requires os.spawnl'
test_spawnle (test.test_os.SpawnTests.test_spawnle) ... skipped 'requires os.spawnle'
test_spawnle_noargs (test.test_os.SpawnTests.test_spawnle_noargs) ... skipped 'requires os.spawnle'
test_spawnlp (test.test_os.SpawnTests.test_spawnlp) ... skipped 'requires os.spawnlp'
test_spawnlpe (test.test_os.SpawnTests.test_spawnlpe) ... skipped 'requires os.spawnlpe'
test_spawnv (test.test_os.SpawnTests.test_spawnv) ... skipped 'requires os.spawnv'
test_spawnv_noargs (test.test_os.SpawnTests.test_spawnv_noargs) ... skipped 'requires os.spawnv'
test_spawnve (test.test_os.SpawnTests.test_spawnve) ... skipped 'requires os.spawnve'
test_spawnve_bytes (test.test_os.SpawnTests.test_spawnve_bytes) ... skipped 'requires os.spawnve'
test_spawnve_invalid_env (test.test_os.SpawnTests.test_spawnve_invalid_env) ... skipped 'requires os.spawnve'
test_spawnve_noargs (test.test_os.SpawnTests.test_spawnve_noargs) ... skipped 'requires os.spawnve'
test_spawnvp (test.test_os.SpawnTests.test_spawnvp) ... skipped 'requires os.spawnvp'
test_spawnvpe (test.test_os.SpawnTests.test_spawnvpe) ... skipped 'requires os.spawnvpe'
test_spawnvpe_invalid_env (test.test_os.SpawnTests.test_spawnvpe_invalid_env) ... skipped 'requires os.spawnvpe'
test_15261 (test.test_os.StatAttributeTests.test_15261) ... skipped 'requires os.pipe()'
test_1686475 (test.test_os.StatAttributeTests.test_1686475) ... ok
test_access_denied (test.test_os.StatAttributeTests.test_access_denied) ... expected failure
test_file_attributes (test.test_os.StatAttributeTests.test_file_attributes) ... expected failure
test_stat_attributes (test.test_os.StatAttributeTests.test_stat_attributes) ... ok
test_stat_attributes_bytes (test.test_os.StatAttributeTests.test_stat_attributes_bytes) ... ok
test_stat_block_device (test.test_os.StatAttributeTests.test_stat_block_device) ... expected failure
test_stat_result_pickle (test.test_os.StatAttributeTests.test_stat_result_pickle) ... ok
test_statvfs_attributes (test.test_os.StatAttributeTests.test_statvfs_attributes) ... skipped 'test needs os.statvfs()'
test_statvfs_result_pickle (test.test_os.StatAttributeTests.test_statvfs_result_pickle) ... skipped 'need os.statvfs()'
test_does_not_crash (test.test_os.TermsizeTests.test_does_not_crash)
Check if get_terminal_size() returns a meaningful value. ... skipped 'failed to query terminal size'
test_stty_match (test.test_os.TermsizeTests.test_stty_match)
Check if stty returns the same results ... skipped 'stty invocation failed'
test_uninstantiable (test.test_os.TestDirEntry.test_uninstantiable) ... expected failure
test_unpickable (test.test_os.TestDirEntry.test_unpickable) ... expected failure
test_blocking (test.test_os.TestInvalidFD.test_blocking) ... skipped 'needs os.get_blocking() and os.set_blocking()'
test_closerange (test.test_os.TestInvalidFD.test_closerange) ... ok
test_dup (test.test_os.TestInvalidFD.test_dup) ... ok
test_dup2 (test.test_os.TestInvalidFD.test_dup2) ... skipped 'test needs os.dup2()'
test_fchdir (test.test_os.TestInvalidFD.test_fchdir) ... ok
test_fchmod (test.test_os.TestInvalidFD.test_fchmod) ... skipped 'test needs os.fchmod()'
test_fchown (test.test_os.TestInvalidFD.test_fchown) ... skipped 'test needs os.fchown()'
test_fdatasync (test.test_os.TestInvalidFD.test_fdatasync) ... ok
test_fdopen (test.test_os.TestInvalidFD.test_fdopen) ... expected failure
test_fpathconf (test.test_os.TestInvalidFD.test_fpathconf) ... skipped 'test needs os.fpathconf()'
test_fstat (test.test_os.TestInvalidFD.test_fstat) ... expected failure
test_fstatvfs (test.test_os.TestInvalidFD.test_fstatvfs) ... ok
test_fsync (test.test_os.TestInvalidFD.test_fsync) ... expected failure
test_ftruncate (test.test_os.TestInvalidFD.test_ftruncate) ... expected failure
test_inheritable (test.test_os.TestInvalidFD.test_inheritable) ... expected failure
test_isatty (test.test_os.TestInvalidFD.test_isatty) ... ok
test_lseek (test.test_os.TestInvalidFD.test_lseek) ... expected failure
test_read (test.test_os.TestInvalidFD.test_read) ... expected failure
test_readv (test.test_os.TestInvalidFD.test_readv) ... skipped 'test needs os.readv()'
test_tcgetpgrp (test.test_os.TestInvalidFD.test_tcgetpgrp) ... ok
test_tcsetpgrpt (test.test_os.TestInvalidFD.test_tcsetpgrpt) ... skipped 'test needs os.tcsetpgrp()'
test_ttyname (test.test_os.TestInvalidFD.test_ttyname) ... ok
test_write (test.test_os.TestInvalidFD.test_write) ... expected failure
test_writev (test.test_os.TestInvalidFD.test_writev) ... skipped 'test needs os.writev()'
test_argument_required (test.test_os.TestPEP519.test_argument_required) ... ok
test_bad_pathlike (test.test_os.TestPEP519.test_bad_pathlike) ... ok
test_fsencode_fsdecode (test.test_os.TestPEP519.test_fsencode_fsdecode) ... ok
test_garbage_in_exception_out (test.test_os.TestPEP519.test_garbage_in_exception_out) ... ok
test_pathlike (test.test_os.TestPEP519.test_pathlike) ... ok
test_pathlike_class_getitem (test.test_os.TestPEP519.test_pathlike_class_getitem) ... ok
test_pathlike_subclasshook (test.test_os.TestPEP519.test_pathlike_subclasshook) ... ok
test_return_bytes (test.test_os.TestPEP519.test_return_bytes) ... ok
test_return_string (test.test_os.TestPEP519.test_return_string) ... ok
test_argument_required (test.test_os.TestPEP519PurePython.test_argument_required) ... ok
test_bad_pathlike (test.test_os.TestPEP519PurePython.test_bad_pathlike) ... ok
test_fsencode_fsdecode (test.test_os.TestPEP519PurePython.test_fsencode_fsdecode) ... ok
test_garbage_in_exception_out (test.test_os.TestPEP519PurePython.test_garbage_in_exception_out) ... ok
test_pathlike (test.test_os.TestPEP519PurePython.test_pathlike) ... ok
test_pathlike_class_getitem (test.test_os.TestPEP519PurePython.test_pathlike_class_getitem) ... ok
test_pathlike_subclasshook (test.test_os.TestPEP519PurePython.test_pathlike_subclasshook) ... ok
test_return_bytes (test.test_os.TestPEP519PurePython.test_return_bytes) ... ok
test_return_string (test.test_os.TestPEP519PurePython.test_return_string) ... ok
test_attributes (test.test_os.TestScandir.test_attributes) ... ok
test_bad_path_type (test.test_os.TestScandir.test_bad_path_type) ... ok
test_broken_symlink (test.test_os.TestScandir.test_broken_symlink) ... skipped 'cannot create symbolic link'
test_bytes (test.test_os.TestScandir.test_bytes) ... ok
test_bytes_like (test.test_os.TestScandir.test_bytes_like) ... expected failure
test_close (test.test_os.TestScandir.test_close) ... ok
test_consume_iterator_twice (test.test_os.TestScandir.test_consume_iterator_twice) ... ok
test_context_manager (test.test_os.TestScandir.test_context_manager) ... ok
test_context_manager_close (test.test_os.TestScandir.test_context_manager_close) ... ok
test_context_manager_exception (test.test_os.TestScandir.test_context_manager_exception) ... ok
test_current_directory (test.test_os.TestScandir.test_current_directory) ... ok
test_empty_path (test.test_os.TestScandir.test_empty_path) ... expected failure
test_fd (test.test_os.TestScandir.test_fd) ... skipped 'fd support for listdir required for this test.'
test_fspath_protocol (test.test_os.TestScandir.test_fspath_protocol) ... ok
test_fspath_protocol_bytes (test.test_os.TestScandir.test_fspath_protocol_bytes) ... ok
test_removed_dir (test.test_os.TestScandir.test_removed_dir) ... expected failure
test_removed_file (test.test_os.TestScandir.test_removed_file) ... expected failure
test_repr (test.test_os.TestScandir.test_repr) ... ok
test_resource_warning (test.test_os.TestScandir.test_resource_warning) ... expected failure
test_uninstantiable (test.test_os.TestScandir.test_uninstantiable) ... expected failure
test_unpickable (test.test_os.TestScandir.test_unpickable) ... ok
test_flags (test.test_os.TestSendfile.test_flags) ... skipped 'test needs os.sendfile()'
test_headers (test.test_os.TestSendfile.test_headers) ... skipped 'test needs os.sendfile()'
test_headers_overflow_32bits (test.test_os.TestSendfile.test_headers_overflow_32bits) ... skipped 'test needs os.sendfile()'
test_invalid_offset (test.test_os.TestSendfile.test_invalid_offset) ... skipped 'test needs os.sendfile()'
test_keywords (test.test_os.TestSendfile.test_keywords) ... skipped 'test needs os.sendfile()'
test_offset_overflow (test.test_os.TestSendfile.test_offset_overflow) ... skipped 'test needs os.sendfile()'
test_send_at_certain_offset (test.test_os.TestSendfile.test_send_at_certain_offset) ... skipped 'test needs os.sendfile()'
test_send_whole_file (test.test_os.TestSendfile.test_send_whole_file) ... skipped 'test needs os.sendfile()'
test_trailers (test.test_os.TestSendfile.test_trailers) ... skipped 'test needs os.sendfile()'
test_trailers_overflow_32bits (test.test_os.TestSendfile.test_trailers_overflow_32bits) ... skipped 'test needs os.sendfile()'
test_times (test.test_os.TimesTests.test_times) ... ok
test_urandom_failure (test.test_os.URandomFDTests.test_urandom_failure) ... skipped 'test requires the resource module'
test_urandom_fd_closed (test.test_os.URandomFDTests.test_urandom_fd_closed) ... expected failure
test_urandom_fd_reopened (test.test_os.URandomFDTests.test_urandom_fd_reopened) ... expected failure
test_urandom_length (test.test_os.URandomTests.test_urandom_length) ... ok
test_urandom_subprocess (test.test_os.URandomTests.test_urandom_subprocess) ... expected failure
test_urandom_value (test.test_os.URandomTests.test_urandom_value) ... ok
test_issue31577 (test.test_os.UtimeTests.test_issue31577) ... skipped 'implementation detail specific to cpython'
test_large_time (test.test_os.UtimeTests.test_large_time) ... expected failure
test_utime (test.test_os.UtimeTests.test_utime) ... expected failure
test_utime_by_indexed (test.test_os.UtimeTests.test_utime_by_indexed) ... expected failure
test_utime_by_times (test.test_os.UtimeTests.test_utime_by_times) ... expected failure
test_utime_current (test.test_os.UtimeTests.test_utime_current) ... expected failure
test_utime_current_old (test.test_os.UtimeTests.test_utime_current_old) ... expected failure
test_utime_dir_fd (test.test_os.UtimeTests.test_utime_dir_fd) ... skipped 'dir_fd support for utime required for this test.'
test_utime_directory (test.test_os.UtimeTests.test_utime_directory) ... expected failure
test_utime_fd (test.test_os.UtimeTests.test_utime_fd) ... skipped 'fd support for utime required for this test.'
test_utime_invalid_arguments (test.test_os.UtimeTests.test_utime_invalid_arguments) ... expected failure
test_utime_nofollow_symlinks (test.test_os.UtimeTests.test_utime_nofollow_symlinks) ... skipped 'follow_symlinks support for utime required for this test.'
test_file_like_path (test.test_os.WalkTests.test_file_like_path) ... ok
test_walk_bad_dir (test.test_os.WalkTests.test_walk_bad_dir) ... ok
test_walk_bottom_up (test.test_os.WalkTests.test_walk_bottom_up) ... ok
test_walk_many_open_files (test.test_os.WalkTests.test_walk_many_open_files) ... ok
test_walk_prune (test.test_os.WalkTests.test_walk_prune) ... ok
test_walk_symlink (test.test_os.WalkTests.test_walk_symlink) ... skipped 'need symlink support'
test_walk_topdown (test.test_os.WalkTests.test_walk_topdown) ... ok
test_chdir (test.test_os.Win32ErrorTests.test_chdir) ... ok
test_chmod (test.test_os.Win32ErrorTests.test_chmod) ... ok
test_mkdir (test.test_os.Win32ErrorTests.test_mkdir) ... ok
test_remove (test.test_os.Win32ErrorTests.test_remove) ... ok
test_rename (test.test_os.Win32ErrorTests.test_rename) ... ok
test_utime (test.test_os.Win32ErrorTests.test_utime) ... ok
test_create_junction (test.test_os.Win32JunctionTests.test_create_junction) ... expected failure
test_unlink_removes_junction (test.test_os.Win32JunctionTests.test_unlink_removes_junction) ... expected failure
test_CTRL_BREAK_EVENT (test.test_os.Win32KillTests.test_CTRL_BREAK_EVENT) ... expected failure
test_CTRL_C_EVENT (test.test_os.Win32KillTests.test_CTRL_C_EVENT) ... skipped "subprocesses aren't inheriting Ctrl+C property"
test_kill_int (test.test_os.Win32KillTests.test_kill_int) ... expected failure
test_kill_sigterm (test.test_os.Win32KillTests.test_kill_sigterm) ... expected failure
test_listdir_extended_path (test.test_os.Win32ListdirTests.test_listdir_extended_path)
Test when the path starts with '\\?\'. ... ok
test_listdir_no_extended_path (test.test_os.Win32ListdirTests.test_listdir_no_extended_path)
Test when the path is not an "extended" path. ... ok
test_getfinalpathname_handles (test.test_os.Win32NtTests.test_getfinalpathname_handles) ... skipped "No module named '_ctypes'"
test_stat_unlink_race (test.test_os.Win32NtTests.test_stat_unlink_race) ... expected failure
test_12084 (test.test_os.Win32SymlinkTests.test_12084) ... skipped 'Requires functional symlink implementation'
test_29248 (test.test_os.Win32SymlinkTests.test_29248) ... skipped 'Requires functional symlink implementation'
test_appexeclink (test.test_os.Win32SymlinkTests.test_appexeclink) ... skipped 'Requires functional symlink implementation'
test_buffer_overflow (test.test_os.Win32SymlinkTests.test_buffer_overflow) ... skipped 'Requires functional symlink implementation'
test_directory_link (test.test_os.Win32SymlinkTests.test_directory_link) ... skipped 'Requires functional symlink implementation'
test_file_link (test.test_os.Win32SymlinkTests.test_file_link) ... skipped 'Requires functional symlink implementation'
test_isdir_on_directory_link_to_missing_target (test.test_os.Win32SymlinkTests.test_isdir_on_directory_link_to_missing_target) ... skipped 'Requires functional symlink implementation'
test_remove_directory_link_to_missing_target (test.test_os.Win32SymlinkTests.test_remove_directory_link_to_missing_target) ... skipped 'Requires functional symlink implementation'
test_rmdir_on_directory_link_to_missing_target (test.test_os.Win32SymlinkTests.test_rmdir_on_directory_link_to_missing_target) ... skipped 'Requires functional symlink implementation'

----------------------------------------------------------------------
Ran 316 tests in 7.057s

OK (skipped=138, expected failures=52)

== Tests result: SUCCESS ==

1 test OK.

10 slowest tests:
- test_os: 7 sec 141 ms

Total duration: 7 sec 422 ms
Tests result: SUCCESS

@youknowone youknowone added the E-help-wanted Extra attention is needed label Mar 30, 2023
@youknowone

Copy link
Copy Markdown
Member

I marked this PR as help-wanted. I think this PR need help from windows environment

@DimitrisJim

Copy link
Copy Markdown
Member

I've got a Windows partition taking up space on my hard drive, I'll hopefully get time at weekend to test out after a gazillion updates.

@fanninpm

Copy link
Copy Markdown
Contributor

It might be important to consider that GitHub's Windows runners are running Windows Server 2022, not Windows 10 or 11.

@derlih

derlih commented Mar 31, 2023

Copy link
Copy Markdown
Contributor Author

I can try to run it in docker with 2022 image.

@DimitrisJim

Copy link
Copy Markdown
Member

that would be dope @derlih, if it fails we'll be pretty certain its the cause (and I'll also avoid doing updates on Windows yet again!)

Comment thread .github/workflows/ci.yaml
test_importlib
test_io
test_iter
test_os

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a big progress without regression. just failing on CI.
Because it is not easily fixed now, let's revert this like to skip test_os on windows, and merge it first.
And lets think about this fix later.

@youknowone youknowone left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you so much !

@youknowone
youknowone merged commit a354f7b into RustPython:main Apr 20, 2023
@derlih
derlih deleted the indep_test_os branch April 21, 2023 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-stdlib E-help-wanted Extra attention is needed O-windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants