aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-29 07:11:32 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-29 07:11:32 +0000
commitcdb968ac266025d3853aa04b6cd24c1de44b600c (patch)
tree5ee5e6e94a7934a674e6bdde6b32721a6ffdd44d
parent429668f7f28b444216cc83cd101f9eadce280eca (diff)
downloadruby-cdb968ac266025d3853aa04b6cd24c1de44b600c.tar.gz
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_3@54375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--test/ruby/test_process.rb11
-rw-r--r--version.h2
3 files changed, 18 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 9ea7ad0b01..2739a0f30e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Tue Mar 29 16:02:26 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.
+
Tue Mar 29 15:58:18 2016 Rei Odaira <Rei.Odaira@gmail.com>
* test/socket/test_addrinfo.rb (test_ipv6_address_predicates):
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index 274492674f..8d6274adf3 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -1,3 +1,4 @@
+# coding: utf-8
# frozen_string_literal: false
require 'test/unit'
require 'tempfile'
@@ -1812,7 +1813,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
diff --git a/version.h b/version.h
index 120faf2798..cbd281aee4 100644
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
#define RUBY_VERSION "2.3.0"
#define RUBY_RELEASE_DATE "2016-03-29"
-#define RUBY_PATCHLEVEL 32
+#define RUBY_PATCHLEVEL 33
#define RUBY_RELEASE_YEAR 2016
#define RUBY_RELEASE_MONTH 3