Skip to content

Ubuntu jammy s390x: Test failures #1083

@junaruga

Description

@junaruga

This issue ticket is to manage the test failures on Ubuntu jammy s390x. The cause is same with the the test failures ruby/zlib#60 on ruby/zlib.

The issue summary

On the following environment, the tests are failing.

$ cat /etc/os-release | grep VERSION
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy

$ uname -m
s390x

$ which ruby
/home/jaruga/.local/ruby-05a853c2f2-debug/bin/ruby

ruby01|s390x$ ruby -v
ruby 3.3.0dev (2023-09-11T15:25:06Z master 05a853c2f2) [s390x-linux]

Here is the used zlib deb package.

$ dpkg -S /usr/include/zlib.h
zlib1g-dev:s390x: /usr/include/zlib.h

ruby01|s390x$ dpkg -s zlib1g-dev | grep ^Version
Version: 1:1.2.11.dfsg-2ubuntu9.2

Below are the test failures.

$ ../mspec/bin/mspec library/zlib
$ ruby /home/jaruga/git/ruby/mspec/bin/mspec-run library/zlib
ruby 3.3.0dev (2023-09-11T15:25:06Z master 05a853c2f2) [s390x-linux]
...........FFFFF..F..F..FF.F....................................................................................F.F..............................

1)
Zlib::Deflate.deflate deflates some data FAILED
Expected 
"x\x9Cc\x80\x03\x00\x00
\x00\x01" == 
"x\x9Cc`\x80\x01\x00\x00
\x00\x01"
to be truthy but was false
/home/jaruga/git/ruby/spec/library/zlib/deflate/deflate_spec.rb:10:in `block (2 levels) in <top (required)>'
/home/jaruga/git/ruby/spec/library/zlib/deflate/deflate_spec.rb:4:in `<top (required)>'

2)
Zlib::Deflate.deflate deflates lots of data FAILED
Expected "x\x9Cc\x18\xE1`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x00\x00\x80\x00\x00\x01" == 
"x\x9C\xED\xC1\x01\x01\x00\x00\x00\x80\x90\xFE\xAF\xEE\b
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x80\x00\x00\x01"
to be truthy but was false
/home/jaruga/git/ruby/spec/library/zlib/deflate/deflate_spec.rb:18:in `block (2 levels) in <top (required)>'
/home/jaruga/git/ruby/spec/library/zlib/deflate/deflate_spec.rb:4:in `<top (required)>'

3)
Zlib::Deflate.deflate deflates chunked data FAILED
Expected 21085 == 20016
to be truthy but was false
/home/jaruga/git/ruby/spec/library/zlib/deflate/deflate_spec.rb:32:in `block (2 levels) in <top (required)>'
/home/jaruga/git/ruby/spec/library/zlib/deflate/deflate_spec.rb:4:in `<top (required)>'

4)
Zlib::Deflate#deflate deflates some data FAILED
Expected 
"x\x9Cc\x80\x03\x00\x00
\x00\x01" == 
"x\x9Cc`\x80\x01\x00\x00
\x00\x01"
to be truthy but was false
/home/jaruga/git/ruby/spec/library/zlib/deflate/deflate_spec.rb:47:in `block (2 levels) in <top (required)>'
/home/jaruga/git/ruby/spec/library/zlib/deflate/deflate_spec.rb:36:in `<top (required)>'

5)
Zlib::Deflate#deflate deflates lots of data FAILED
Expected "x\x9Cc\x18\xE1`\xA4\x83\x91\x0E\xA8\rF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0EF:\x18\xE9`\xA4\x83\x91\x0E\x86\x1A\x00\x00\x80\x00\x00\x01" == 
"x\x9C\xED\xC1\x01\x01\x00\x00\x00\x80\x90\xFE\xAF\xEE\b
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x80\x00\x00\x01"
to be truthy but was false
/home/jaruga/git/ruby/spec/library/zlib/deflate/deflate_spec.rb:56:in `block (2 levels) in <top (required)>'
/home/jaruga/git/ruby/spec/library/zlib/deflate/deflate_spec.rb:36:in `<top (required)>'

6)
Zlib::Deflate#deflate without break deflates chunked data with final chunk FAILED
Expected 8325 == 7253
to be truthy but was false
/home/jaruga/git/ruby/spec/library/zlib/deflate/deflate_spec.rb:96:in `block (3 levels) in <top (required)>'
/home/jaruga/git/ruby/spec/library/zlib/deflate/deflate_spec.rb:68:in `<top (required)>'

7)
Zlib::Deflate#deflate with break deflates chunked data with final chunk FAILED
Expected 4702 == 3632
to be truthy but was false
/home/jaruga/git/ruby/spec/library/zlib/deflate/deflate_spec.rb:123:in `block (3 levels) in <top (required)>'
/home/jaruga/git/ruby/spec/library/zlib/deflate/deflate_spec.rb:68:in `<top (required)>'

8)
Zlib::Deflate#set_dictionary sets the dictionary FAILED
Expected "x\xBB\x14\xE1\x03\xCBJLJNIMK\xCF\xC8\xCC\x02\f\x00\x15\x86\x03\xF8" == "x\xBB\x14\xE1\x03\xCBKLJNIMK\xCF\xC8\xCC\x02\x00\x15\x86\x03\xF8"
to be truthy but was false
/home/jaruga/git/ruby/spec/library/zlib/deflate/set_dictionary_spec.rb:10:in `block (2 levels) in <top (required)>'
/home/jaruga/git/ruby/spec/library/zlib/deflate/set_dictionary_spec.rb:4:in `<top (required)>'

9)
Zlib.deflate deflates some data FAILED
Expected 
"x\x9C3\x84\x03\x00
\x91\x01\xEB" == 
"x\x9C34\x84\x01\x00
\x91\x01\xEB"
to be truthy but was false
/home/jaruga/git/ruby/spec/library/zlib/deflate_spec.rb:6:in `block (2 levels) in <top (required)>'
/home/jaruga/git/ruby/spec/library/zlib/deflate_spec.rb:4:in `<top (required)>'

10)
Zlib.gzip gzips the given string FAILED
Expected 
"24261MLJNI\x05\f\x00\x9D\x05\x00$
\x00\x00\x00" == 
"34261MLJNI\x05\x00\x9D\x05\x00$
\x00\x00\x00"
to be truthy but was false
/home/jaruga/git/ruby/spec/library/zlib/gzip_spec.rb:13:in `block (2 levels) in <top (required)>'
/home/jaruga/git/ruby/spec/library/zlib/gzip_spec.rb:4:in `<top (required)>'

11)
Zlib::GzipWriter#write writes some compressed data FAILED
Expected [50, 52, 50, 54, 49, 77, 76, 74, 78, 73, 5, 12, 0, 157, 5, 0, 36, 10, 0, 0, 0] == [51, 52, 50, 54, 49, 77, 76, 74, 78, 73, 5, 0, 157, 5, 0, 36, 10, 0, 0, 0]
to be truthy but was false
/home/jaruga/git/ruby/spec/library/zlib/gzipwriter/write_spec.rb:19:in `block (2 levels) in <top (required)>'
/home/jaruga/git/ruby/spec/library/zlib/gzipwriter/write_spec.rb:5:in `<top (required)>'

12)
Zlib::GzipWriter#write handles inputs of 2^23 bytes FAILED
Expected 34263 == 8176
to be truthy but was false
/home/jaruga/git/ruby/spec/library/zlib/gzipwriter/write_spec.rb:34:in `block (2 levels) in <top (required)>'
/home/jaruga/git/ruby/spec/library/zlib/gzipwriter/write_spec.rb:5:in `<top (required)>'

Finished in 0.083500 seconds

40 files, 145 examples, 265 expectations, 12 failures, 0 errors, 0 tagged

As a workaround, we can pass the test With the DFLTCC=0.

$ DFLTCC=0 ../mspec/bin/mspec library/zlib
...
40 files, 145 examples, 265 expectations, 0 failures, 0 errors, 0 tagged

A possible solution

A possible solution is to apply the way used at the pull-request ruby/zlib#63.

Set the environment variable DFLTCC=0 in a parent Ruby process, then run the spec in a child process. Because the ENV['DFLTCC'] = 0 on the parent Ruby process can not affect to the Ruby code on the same process. The zlib spec files common logic can be implemented in the new file library/zlib/spec_helper.rb.

I have one question. In the Ruby's test-unit, there is the assert_separately method aserting the test code in a child Ruby process running the EnvUtil.invoke_ruby internally.

https://github.com/ruby/test-unit-ruby-core/blob/c147ebf0de5a172ba4fa252078e56cd4a484abd3/lib/core_assertions.rb#L297-L360

So, is there an equivalent method in ruby/mspec or ruby/spec? I found the ruby_exe that looks similar with the EnvUtil.invoke_ruby.

https://github.com/ruby/mspec/blob/b23f052a8d262ebd442e60e23d468ed82852f3d8/lib/mspec/helpers/ruby_exe.rb#L114

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions