summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-04-21 10:20:06 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-04-21 22:17:18 +0900
commite956052fa953d7e312a2f524127b2ac6ae1b0da2 (patch)
treea7df29b79f5108673682d3c10cb71106886db987 /spec
parent39bbbd767d6465080c6e1d6ba0da98c2762eedc6 (diff)
downloadruby-e956052fa953d7e312a2f524127b2ac6ae1b0da2.tar.gz
Skip when unix socket path is too long
Eventually the path directly under "/tmp" is complained by `rm_r` in spec/mspec/lib/mspec/helpers/fs.rb.
Diffstat (limited to 'spec')
-rw-r--r--spec/ruby/library/socket/fixtures/classes.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/ruby/library/socket/fixtures/classes.rb b/spec/ruby/library/socket/fixtures/classes.rb
index 4a590502ca..406bd7c710 100644
--- a/spec/ruby/library/socket/fixtures/classes.rb
+++ b/spec/ruby/library/socket/fixtures/classes.rb
@@ -37,7 +37,9 @@ module SocketSpecs
# Check for too long unix socket path (max 104 bytes on macOS)
# Note that Linux accepts not null-terminated paths but the man page advises against it.
if path.bytesize > 104
- path = "/tmp/unix_server_spec.socket"
+ # rm_r in spec/mspec/lib/mspec/helpers/fs.rb fails against
+ # "/tmp/unix_server_spec.socket"
+ skip "too long unix socket path: #{path}"
end
rm_socket(path)
path