已开启
ruby check使能 #137
tong_1001创建于  8 天前
tong_1001
8 天前 创建

ruby包spec文件中未使能check,spec文件%check添加下面代码进行check使能:

DISABLE_TESTS=""
make check TESTS="-v $DISABLE_TESTS"
likedislike
openeuler-ci-botopeneuler-ci-bot成员
8 天前 将 small_leek、shinwell_hu、tong_1001 设为负责人
openeuler-ci-botopeneuler-ci-bot成员
8 天前 添加了label:sig/sig-ruby
openeuler-ci-bot
openeuler-ci-bot成员
8 天前 评论:

Welcome To openEuler Community

Hey @tong_1001 , thanks for your contribution to the community.

Bot Usage Manual

I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands. You can self-configure the PR merge rules for this repository. For more details, please refer to Here.

Contact Guide

If you have any questions, please contact the SIG: sig-ruby ,
and any of the maintainers: @shinwell_hu, @small_leek ,
and any of the committers: @hubin1305, @shenyangyang .

likedislike
tong_1001
8 天前 评论:

/assign

likedislike
openeuler-ci-botopeneuler-ci-bot成员
8 天前 移除了负责人 small_leek、shinwell_hu
tong_1001
8 天前 评论:

选择测试用例执行:

运行目标 make check 命令示例 说明
运行一个测试文件 make test-all TESTS=test/ruby/test_foo.rb 直接指定测试文件路径,只运行这个文件里的全部用例。
运行一个测试目录 make test-all TESTS=test/rubygems 指定测试目录,会运行该目录下的所有测试。
运行一个文件中的特定测试 make test/ruby/test_foo.rb TESTOPTS="-n /test_bar/" 当使用 GNU make 时,也可以将文件名和过滤选项分开传递。

详见:
https://docs.ruby-lang.org/en/3.1/make_cheatsheet_md.html

likedislike
tong_1001
6 天前 评论:

How to run the whole test suite
$ make check
It runs (about) three test suites:

make test (a test suite for the interpreter core)

make test-all (for all builtin classes and libraries)

make test-spec (a conformance test suite for Ruby implementations)

make test-bundler (a test suite for the bundler examples)

likedislike
Ttong_1001
5 天前 修改了issue 的描述
Ttong_1001
4 天前 关联了pull request:fix build warning and enable check
tong_1001
4 天前 评论:

使用到bundler-1.15.4.gemspec文件的测试用例失败,因为权限问题:
图片.png

openEuler:ruby构建的时候并不是root权限,因此动态生成该文件就直接失败了

likedislike
tong_1001
3 天前 评论:
2026-09-02 09:30:00  84) Error:
2026-09-02 09:30:00 OpenSSL::TestX509Request#test_version:
2026-09-02 09:30:00 OpenSSL::X509::RequestError: X509_REQ_set_version: passed invalid argument
2026-09-02 09:30:00     /home/lkp/rpmbuild/BUILD/ruby-3.2.2/test/openssl/test_x509req.rb:18:in `version='
2026-09-02 09:30:00     /home/lkp/rpmbuild/BUILD/ruby-3.2.2/test/openssl/test_x509req.rb:18:in `issue_csr'
2026-09-02 09:30:00     /home/lkp/rpmbuild/BUILD/ruby-3.2.2/test/openssl/test_x509req.rb:43:in `test_version'

修复补丁:
https://github.com/ruby/ruby/commit/6b120135afe1529a8ed1532b9da6878f1f4b1fbf

likedislike
tong_1001
3 天前 评论:

诸多用例失败原因:certificate verify failed (certificate has expired), 比如:

2026-09-01 11:43:46 310) Error:
2026-09-01 11:43:46 TestNetHTTPS#test_session_reuse_but_expire:
2026-09-01 11:43:46 OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 peeraddr=[::1]:41791 state=error: certificate verify failed (certificate has expired)
2026-09-01 11:43:46     /home/lkp/rpmbuild/BUILD/ruby-3.2.2/lib/net/protocol.rb:46:in `connect_nonblock'
2026-09-01 11:43:46     /home/lkp/rpmbuild/BUILD/ruby-3.2.2/lib/net/protocol.rb:46:in `ssl_socket_connect'
2026-09-01 11:43:46     /home/lkp/rpmbuild/BUILD/ruby-3.2.2/lib/net/http.rb:1342:in `connect'
2026-09-01 11:43:46     /home/lkp/rpmbuild/BUILD/ruby-3.2.2/lib/net/http.rb:1248:in `do_start'
2026-09-01 11:43:46     /home/lkp/rpmbuild/BUILD/ruby-3.2.2/lib/net/http.rb:1243:in `start'
2026-09-01 11:43:46     /home/lkp/rpmbuild/BUILD/ruby-3.2.2/test/net/http/test_https.rb:176:in `test_session_reuse_but_expire'

修复补丁:
https://github.com/ruby/ruby/commit/671fd2a6323ab1b11fe2ba672ad22b7d3e87945e

likedislike
tong_1001
3 天前 评论:
2026-09-01 11:43:46   3) Failure:
2026-09-01 11:43:46 TestUri#test_redacted_with_user_x_oauth_basic [/home/lkp/rpmbuild/BUILD/ruby-3.2.2/test/rubygems/test_gem_uri.rb:22]:
2026-09-01 11:43:46 <"https://REDACTED:x-oauth-basic@example.com"> expected but was
2026-09-01 11:43:46 <"https://REDACTED@example.com">.

修复补丁:
https://github.com/ruby/ruby/commit/4368e6c42effc16904e35f753fc2002f0bba375a

likedislike
tong_1001
3 天前 评论:
2026-09-02 09:30:00  85) Error:
2026-09-02 09:30:00 OpenSSL::TestASN1#test_utctime:
2026-09-02 09:30:00 OpenSSL::ASN1::ASN1Error: utctime is too short
2026-09-02 09:30:00     /home/lkp/rpmbuild/BUILD/ruby-3.2.2/test/openssl/test_asn1.rb:698:in `decode'
2026-09-02 09:30:00     /home/lkp/rpmbuild/BUILD/ruby-3.2.2/test/openssl/test_asn1.rb:698:in `decode_test'
2026-09-02 09:30:00     /home/lkp/rpmbuild/BUILD/ruby-3.2.2/test/openssl/test_asn1.rb:411:in `test_utctime'
2026-09-02 09:30:00 
2026-09-02 09:30:00  86) Error:
2026-09-02 09:30:00 OpenSSL::TestASN1#test_generalizedtime:
2026-09-02 09:30:00 OpenSSL::ASN1::ASN1Error: generalizedtime is too short
2026-09-02 09:30:00     /home/lkp/rpmbuild/BUILD/ruby-3.2.2/test/openssl/test_asn1.rb:698:in `decode'
2026-09-02 09:30:00     /home/lkp/rpmbuild/BUILD/ruby-3.2.2/test/openssl/test_asn1.rb:698:in `decode_test'
2026-09-02 09:30:00     /home/lkp/rpmbuild/BUILD/ruby-3.2.2/test/openssl/test_asn1.rb:433:in `test_generalizedtime'

修复补丁:
https://github.com/ruby/ruby/commit/dd5e625d7bcb7dc849fdbc2ad8053f9c2724efb4

likedislike
tong_1001
3 天前 评论:
2026-09-02 09:30:00  76) Failure:
2026-09-02 09:30:00 TestNetHTTPS#test_session_reuse_but_expire [/home/lkp/rpmbuild/BUILD/ruby-3.2.2/test/net/http/test_https.rb:184]:
2026-09-02 09:30:00 <false> expected but was
2026-09-02 09:30:00 <true>.

修复补丁:
https://github.com/ruby/ruby/commit/de37b780508d4ced5837f39446d3c8c93ef9ec7c
https://github.com/ruby/ruby/commit/1b7376423d3bf79ba37856eae8f45d59ecc9c170
https://github.com/ruby/ruby/commit/64b6a018a38f200c957fdbbe7d0cbe0e64781c9f
https://github.com/ruby/ruby/commit/03f8477566d544c240cd1949fd56d8e42d686aa8
https://github.com/ruby/ruby/commit/9f4b45fbf7981a57fd82436ebec8a50ec3d3fdc9

likedislike
tong_1001
2 天前 评论:

图片.png

likedislike
tong_1001
2 天前 评论:

图片.png

@tong_1001

这类用例失败看着是多了ruby自带的一些ruby组件,分析日志发现构建环境中有安装ruby,怀疑是安装了ruby有关,ruby包自己构建不应该再安装自己
图片.png
构建日志:
7b7a515b0888453390508a57eeeea065.txt

确认ruby构建的时候是安装了ruby的,在%check下面添加rpm -qa | grep ruby就可以确认:
图片.png

likedislike
tong_1001
2 天前 评论:

图片.png

@tong_1001

这类用例失败看着是多了ruby自带的一些ruby组件,分析日志发现构建环境中有安装ruby,怀疑是安装了ruby有关,ruby包自己构建不应该再安装自己
图片.png
构建日志:
7b7a515b0888453390508a57eeeea065.txt

确认ruby构建的时候是安装了ruby的,在%check下面添加rpm -qa | grep ruby就可以确认:
图片.png

@tong_1001

已确认跟此有关,删除spec文件中 BuildRequires: rubygem-rdoc,上述提及的大量测试用例失败已成功

likedislike