See bug https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271490
On FreeBSDk, it's possible for fork(2) in a multithreaded process to
hang because of a bug in the lock handling of the dynamic linker. This
is now fixed on FreeBSD master, but it would be good if we could work
around it for Ruby CI which is running 13.1.
Setting LD_BIND_NOW seems to work around the problem (probably because
the dynamic linker doesn't then need to resolve anything through the PLT
when it's first called).
LD_PRELOAD sometimes forces loading libraries into unrelated
executables. For example, macOS on recent Apple Silicon can execute
arm64 and arm64e binaries by default, and /usr/bin/clang is built as
arm64e. If Ruby is built as arm64, and mkmf launched through runruby.rb
spawns /usr/bin/clang, dynamic loader tries to load libruby (arm64e)
into clang (arm64). This force-load causes library load failure.
In theory, we don't need both LD_PRELOAD and LD_LIBRARY_PATH at the same
time, because executables requiring libruby already have libruby
dependency, so LD_LIBRARY_PATH is enough for this case.
* These seem to consistenly pass already
* Show actual command when running `make test-bundler`
Current the setup command that installs the necessary gems for testing
bundler was printed, but not the actual command that runs the tests.
That was a bit confusing.
* Borrow trick from setproctitle specs
* A title that long doesn't get set sometimes
No idea why, but the test doesn't need that the title is that long.
* Fix most gem helper spec ruby-core failures
* Fix the rest of the gem helper failures
* Fix version spec by improving the assertion
* Remove unnecessary `BUNDLE_RUBY` environment var
We can use `RUBY` when necessary, and `BUNDLE_RUBY` is not a good name
because bundler considers `BUNDLE_*` variables as settings.
* Rename `BUNDLE_GEM` to `GEM_COMMAND`
This is more descriptive I think, and also friendlier for bundler
because `BUNDLE_` env variables are interpreted by bundler as settings,
and this is not a bundler setting.
This fixes one bundler spec failure in config specs against ruby-core.
* Fix quality spec when run in core
Use the proper path helper.
* Fix dummy lib builder to never load default gems
If a dummy library is named as a default gem, when requiring the library
from its executable, the default gem would be loaded when running from
core, because in core all default gems share path with bundler, and thus
they are always in the $LOAD_PATH. We fix the issue by loading lib
relatively inside dummy lib executables.
* More exact assertions
Sometimes I have the problem that I do some "print debugging" inside
specs, and suddently the spec passes. This happens when the assertion is
too relaxed, and the things I print make it match, specially when they
are simple strings like "1.0" than can be easily be part of gem paths
that I print for debugging.
I fix this by making a more exact assertion.
* Detect the correct shebang when ENV["RUBY"] is set
* Relax assertion
So that the spec passes even if another paths containing "ext" are in
the load path. This works to fix a ruby-core issue, but it's a better
assertion in general. We just want to know that the extension path was
added.
* Use folder structure independent path helper
It should fix this spec for ruby-core.
* Fix the last failing spec on ruby-core
* Skip `bundle open <default_gem>` spec when no default gems
This adds support for lldb as a debugger so that tests can be run under
lldb like this:
$ make test-all TESTS=test/some_test.rb RUNRUBYOPT=--debugger=lldb
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tool/runruby.rb: add RUNRUBY_USE_GDB environment variable.
If RUNRUBY_USE_GDB=true then use 'gdb --args'.
If there is 'run.gdb' file (made by 'make run.gdb') on current directory,
run gdb with this file ('gdb -x run.gdb --args').
This envval is useful when you want to run test-all (and so on) with gdb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk, configure.in: rename the bin directory to run build
executable as exe, to get rid of overwriting true files at the
installation. [ruby-dev:50250] [Bug #13911]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Lets ensure none of our C functions use too much stack space and
fix all excessive stack usage before releasing the next version.
Reducing C stack usage should reduce conservative GC scanning
time and improve performance.
If there are platform-dependent test failures; excessive stack
usage should be fixed; rather than increasing minimum values or
removing these envs from testing.
* tool/runruby.rb: use smallest possible machine stack size
[ruby-core:81597] [Feature #13637]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tool/runruby.rb: do not set environment to preload on multiarch
platforms, otherwise other external commands (e.g., /bin/sh)
fail to run.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tool/runruby.rb: use ruby-runner only when exists and fallback
to ruby itself.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* template/ruby-runner.c.in: wrapper to set dynamic loading path
environment variable. /bin/sh on Mac OS X 10.11 (El Capitan)
clears DYLD_LIBRARY_PATH.
it must:
- do nothing even if current directory is not present
- do not set other environment variables, e.g. PWD, SHLVL, etc
- do not open other FDs, e.g. pipes for timer thread
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tool/runruby.rb: rubyspec now requires other FDs not to be
closed since 7b6ce1fee.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
instead of replacing the check to `true`, for getting rid of a
warning `possibly useless use of true in void context`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tool/runruby.rb: use File::PATH_SEPARATOR as
DYLD_INSERT_LIBRARIES is colon-separated list.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (PRELOADENV): platform specific environment to
pre-load the given shared libraries.
* tool/runruby.rb: use config['PRELOADENV'] instead of hardcoded
LD_PRELOAD.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tool/runruby.rb: follow the change of RUBY_VERSION check in
rbconfig by r49740.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/runner.rb (src_testdir): expand real path so that
TestGem#test_self_find_files does not fail by aliased load path when
srcdir contains a symbolic link.
* tool/runruby.rb (srcdir): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e