Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:michals
ruby2.7
0008-test-fix-up-wait_for_single_fd-to-accept-R...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0008-test-fix-up-wait_for_single_fd-to-accept-RB_WAITFD_E.patch of Package ruby2.7
From b4a4205e120404353cb2e349c51a1341f5a00598 Mon Sep 17 00:00:00 2001 From: Michal Suchanek <msuchanek@suse.de> Date: Fri, 7 Feb 2020 02:02:07 +0100 Subject: [PATCH 08/12] test: fix up wait_for_single_fd to accept RB_WAITFD_ERR. Signed-off-by: Michal Suchanek <msuchanek@suse.de> --- ext/-test-/wait_for_single_fd/wait_for_single_fd.c | 1 + test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ext/-test-/wait_for_single_fd/wait_for_single_fd.c b/ext/-test-/wait_for_single_fd/wait_for_single_fd.c index b8a33979bc8b..d9df5de145b4 100644 --- a/ext/-test-/wait_for_single_fd/wait_for_single_fd.c +++ b/ext/-test-/wait_for_single_fd/wait_for_single_fd.c @@ -86,6 +86,7 @@ Init_wait_for_single_fd(void) rb_define_const(rb_cObject, "RB_WAITFD_IN", INT2NUM(RB_WAITFD_IN)); rb_define_const(rb_cObject, "RB_WAITFD_OUT", INT2NUM(RB_WAITFD_OUT)); rb_define_const(rb_cObject, "RB_WAITFD_PRI", INT2NUM(RB_WAITFD_PRI)); + rb_define_const(rb_cObject, "RB_WAITFD_ERR", INT2NUM(RB_WAITFD_ERR)); rb_define_singleton_method(rb_cIO, "wait_for_single_fd", wait_for_single_fd, 3); #ifdef HAVE_KQUEUE diff --git a/test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb b/test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb index 777e9d14ddfc..3319399b0117 100644 --- a/test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb +++ b/test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb @@ -38,7 +38,11 @@ def test_wait_for_closed_pipe IO.pipe do |r,w| w.close rc = IO.wait_for_single_fd(r.fileno, RB_WAITFD_IN, nil) - assert_equal RB_WAITFD_IN, rc + if IO.methods.include? :select_with_poll then + assert_equal RB_WAITFD_IN|RB_WAITFD_ERR, rc + else + assert_equal RB_WAITFD_IN, rc + end end end -- 2.26.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor