summaryrefslogtreecommitdiff
path: root/test/fiddle/helper.rb
AgeCommit message (Collapse)Author
2021-05-18[ruby/fiddle] Do not use a libdir for glibc, it breaks Linux PPC64 (#70)Jeremy Evans
Fixes [Bug #12666] https://github.com/ruby/fiddle/commit/a267a40be7 Notes: Merged: https://github.com/ruby/ruby/pull/4506
2020-12-15TEST: multiarch support for HaikuZoltán Mizsei
2020-12-08Revert "test/fiddle/helper.rb: remove duplication (#3863)" (#3865)Kenta Murata
This reverts commit bd47a8d660ab33a20c5e28d0effcc29105c434e4. `libc_so` and `libm_so` are `nil` at line 124 because Big Sur doesn't have `/usr/lib/libSystem.B.dylib`. The reassignment at line 127 is necessary in this case. Notes: Merged-By: mrkn <mrkn@ruby-lang.org>
2020-12-08test/fiddle/helper.rb: remove duplication (#3863)Kenta Murata
Notes: Merged-By: mrkn <mrkn@ruby-lang.org>
2020-11-18[ruby/fiddle] test: suppress shadowing outer local variable warningSutou Kouhei
https://github.com/ruby/fiddle/commit/cf168680a2 Notes: Merged: https://github.com/ruby/ruby/pull/3780
2020-09-08Workaroud for macOS Big Sur(11.0)Hiroshi SHIBATA
2020-09-08libSystem.dylib is also symlink. Use libSystem.B.dylibHiroshi SHIBATA
2020-09-08Use libSystem.dylib instead of libm.dylib and libc.dylibHiroshi SHIBATA
Because macOS 11.0(Big Sur) was removed libc and libm from `/usr/lib`.
2020-04-01`Dir.glob` always returns an arrayNobuyoshi Nakada
It is not needed to test itself, but the element should be tested instead.
2020-04-01Fix helper to not assume glibcPaul Jordan
Notes: Merged: https://github.com/ruby/ruby/pull/2995
2020-01-24pass appropriate libc path卜部昌平
The same as https://github.com/ruby/ruby/pull/2686, but for musl libc. Musl is not named as libc.so.6 so the `ldd` hack implemented some lines below does not work.
2019-12-05Fix "cannot find the function: strcpy()" error on arm32 on Travis CI. (#2686)Jun Aruga
This issue happened when `libc.so` and `libm.so` path were not found and `ldd ruby` command also failed to print the shared dependencies in `test/fiddle/helper.rb`. See https://travis-ci.org/ruby/ruby/jobs/611483288#L3018 /home/travis/build/ruby/ruby/build/.ext/common/fiddle/import.rb:299:in `import_function': cannot find the function: strcpy() (Fiddle::DLError) * Set libc6:armhf as a installing dependency explicitly. * Remove arm32 from allow_failures.
2019-10-24[ruby/fiddle] Use RbConfig::SIZEOF (#19)Nobuyoshi Nakada
https://github.com/ruby/fiddle/commit/ea06b28db8
2019-09-09Make test-all and test-spec runnable on AndroidYusuke Endoh
Calling some syscall functions such as Dir.chroot causes SIGSYS instead of EPERM on Android. This change skips all tests that stops the test-suite run.
2017-09-12Merge fiddle-1.0.0.beta2 from upstream.hsbt
* ext/fiddle/closure.c: use directly declaration for standalone gem without internal.h. * Specify frozen string literal is true. * Update gemspec configuration for release version. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-13Use Test::Unit::TestCase instead of MiniTest::Unit::TestCase. Becausehsbt
tests of fiddle already used customized assertions of ruby core. * test/fiddle/helper.rb: Use Test::Unit::TestCase for base class of testcase. * test/fiddle/test_*.rb: Use assert_raise instead of assert_raises. Remove needless includes for Test::Unit::Assertions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-11test/fiddle/helper: remove special case for x86_64-linuxnormal
RUBY_PLATFORM is "x86_64-linux" on a 32-bit (x86) Ruby built and running on a 64-bit Linux kernel. I also have a /lib64 directory nowadays because I just installed multi-arch support in userspace. So, fall back to loading based in the size of a packed "unsigned long" type instead of special-casing. Tested with both x86 and x86_64 userspace on 64-bit Linux kernel, as well as x86 with a 32-bit Linux kernel. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16Add frozen_string_literal: false for all filesnaruse
When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-21fix r52690naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-21Visual C++ 14 (2015) uses ucrtbase.dll as c runtimenaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-13* test/lib/envutil.rb: Moved from test/ruby/.akr
* test/lib/find_executable.rb: Ditto. * test/lib/memory_status.rb: Ditto. * test/lib/test/unit.rb: require envutil. * test/: Don't require envutil in test files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-15same as r44597naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-28* test/dl/test_base.rb: {libc, libm} detection now handle GNU/Hurdkosaki
correctly. Patch by Gabriele Giacone (1o5g4r8o@gmail.com). * test/fiddle/helper.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-11Fix if-endnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-11Experimental fix for ffi_closure_free causes dumping core/SEGVnaruse
http://u64.rubyci.org/~chkbuild/ruby-trunk/log/20130411T041301Z.log.html.gz#test%2F-ext- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-08* test/fiddle/helper.rb: specify libc and libm locations for MirOS BSD.akr
* test/dl/test_base.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-27* ext/fiddle/handle.c: Make Fiddle independent of DL, copy DL::Handletenderlove
to Fiddle::Handle. * ext/fiddle/pointer.c: Make Fiddle independent of DL, copy DL::Pointer to Fiddle::Pointer. * test/fiddle/test_func.rb: relevent tests * test/fiddle/test_handle.rb: ditto * test/fiddle/test_pointer.rb: ditto * ext/dl/lib/dl/struct.rb: use Fiddle::Pointer if available * ext/fiddle/extconf.rb: check for dlfcn.h * ext/fiddle/fiddle.c: add constants for sizeof() things * ext/fiddle/fiddle.h: include dlfcn.h * ext/fiddle/function.c: expose a C function for creating new Fiddle::Function objects. * ext/fiddle/lib/fiddle.rb: include constants for dl backwards compat * ext/fiddle/lib/fiddle/function.rb: read the pointer from the function for dl backwards compat. * test/dl/test_callback.rb: check the addresses of the pointers rather than their types. * test/fiddle/helper.rb: remove dependency on dl * test/fiddle/test_closure.rb: ditto * test/fiddle/test_fiddle.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-27reverting r37881tenderlove
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-27* ext/fiddle/handle.c: Make Fiddle independent of DL, copy DL::Handletenderlove
to Fiddle::Handle. * ext/fiddle/pointer.c: Make Fiddle independent of DL, copy DL::Pointer to Fiddle::Pointer. * test/fiddle/test_func.rb: relevent tests * test/fiddle/test_handle.rb: ditto * test/fiddle/test_pointer.rb: ditto * ext/dl/lib/dl/struct.rb: use Fiddle::Pointer if available * ext/fiddle/extconf.rb: check for dlfcn.h * ext/fiddle/fiddle.c: add constants for sizeof() things * ext/fiddle/fiddle.h: include dlfcn.h * ext/fiddle/function.c: expose a C function for creating new Fiddle::Function objects. * ext/fiddle/lib/fiddle.rb: include constants for dl backwards compat * ext/fiddle/lib/fiddle/function.rb: read the pointer from the function for dl backwards compat. * test/dl/test_callback.rb: check the addresses of the pointers rather than their types. * test/fiddle/helper.rb: remove dependency on dl * test/fiddle/test_closure.rb: ditto * test/fiddle/test_fiddle.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-09* test/fiddle/helper.rb (libc_so, libm_so): Solaris support added.ngoto
* test/dl/test_base.rb (libc_so, libm_so): on Solaris, remove libc and libm version numbers for detecting default libc and libm. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-12* test/dl/test_base.rb (Fiddle::LIBC_SO): its always msvc*.dll onusa
mswin/mingw. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-26Creating dummy library for dl/fiddle tests on AIX.kanemoto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-06* ext/fiddle/*: Adding fiddle library to wrap libffitenderlove
* test/fiddle/*: testing fiddle extension * ext/dl/lib/dl.rb: Requiring fiddle if it is available * ext/dl/lib/dl/callback.rb: using Fiddle if it is available * ext/dl/lib/dl/func.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e