1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Revert "Chect what remains in TMPDIR"

This reverts commit 7bdb999d0f.

I think I confirmed the mechanism. GCC (invoked by MJIT) creates a
temporary file in TMPDIR, which prevents rm_rf from removing the
directory.
This commit is contained in:
Yusuke Endoh 2022-08-29 20:23:51 +09:00
parent 78748a5de2
commit 4bc782ed87

View file

@ -466,18 +466,13 @@ class Gem::TestCase < Test::Unit::TestCase
Dir.chdir @current_dir
# Prevent a race condition on removing TMPDIR being written by MJIT
#if defined?(RubyVM::MJIT.enabled?) && RubyVM::MJIT.enabled?
# RubyVM::MJIT.pause(wait: false)
#end
begin
FileUtils.rm_rf @tempdir
ensure
# mame: Temporal code for debugging. Let me confirm what remains in the directory
pp Dir.glob(File.join(@tempdir, "**", "{.*,*}")) if $!
if defined?(RubyVM::MJIT.enabled?) && RubyVM::MJIT.enabled?
RubyVM::MJIT.pause(wait: false)
end
FileUtils.rm_rf @tempdir
if defined?(RubyVM::MJIT.enabled?) && RubyVM::MJIT.enabled?
RubyVM::MJIT.resume
end
#if defined?(RubyVM::MJIT.enabled?) && RubyVM::MJIT.enabled?
# RubyVM::MJIT.resume
#end
ENV.replace(@orig_env)