Skip to content

Commit 4bc782e

Browse files
committedAug 29, 2022
Revert "Chect what remains in TMPDIR"
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.
1 parent 78748a5 commit 4bc782e

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed
 

‎test/rubygems/helper.rb

+7-12
Original file line numberDiff line numberDiff line change
@@ -466,18 +466,13 @@ def teardown
466466
Dir.chdir @current_dir
467467

468468
# Prevent a race condition on removing TMPDIR being written by MJIT
469-
#if defined?(RubyVM::MJIT.enabled?) && RubyVM::MJIT.enabled?
470-
# RubyVM::MJIT.pause(wait: false)
471-
#end
472-
begin
473-
FileUtils.rm_rf @tempdir
474-
ensure
475-
# mame: Temporal code for debugging. Let me confirm what remains in the directory
476-
pp Dir.glob(File.join(@tempdir, "**", "{.*,*}")) if $!
477-
end
478-
#if defined?(RubyVM::MJIT.enabled?) && RubyVM::MJIT.enabled?
479-
# RubyVM::MJIT.resume
480-
#end
469+
if defined?(RubyVM::MJIT.enabled?) && RubyVM::MJIT.enabled?
470+
RubyVM::MJIT.pause(wait: false)
471+
end
472+
FileUtils.rm_rf @tempdir
473+
if defined?(RubyVM::MJIT.enabled?) && RubyVM::MJIT.enabled?
474+
RubyVM::MJIT.resume
475+
end
481476

482477
ENV.replace(@orig_env)
483478

0 commit comments

Comments
 (0)
Failed to load comments.