diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-25 08:43:45 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-25 08:43:45 +0000 |
commit | 560c2da384574e3ccbeb9f4b15747a2e22eeb621 (patch) | |
tree | f6a8efa789c57869b3328dcaac80e51aca8eef64 | |
parent | d76f465290769089b3c524acd4c37afe1307088b (diff) |
merge revision(s) 54010: [Backport #12154]
* test/ruby/test_process.rb (test_execopts_gid): Skip a test
that is known to fail on AIX. AIX allows setgid to
a supplementary group, but Ruby does not allow the "-e"
option when setgid'ed, so the test does not work as intended.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@54269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | test/ruby/test_process.rb | 10 | ||||
-rw-r--r-- | version.h | 2 |
3 files changed, 17 insertions, 2 deletions
@@ -1,3 +1,10 @@ +Fri Mar 25 17:42:34 2016 Rei Odaira <Rei.Odaira@gmail.com> + + * test/ruby/test_process.rb (test_execopts_gid): Skip a test + that is known to fail on AIX. AIX allows setgid to + a supplementary group, but Ruby does not allow the "-e" + option when setgid'ed, so the test does not work as intended. + Fri Mar 25 17:36:24 2016 Rei Odaira <Rei.Odaira@gmail.com> * test/rinda/test_rinda.rb (test_make_socket_ipv4_multicast): diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index ec59c8eb30..bb34e22454 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -1644,7 +1644,15 @@ class TestProcess < Test::Unit::TestCase assert_nothing_raised(feature6975) do begin g = IO.popen([RUBY, "-e", "print Process.gid", gid: group], &:read) - assert_equal(gid, g, feature6975) + # AIX allows a non-root process to setgid to its supplementary group, + # while other UNIXes do not. (This might be AIX's violation of the POSIX standard.) + # However, Ruby does not allow a setgid'ed Ruby process to use the -e option. + # As a result, the Ruby process invoked by "IO.popen([RUBY, "-e", ..." above fails + # with a message like "no -e allowed while running setgid (SecurityError)" to stderr, + # the exis status is set to 1, and the variable "g" is set to an empty string. + # To conclude, on AIX, if the "gid" variable is a supplementary group, + # the assert_equal next can fail, so skip it. + assert_equal(gid, g, feature6975) unless $?.exitstatus == 1 && /aix/ =~ RUBY_PLATFORM && gid != Process.gid rescue Errno::EPERM, NotImplementedError end end @@ -1,6 +1,6 @@ #define RUBY_VERSION "2.1.9" #define RUBY_RELEASE_DATE "2016-03-25" -#define RUBY_PATCHLEVEL 466 +#define RUBY_PATCHLEVEL 467 #define RUBY_RELEASE_YEAR 2016 #define RUBY_RELEASE_MONTH 3 |