File: Fix-test-dlopen-for-.so-filename-with-more-than-one-digit.patch

package info (click to toggle)
ruby3.3 3.3.8-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 153,620 kB
  • sloc: ruby: 1,244,308; ansic: 836,474; yacc: 28,074; pascal: 6,748; sh: 3,913; python: 1,719; cpp: 1,158; makefile: 742; asm: 712; javascript: 394; lisp: 97; perl: 62; awk: 36; sed: 23; xml: 4
file content (31 lines) | stat: -rw-r--r-- 1,079 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From: Lucas Kanashiro <kanashiro@debian.org>
Date: Wed, 29 Jan 2025 11:59:15 -0300
Subject: Fix test dlopen for .so filename with more than one digit

In alpha architecture, we have libc.so.6.1 which causes a failure in
this test:

 1) Failure:
TestFiddle#test_dlopen_linker_script_group_linux [/<<PKGBUILDDIR>>/test/fiddle/test_fiddle.rb:52]:
<"libc.so"> expected but was
<"libc.so.6">.

Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1085238
Forwarded: https://github.com/ruby/fiddle/pull/171
---
 test/fiddle/test_fiddle.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/fiddle/test_fiddle.rb b/test/fiddle/test_fiddle.rb
index 9bddb05..769a74d 100644
--- a/test/fiddle/test_fiddle.rb
+++ b/test/fiddle/test_fiddle.rb
@@ -50,7 +50,7 @@ class TestFiddle < Fiddle::TestCase
     handle = Fiddle.dlopen("libc.so")
     begin
       assert_equal("libc.so",
-                   File.basename(handle.file_name, ".*"))
+                   File.basename(handle.file_name, ".*").gsub(/\.so.\d+/,'.so'))
     ensure
       handle.close
     end