Skip to content

Commit

Permalink
Revert "Chect what remains in TMPDIR"
Browse files Browse the repository at this point in the history
This reverts commit 7bdb999.

I think I confirmed the mechanism. GCC (invoked by MJIT) creates a
temporary file in TMPDIR, which prevents rm_rf from removing the
directory.
  • Loading branch information
mame committed Aug 29, 2022
1 parent 78748a5 commit 4bc782e
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions test/rubygems/helper.rb
Expand Up @@ -466,18 +466,13 @@ def teardown
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 $!
end
#if defined?(RubyVM::MJIT.enabled?) && RubyVM::MJIT.enabled?
# RubyVM::MJIT.resume
#end
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

ENV.replace(@orig_env)

Expand Down

0 comments on commit 4bc782e

Please sign in to comment.