Skip to content

test failed: rspec ./spec/childprocess_spec.rb:115 # ChildProcess allows unicode characters in the environment #146

Description

@henrich

Building ruby-childprocess package on Debian unstable failed with below error.

RUBYLIB=/build/ruby-childprocess-1.0.0/debian/ruby-childprocess/usr/lib/ruby/vendor_ruby:. GEM_PATH=debian/ruby-childprocess/usr/share/rubygems-integration/2.3.0:/var/lib/gems/2.3.0:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.3.0:/usr/share/rubygems-integration/2.3.0:/usr/share/rubygems-integration/all ruby2.3 -S rake -f debian/ruby-tests.rake
/usr/bin/ruby2.3 /usr/bin/rspec --pattern ./spec/\*\*/\*_spec.rb --format documentation
[Coveralls] Set up the SimpleCov formatter.
[Coveralls] Using SimpleCov's default settings.

ChildProcess::AbstractIO
  inherits the parent's IO streams

ChildProcess
  validates cleanly
  returns self when started
  raises ChildProcess::LaunchError if the process can't be started
  raises ArgumentError if given a non-string argument
  knows if the process crashed
  knows if the process didn't crash
  can wait for a process to finish
  ignores #wait if process already finished
  escalates if TERM is ignored
  accepts a timeout argument to #stop
  lets child process inherit the environment of the current process
  can override env vars only for the current process
  allows unicode characters in the environment (FAILED - 1)
  inherits the parent's env vars also when some are overridden
  can unset env vars
  does not see env vars unset in parent
  passes arguments to the child
  lets a detached child live on
  preserves Dir.pwd in the child
  can handle whitespace, special characters and quotes in arguments
  handles whitespace in the executable name
  times out when polling for exit
  can change working directory
  kills the full process tree
  releases the GIL while waiting for the process
  can check if a detached child is alive
  has a logger
  can change its logger
  OS detection
    on a BSD system
      correctly identifies BSD systems
  logger
    with the default logger
      logs at INFO level by default
      logs at DEBUG level by default if $DEBUG is on
      logs to stderr by default
    with a custom logger
      logs to configured logger
  #started?
    when not started
      should equal false
    when started
      should equal true
    when finished
      should equal true

ChildProcess
  can run even when $stdout is a StringIO
  can redirect stdout, stderr
  can redirect stdout only
  pumps all output
  can write to stdin if duplex = true
  can write to stdin interactively if duplex = true
  works with pipes
  can set close-on-exec when IO is inherited
  handles long output
  should not inherit stdout and stderr by default

ChildProcess
  .arch
    when os is *not* 'macosx'
      when host_cpu is 'i386'
        should eq "i386"
      when host_cpu is 'i486'
        should eq "i386"
      when host_cpu is 'i586'
        should eq "i386"
      when host_cpu is 'i686'
        should eq "i386"
      when host_cpu is 'amd64'
        should eq "x86_64"
      when host_cpu is 'x86_64'
        should eq "x86_64"
      when host_cpu is 'ppc'
        should eq "powerpc"
      when host_cpu is 'powerpc'
        should eq "powerpc"
      when host_cpu is 'unknown'
        should eq "unknown"
    when os is 'macosx'
      when host_cpu is 'i686'
        when Ruby is 64-bit
          when host_cpu is 'i686'
            should eq "x86_64"
        when Ruby is 32-bit
          when host_cpu is 'i686'
            should eq "i386"
      when host_cpu is 'amd64'
        should eq "x86_64"
      when host_cpu is 'x86_64'
        should eq "x86_64"
      when host_cpu is 'ppc'
        should eq "powerpc"
      when host_cpu is 'powerpc'
        should eq "powerpc"
      when host_cpu is 'unknown'
        should eq "unknown"

ChildProcess::Unix::Process
  handles ECHILD race condition where process dies between timeout and KILL
  handles ESRCH race condition where process dies between timeout and KILL
  behaves like a platform that provides the child's pid
    knows the child's pid

ChildProcess::Unix::IO
  raises an ArgumentError if given IO does not respond to :to_io
  raises a TypeError if #to_io does not return an IO

Failures:

  1) ChildProcess allows unicode characters in the environment
     Failure/Error: child_env = eval rewind_and_read(file)

     SyntaxError:
       (eval):1: invalid multibyte char (US-ASCII)
       (eval):1: invalid multibyte char (US-ASCII)
       (eval):1: syntax error, unexpected end-of-input, expecting =>
       ...EB_TARGET_ARCH"=>"amd64", "FO??"=>"ba\xC3\xB6r"}
       ...                               ^
     # ./spec/childprocess_spec.rb:124:in `eval'
     # ./spec/childprocess_spec.rb:124:in `block (3 levels) in <top (required)>'
     # ./spec/childprocess_spec.rb:116:in `block (2 levels) in <top (required)>'

Finished in 3.47 seconds (files took 0.43715 seconds to load)
68 examples, 1 failure

Failed examples:

rspec ./spec/childprocess_spec.rb:115 # ChildProcess allows unicode characters in the environment

[Coveralls] Outside the Travis environment, not sending data.
/usr/bin/ruby2.3 /usr/bin/rspec --pattern ./spec/\*\*/\*_spec.rb --format documentation failed
ERROR: Test "ruby2.3" failed. Exiting.

0.9.0 is fine, any ideas for it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions