diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test_sink_pipe_size.rb | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/test/test_sink_pipe_size.rb b/test/test_sink_pipe_size.rb index 1b6db72..bbe2884 100644 --- a/test/test_sink_pipe_size.rb +++ b/test/test_sink_pipe_size.rb @@ -1,20 +1,17 @@ # Copyright (C) 2013-2019 all contributors <dtas-all@nongnu.org> # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt> # frozen_string_literal: true -begin - require 'sleepy_penguin' - require './test/player_integration' - class TestSinkPipeSizeIntegration < Testcase - include PlayerIntegration +require './test/player_integration' +class TestSinkPipeSizeIntegration < Testcase + include PlayerIntegration - def test_sink_pipe_size_integration - s = client_socket - default_sink_pid(s) - s.req_ok("sink ed default pipe_size=0x1000") - s.req_ok("sink ed default pipe_size=0x10000") - s.req_ok("sink ed default pipe_size=") - s.req_ok("sink ed default pipe_size=4096") - end if SleepyPenguin.const_defined?(:F_SETPIPE_SZ) + def test_sink_pipe_size_integration + s = client_socket + default_sink_pid(s) + s.req_ok("sink ed default pipe_size=0x1000") + s.req_ok("sink ed default pipe_size=0x10000") + s.req_ok("sink ed default pipe_size=") + s.req_ok("sink ed default pipe_size=4096") end -rescue LoadError -end +end if RUBY_PLATFORM =~ /linux/i && + File.readable?('/proc/sys/fs/pipe-max-size') |