summaryrefslogtreecommitdiff
path: root/test/ruby/test_file_exhaustive.rb
AgeCommit message (Collapse)Author
2019-12-07test/ruby/test_file_exhaustive.rb: shorten the name of temporary dirYusuke Endoh
``` 1) Error: TestFileExhaustive#test_socket_p: ArgumentError: too long unix socket path (109bytes given but 108bytes max) /export/home/users/chkbuild/cb-sunc/tmp/build/20191207T024036Z/ruby/test/ruby/test_file_exhaustive.rb:155:in `initialize' ```
2019-11-18Deprecate taint/trust and related methods, and make the methods no-opsJeremy Evans
This removes the related tests, and puts the related specs behind version guards. This affects all code in lib, including some libraries that may want to support older versions of Ruby. Notes: Merged: https://github.com/ruby/ruby/pull/2476
2019-10-17Fixed File.extname at a name ending with a dotNobuyoshi Nakada
File.extname now returns a dot string at a name ending with a dot. [Bug #15267] Notes: Merged: https://github.com/ruby/ruby/pull/2565
2019-10-10test/ruby/test_file_exhaustive.rb: check the owner of the root directoryYusuke Endoh
The root directory may be owned by the current user, for example, in chroot environment.
2019-09-09Make test-all and test-spec runnable on AndroidYusuke Endoh
Calling some syscall functions such as Dir.chroot causes SIGSYS instead of EPERM on Android. This change skips all tests that stops the test-suite run.
2019-07-31test/ruby/test_file_exhaustive.rb: suppress method-redefined warningYusuke Endoh
2019-07-30Do not always taint the result of File#pathJeremy Evans
The result should only be tainted if the path given to the method was tainted. The code to always taint the result was added in a4934a42cbb84b6679912226581c71b435671f55 (svn revision 4892) in 2003 by matz. However, the change wasn't mentioned in the commit message, and it may have been committed by accident. Skip part of a readline test that uses Reline. Reline in general would pass the test, but Reline's test mode doesn't raise a SecurityError if passing a tainted prompt and $SAFE >= 1. This was hidden earlier because File#path was always returning a tainted string. Fixes [Bug #14485]
2019-07-29Revert "Do not always taint the result of File#path"Jeremy Evans
This reverts commit 1a759bfe5d554c22571d2e6e4e5998cf06a7b98f. This fails on some operating systems.
2019-07-29Do not always taint the result of File#pathJeremy Evans
The result should only be tainted if the path given to the method was tainted. The code to always taint the result was added in a4934a42cbb84b6679912226581c71b435671f55 (svn revision 4892) in 2003 by matz. However, the change wasn't mentioned in the commit message, and it may have been committed by accident. Skip part of a readline test that uses Reline. Reline in general would pass the test, but Reline's test mode doesn't raise a SecurityError if passing a tainted prompt and $SAFE >= 1. This was hidden earlier because File#path was always returning a tainted string. Fixes [Bug #14485]
2019-07-02The behavior of statx(2) depends on the filesystemNobuyoshi Nakada
birthtime may not be supported on some filesystems, and NotImplementedError can be raised. [Bug #15972]
2019-06-30Removed unused variablesNobuyoshi Nakada
2019-02-22Skip EPERM, when statx(2) is wholely blockednobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-22Skip EPERM, like as r67102nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-22STATX_BTIME depends on filesystemsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-22Support File#birthtime on Linuxnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-17Already nlink is properly set on Windowsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-17Split test_expand_path, test_basename, test_dirnamenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-20Document File.{setuid?,setgid?,sticky?} support for IO objects [Bug #13972]aycabta
* file.c (rb_file_setuid_p): rdoc for IO object support (rb_file_sgid_p): ditto (rb_file_sticky_p): ditto * NEWS: inform users of new feature * test/file/test_file_exhaustive.rb (io_open): wrapper for bare IO object (test_suid): test for bare IO support (test_sgid): ditto (test_sticky): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-28win32/file.c: relative path with drive letternobu
* win32/file.c (IS_ABSOLUTE_PATH_P): home directory should not be a relative path regardless a drive letter. PathIsRelativeW returns FALSE on such path. [ruby-core:86356] [Bug #14638] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-08test_file_exhaustive.rb: get rid of failuresnobu
* test/ruby/test_file_exhaustive.rb (test_utime_symlinkfile): under some condition, symlink file is also affected by utimes() on Linux. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-08test_file_exhaustive.rb: test_utime_symlinkfilenobu
* test_file_exhaustive.rb (test_utime_symlinkfile): investigate failures on some platforms. wait a second to tell if symlink atime is changed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-08test_file_exhaustive.rb: fix arguments ordernobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-29file.c: File.lutimenobu
* file.c (utime_internal): add File.lutime. [Feature #4052] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14added workaround for APFS file format.hsbt
* TestFileExhaustive#test_atime: It fails with nano-sec precise. I changed to use unixtime for this assertion for APFS. * TestFileExhaustive#test_expand_path: skip assertion when given invalid charactor on APFS. [Bug #13816][ruby-core:82383] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-22test_file_exhaustive.rb: check case-sensitive fsnobu
* test/ruby/test_file_exhaustive.rb (test_expand_path): dump expanded file name, not only appended char, for case-sensitive filesystem. [ruby-dev:50093] [Bug #13489] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-13file.c: join with /nobu
* file.c (rb_file_join): join using "/" always, not a constant. and fix the document. [ruby-core:79579] [Bug #13223] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-07file.c: cygwin behaviornobu
* file.c: recent cygwin hides NTFS specific features. [ruby-core:78497] [Bug #13008] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-06EPERM by symlinknobu
* test/ruby/test_file_exhaustive.rb (symlinkfile): EPERM can raise on cygwin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-26file.c: home directory from systemnobu
* file.c (rb_default_home_dir): resolve home directory from the system database when HOME is not set. [Feature #12695] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-19Normalization test iff UTF-8 file systemnobu
* test/ruby/test_file_exhaustive.rb (test_expand_path_compose): normalization is meaningless unless file system encoding is UTF. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-12File.expand_path compose test only on OS Xnobu
* test/ruby/test_file_exhaustive.rb (test_expand_path_compose): valid only on OS X. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-12file.c: normalize cwdnobu
* file.c (append_fspath): normalize directory name to be appended on OS X. [ruby-core:75957] [Ruby trunk Bug#12483] https://github.com/rails/rails/issues/25303#issuecomment-224834804 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-30test_file_exhaustive.rb: writable opennobu
* test/ruby/test_file_exhaustive.rb (test_flock_shared): open in writable mode for exclusive lock. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-28test_file_exhaustive.rb: blocking flocknobu
* test/ruby/test_file_exhaustive.rb (test_flock): add assertions for the blocking cases. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-02* remove trailing spaces.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-02* test/ruby/test_file_exhaustive.rb: test UTF-8 filename. see [Bug #12340]usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01Fix a test message.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-13file.c: File.empty?nobu
* file.c (Init_File): add alias File.empty? to File.zero?. [Feature #9969] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-18test_file_exhaustive.rb: strict check test_dirnamenobu
* test/ruby/test_file_exhaustive.rb (test_dirname): assert same as the parent directory, not ascendant directories. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-19test/ruby: suppress runtime warningsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-31r53688 testnobu
* test/ruby/test_file_exhaustive.rb (test_realpath_mount_point): test for r53688. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-31test for File#lstat.nobu
* test/ruby/test_file_exhaustive.rb (test_lstat): Add lacking test for File#lstat. [Fix GH-1231] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-29r53689 testnobu
* test/ruby/test_file_exhaustive.rb (test_readlink_junction): test for r53689. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16Add frozen_string_literal: false for all filesnaruse
When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-28test: File.symlink needs administrator privilegenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-13* test/lib/envutil.rb (File.mkfifo): Defined using mkfifo command.akr
* test/ruby/test_io.rb: Ditto. * test/ruby/test_file_exhaustive.rb: Use File.mkfifo. * test/ruby/test_process.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12test_file_exhaustive.rb: assert_predicatenobu
* test/ruby/test_file_exhaustive.rb: use assert_predicate and assert_not_predicate for better failure messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12Consider more block devices.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12test_file_exhaustive.rb: NTFSnobu
* test/ruby/test_file_exhaustive.rb (NTFS): flag for test of NTFS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12test_file_exhaustive.rb: POSIX-like testsnobu
* test/ruby/test_file_exhaustive.rb: define POSIX-like filesystem depenedent tests only on POSIX-like systems. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e