#3352 closed bug (fixed)
getcwd fails python's POSIX test
Reported by: | scottmc | Owned by: | axeld |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | System/POSIX | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
This may or may not be the same as ticket #2708
~/develop/python/Lib/test> python test_posix.py testNoArgFunctions (__main__.PosixTester) ... ok test_access (__main__.PosixTester) ... ok test_chdir (__main__.PosixTester) ... ok test_chflags (__main__.PosixTester) ... ok test_chown (__main__.PosixTester) ... ok test_confstr (__main__.PosixTester) ... ok test_dup (__main__.PosixTester) ... ok test_dup2 (__main__.PosixTester) ... ok test_fdopen (__main__.PosixTester) ... ok test_fstat (__main__.PosixTester) ... ok test_fstatvfs (__main__.PosixTester) ... ok test_ftruncate (__main__.PosixTester) ... ok test_getcwd_long_pathnames (__main__.PosixTester) ... ERROR test_lchflags (__main__.PosixTester) ... ok test_lsdir (__main__.PosixTester) ... ok test_osexlock (__main__.PosixTester) ... FAIL test_osshlock (__main__.PosixTester) ... FAIL test_pipe (__main__.PosixTester) ... ok test_stat (__main__.PosixTester) ... ok test_statvfs (__main__.PosixTester) ... ok test_strerror (__main__.PosixTester) ... ok test_tempnam (__main__.PosixTester) ... ok test_tmpfile (__main__.PosixTester) ... ok test_umask (__main__.PosixTester) ... ok test_utime (__main__.PosixTester) ... ok ====================================================================== ERROR: test_getcwd_long_pathnames (__main__.PosixTester) ---------------------------------------------------------------------- Traceback (most recent call last): File "test_posix.py", line 267, in test_getcwd_long_pathnames _create_and_do_getcwd(dirname) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 260, in _create_and_do_getcwd os.getcwd() OSError: [Errno -2147454941] No buffer space available ====================================================================== FAIL: test_osexlock (__main__.PosixTester) ---------------------------------------------------------------------- Traceback (most recent call last): File "test_posix.py", line 108, in test_osexlock os.O_WRONLY|os.O_EXLOCK|os.O_NONBLOCK) AssertionError: OSError not raised ====================================================================== FAIL: test_osshlock (__main__.PosixTester) ---------------------------------------------------------------------- Traceback (most recent call last): File "test_posix.py", line 131, in test_osshlock os.O_RDONLY|os.O_EXLOCK|os.O_NONBLOCK) AssertionError: OSError not raised ---------------------------------------------------------------------- Ran 25 tests in 0.699s FAILED (failures=2, errors=1) Traceback (most recent call last): File "test_posix.py", line 278, in <module> test_main() File "test_posix.py", line 275, in test_main test_support.run_unittest(PosixTester) File "/boot/common/lib/python2.7/test/test_support.py", line 710, in run_unittest _run_suite(suite) File "/boot/common/lib/python2.7/test/test_support.py", line 693, in _run_suite raise TestFailed(err) test.test_support.TestFailed: errors occurred; run in verbose mode for details ~/develop/python/Lib/test>
Change History (9)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
Component: | - General → System/POSIX |
---|
comment:3 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Version: | R1/pre-alpha1 → R1/Development |
Fixed in hrev34276.
comment:4 by , 15 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:5 by , 15 years ago
Here's the error output:
Welcome to the Haiku shell. ~> ls Desktop config mail ~> cd .. /boot> cd common /boot/common> cd lib /boot/common/lib> cd python2.6 /boot/common/lib/python2.6> cd test /boot/common/lib/python2.6/test> python test_posix.py testNoArgFunctions (__main__.PosixTester) ... ok test_access (__main__.PosixTester) ... ok test_chdir (__main__.PosixTester) ... ok test_chflags (__main__.PosixTester) ... ok test_chown (__main__.PosixTester) ... ok test_confstr (__main__.PosixTester) ... ok test_dup (__main__.PosixTester) ... ok test_dup2 (__main__.PosixTester) ... ok test_fdopen (__main__.PosixTester) ... ok test_fstat (__main__.PosixTester) ... ok test_fstatvfs (__main__.PosixTester) ... ok test_ftruncate (__main__.PosixTester) ... ok test_getcwd_long_pathnames (__main__.PosixTester) ... ERROR test_lchflags (__main__.PosixTester) ... ok test_lsdir (__main__.PosixTester) ... ok test_osexlock (__main__.PosixTester) ... FAIL test_osshlock (__main__.PosixTester) ... FAIL test_pipe (__main__.PosixTester) ... ok test_stat (__main__.PosixTester) ... ok test_statvfs (__main__.PosixTester) ... ok test_strerror (__main__.PosixTester) ... ok test_tempnam (__main__.PosixTester) ... ok test_tmpfile (__main__.PosixTester) ... ok test_umask (__main__.PosixTester) ... ok test_utime (__main__.PosixTester) ... ok ====================================================================== ERROR: test_getcwd_long_pathnames (__main__.PosixTester) ---------------------------------------------------------------------- Traceback (most recent call last): File "test_posix.py", line 267, in test_getcwd_long_pathnames _create_and_do_getcwd(dirname) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 262, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "test_posix.py", line 260, in _create_and_do_getcwd os.getcwd() OSError: [Errno -2147454941] No buffer space available ====================================================================== FAIL: test_osexlock (__main__.PosixTester) ---------------------------------------------------------------------- Traceback (most recent call last): File "test_posix.py", line 108, in test_osexlock os.O_WRONLY|os.O_EXLOCK|os.O_NONBLOCK) AssertionError: OSError not raised ====================================================================== FAIL: test_osshlock (__main__.PosixTester) ---------------------------------------------------------------------- Traceback (most recent call last): File "test_posix.py", line 131, in test_osshlock os.O_RDONLY|os.O_EXLOCK|os.O_NONBLOCK) AssertionError: OSError not raised ---------------------------------------------------------------------- Ran 25 tests in 0.520s FAILED (failures=2, errors=1) Traceback (most recent call last): File "test_posix.py", line 278, in <module> test_main() File "test_posix.py", line 275, in test_main test_support.run_unittest(PosixTester) File "/boot/common/lib/python2.6/test/test_support.py", line 724, in run_unittest _run_suite(suite) File "/boot/common/lib/python2.6/test/test_support.py", line 707, in _run_suite raise TestFailed(err) test.test_support.TestFailed: errors occurred; run in verbose mode for details /boot/common/lib/python2.6/test>
comment:6 by , 15 years ago
You cannot have tested with hrev34277, as the kernel will never return "No buffer space available" anymore. Please confirm.
comment:7 by , 15 years ago
BTW I did run the python test before closing this ticket, and it does not fail anymore here.
comment:8 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Oh. I had tested with the new python build but that was "just" before I had applied the hrev34277 commit. So that explains why the results were different. Here's the new test results to show that yes the getcwd is fixed:
/boot/common/lib/python2.6/test> python test_posix.py testNoArgFunctions (__main__.PosixTester) ... ok test_access (__main__.PosixTester) ... ok test_chdir (__main__.PosixTester) ... ok test_chflags (__main__.PosixTester) ... ok test_chown (__main__.PosixTester) ... ok test_confstr (__main__.PosixTester) ... ok test_dup (__main__.PosixTester) ... ok test_dup2 (__main__.PosixTester) ... ok test_fdopen (__main__.PosixTester) ... ok test_fstat (__main__.PosixTester) ... ok test_fstatvfs (__main__.PosixTester) ... ok test_ftruncate (__main__.PosixTester) ... ok test_getcwd_long_pathnames (__main__.PosixTester) ... ok test_lchflags (__main__.PosixTester) ... ok test_lsdir (__main__.PosixTester) ... ok test_osexlock (__main__.PosixTester) ... FAIL test_osshlock (__main__.PosixTester) ... FAIL test_pipe (__main__.PosixTester) ... ok test_stat (__main__.PosixTester) ... ok test_statvfs (__main__.PosixTester) ... ok test_strerror (__main__.PosixTester) ... ok test_tempnam (__main__.PosixTester) ... ok test_tmpfile (__main__.PosixTester) ... ok test_umask (__main__.PosixTester) ... ok test_utime (__main__.PosixTester) ... ok ====================================================================== FAIL: test_osexlock (__main__.PosixTester) ---------------------------------------------------------------------- Traceback (most recent call last): File "test_posix.py", line 108, in test_osexlock os.O_WRONLY|os.O_EXLOCK|os.O_NONBLOCK) AssertionError: OSError not raised ====================================================================== FAIL: test_osshlock (__main__.PosixTester) ---------------------------------------------------------------------- Traceback (most recent call last): File "test_posix.py", line 131, in test_osshlock os.O_RDONLY|os.O_EXLOCK|os.O_NONBLOCK) AssertionError: OSError not raised ---------------------------------------------------------------------- Ran 25 tests in 0.422s FAILED (failures=2) Traceback (most recent call last): File "test_posix.py", line 278, in <module> test_main() File "test_posix.py", line 275, in test_main test_support.run_unittest(PosixTester) File "/boot/common/lib/python2.6/test/test_support.py", line 724, in run_unittest _run_suite(suite) File "/boot/common/lib/python2.6/test/test_support.py", line 707, in _run_suite raise TestFailed(err) test.test_support.TestFailed: errors occurred; run in verbose mode for details /boot/common/lib/python2.6/test>
Sorry for the noise. I'll rerun the test in verbose mode to update the status on the two remaining failures in the pytohn posix test, but this ticket is indeed fixed.
comment:9 by , 15 years ago
No problem. I recently removed O_EXLOCK, and O_SHLOCK, since we probably won't ever support them anyway, so that might need another Python update, too.
This is how to run the test (by scottmc on the dev list):
If you build Haiku with python added as an optional package you can run this test: cd /boot/common/lib/python2.6/test its called test_posix.py, so just run "python test_posix.py"