Skip to content

Commit

Permalink
Disable some more specs of Process.spawn
Browse files Browse the repository at this point in the history
These specs result in printing either error or traceback, which causes
our spec runner to fail.
  • Loading branch information
herwinw committed Nov 9, 2024
1 parent 4b17bbb commit f66ca22
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions spec/core/process/spawn_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
end

describe :process_spawn_does_not_close_std_streams, shared: true do
it "does not close STDIN" do
# NATFIXME: Prints /traceback|error/, causes spec runner to fail
xit "does not close STDIN" do
code = "puts STDIN.read"
cmd = "Process.wait Process.spawn(#{ruby_cmd(code).inspect}, #{@options.inspect})"
NATFIXME "it does not close STDIN", exception: SpecFailedException do
Expand All @@ -16,7 +17,8 @@
end
end

it "does not close STDOUT" do
# NATFIXME: Prints /traceback|error/, causes spec runner to fail
xit "does not close STDOUT" do
code = "STDOUT.puts 'hello'"
cmd = "Process.wait Process.spawn(#{ruby_cmd(code).inspect}, #{@options.inspect})"
NATFIXME "it does not close STDOUT", exception: SpecFailedException do
Expand Down Expand Up @@ -371,7 +373,7 @@
# :pgroup

platform_is_not :windows do
it "joins the current process group by default" do
xit "joins the current process group by default" do
NATFIXME 'it joins the current process group by default', exception: SpecFailedException do
-> do
Process.wait Process.spawn(ruby_cmd("print Process.getpgid(Process.pid)"))
Expand Down Expand Up @@ -459,7 +461,8 @@

# :chdir

it "uses the current working directory as its working directory" do
# NATFIXME: Prints /traceback|error/, causes spec runner to fail
xit "uses the current working directory as its working directory" do
NATFIXME 'it uses the current working directory as its working directory', exception: SpecFailedException do
-> do
Process.wait Process.spawn(ruby_cmd("print Dir.pwd"))
Expand Down Expand Up @@ -505,6 +508,7 @@ def child_pids(pid)
`pgrep -P #{pid}`.lines.map { |child| Integer(child) }
end

# NATFIXME: Prints /traceback|error/, causes spec runner to fail
it "does not create extra process without chdir" do
pid = Process.spawn("sleep 10")
begin
Expand Down Expand Up @@ -543,7 +547,8 @@ def child_pids(pid)

# :umask

it "uses the current umask by default" do
# NATFIXME: Prints /traceback|error/, causes spec runner to fail
xit "uses the current umask by default" do
NATFIXME 'it uses the current umask by default', exception: SpecFailedException do
-> do
Process.wait Process.spawn(ruby_cmd("print File.umask"))
Expand Down Expand Up @@ -715,7 +720,8 @@ def child_pids(pid)

platform_is_not :windows do
context "defaults :close_others to" do
it "false" do
# NATFIXME: Prints /traceback|error/, causes spec runner to fail
xit "false" do
IO.pipe do |r, w|
w.close_on_exec = false
NATFIXME "it defaults :close_others to false", exception: SpecFailedException do
Expand Down

0 comments on commit f66ca22

Please sign in to comment.