Commit graph

143 commits

Author SHA1 Message Date
Andrew Konchin
53a930f157 Update to ruby/mspec@484310d 2025-03-27 11:09:24 +01:00
Andrew Konchin
ea2dd5b80e Update to ruby/mspec@0aabb3e 2025-01-30 20:43:46 +01:00
Naoto Ono
46e8a26c17
Launchable: Start recording test-spec results (#12302) 2024-12-12 16:32:35 +09:00
Andrew Konchin
a90d8c335a Update to ruby/mspec@c600b8f 2024-12-10 14:38:52 +01:00
Hiroshi SHIBATA
26aebdb6d6 Added --env option to mspec for test-bundled-gems 2024-11-27 16:45:10 +09:00
Benoit Daloze
9bc63e7ba0 Update to ruby/mspec@6499325 2024-11-06 21:58:28 +01:00
Peter Zhu
2f67610f6b Remove dependency on Tempfile::Remover in leakchecker.rb 2024-08-20 14:29:40 -04:00
Alan Wu
28382505b2 Get fixnum_{min,max} from RbConfig::LIMITS when available
It's better than guessing based on the pointer size if the
implementation provides it directly.
2024-07-24 18:20:30 +02:00
Alan Wu
fbb981b9f8 Stop depending on Integer#size to return sizeof(long)
There is no guarantee that Integer#size will continue to return
`sizeof(long)` for small integers.

Use the `l!` specifier for Array#pack instead. It is a public
interface that has a direct relationship with the `long` type.
2024-07-24 18:20:30 +02:00
Alan Wu
12e6cf77ef Add "c_long_size" guard, supplanting "wordsize" and stop using Integer#size
What a "word" is when talking about sizes is confusing because it's a
highly overloaded term. Intel, Microsoft, and GDB are just a few vendors
that have their own definition of what a "word" is. Specs that used the
"wordsize" guard actually were mostly testing for the size of the C
`long` fundamental type, so rename the guard for clarity.

Also, get the size of `long` directly from RbConfig instead of guessing
using Integer#size. Integer#size is not guaranteed to have anything to
do with the `long` type.
2024-07-24 18:20:30 +02:00
Koichi Sasada
420ef906bd respect --error-output stderr on parallel mode
`MultiFormatter#print_exception` should respect `--error-output stderr`.
2024-06-14 04:30:19 +09:00
Nobuyoshi Nakada
0bc91fa6df
File.umask does not make sense on Windows 2024-06-12 14:46:29 +09:00
Koichi Sasada
6086bae5c8 check SPEC_TEMP_DIR is world-writable or not
```
1)
Dir.mktmpdir when passed a block yields the path to the passed block ERROR
ArgumentError: parent directory is world writable but not sticky: /tmp/rubytest.wlu5cs_11
/tmp/ruby/src/trunk/lib/tmpdir.rb:113:in 'Dir.mktmpdir'
/tmp/ruby/src/trunk/spec/ruby/library/tmpdir/dir/mktmpdir_spec.rb:39:in 'block (2 levels) in <top (required)>'
```

This weird error comes from world-writable (and not sticky) directory
of `SPEC_TEMP_DIR`.

This patch checks `SPEC_TEMP_DIR` is not world-writable if exists
and `File.umask` contains o+w mask.
2024-06-11 17:02:27 +09:00
Benoit Daloze
1d9f99144b Update to ruby/mspec@b8f8f4e 2024-03-14 21:44:52 +01:00
Benoit Daloze
40c9a3dad5 Update to ruby/mspec@36e8ed8 2024-02-26 14:45:28 +01:00
Benoit Daloze
d24be39d69 Only check constant leaks by default for make test-spec
* See https://github.com/ruby/ruby/pull/9548
2024-02-15 07:44:03 +09:00
Benoit Daloze
abe07d4bf5 Update to ruby/mspec@31f51e0 2024-02-05 16:29:56 +01:00
KJ Tsanaktsidis
33290896dc Disable NSS modules when using the leakchecker
The leakchecker will report leaked file descriptors when tests do things
like access `Etc.getgrgid`, for example, if NSS modules (like `sss`)
handle these lookups by connecting to a daemon like `sssd` and leave the
connection open.

To address this, we can call glibc's `__nss_configure_lookup` to
override NSS modules configured in /etc/nsswitch.conf and only use
ordinary file/DNS lookups.

(This is a cherry-pick of a patch applied to ruby/mspec here:
https://github.com/ruby/mspec/pull/62)
2024-01-22 13:44:52 +11:00
Benoit Daloze
acab060c17 Update to ruby/mspec@9f83eea 2023-11-27 18:17:51 +01:00
Benoit Daloze
b09618e566 Update to ruby/mspec@d03ad9c 2023-10-30 16:44:52 +01:00
Benoit Daloze
3504f928df Update to ruby/mspec@55d1a62 2023-09-04 16:07:44 +02:00
Benoit Daloze
f73fa29927 Update to ruby/mspec@3cf2d16 2023-06-26 15:55:09 +02:00
Benoit Daloze
d3da01cd11 Update to ruby/mspec@1d8cf64 2023-04-25 17:09:53 +02:00
Benoit Daloze
de60139053 Update to ruby/mspec@dc2eb26 2023-02-27 21:02:42 +01:00
Benoit Daloze
cd5e6cc0ea Update to ruby/mspec@fef9b81 2023-01-05 19:05:27 +01:00
Benoit Daloze
c99e4c4278 Update to ruby/mspec@1e16420 2022-11-07 20:05:18 +01:00
Benoit Daloze
5a1ab740fc Update to ruby/mspec@b60306d 2022-09-28 18:37:16 +02:00
Yuta Saito
3f387e60ef Rescue File.expand_path in MSpecScript#try_load if HOME is unavailable
mspec tries to load ~/.mspecrc, but some platforms (e.g. WASI) doesn't
have HOME concept, so `~` cannot be expanded and `File.expand_path` can
fail.
2022-09-21 15:26:34 +09:00
Benoit Daloze
b5358a98e6 Update to ruby/mspec@37151a0 2022-08-29 18:18:20 +02:00
Benoit Daloze
44f42413e6 Update to ruby/mspec@290e36a 2022-07-27 17:18:23 +02:00
Benoit Daloze
f616e81637 Update to ruby/mspec@78b5d86 2022-06-26 14:50:13 +02:00
Benoit Daloze
6ae81d49b5 Update to ruby/mspec@215497e 2022-04-25 14:53:51 +02:00
Yuta Saito
e9553a8cac spec: skip specs where set TZ environment variable for WASI
WASI doesn't respect TZ env var for now
2022-03-17 17:44:41 +09:00
Yuta Saito
fe2e5c13f9 spec: skip ruby_exe tests for wasi due to lack of subprocess 2022-03-14 23:04:13 +09:00
Benoit Daloze
1dc6bed0ca Update to ruby/mspec@bd47c2a 2022-03-03 14:43:11 +01:00
Benoit Daloze
bb5f710887 Update to ruby/mspec@49adc2f 2022-01-28 14:42:36 +01:00
Benoit Daloze
8abfc10605 Update to ruby/mspec@3ea3d32 2022-01-10 16:29:53 +01:00
Benoit Daloze
e6d93a27af Update to ruby/mspec@098b320 2021-11-29 15:50:26 +01:00
Benoit Daloze
207a5a5bc1 Update to ruby/mspec@08e1275 2021-10-20 21:41:45 +02:00
Benoit Daloze
a375640ea5 Update to ruby/mspec@e768949 2021-09-07 19:01:03 +02:00
Benoit Daloze
15d05f8120 Update to ruby/mspec@9542a88 2021-07-29 22:11:19 +02:00
Benoit Daloze
a4fbc7e288 Update to ruby/mspec@0091e8a 2021-06-02 14:34:01 +02:00
Benoit Daloze
2321ade41d Prefer respond_to? to defined? in MSpec 2021-05-17 20:12:39 +02:00
Yusuke Endoh
93fb186dd0 spec/ruby/library/yaml: Test YAML.unsafe_load instead of YAML.load in 3.1 2021-05-17 15:42:22 +09:00
Yusuke Endoh
008a63c477 Revert "Use YAML.unsafe_load instead of YAML.load."
This reverts commit a0e97b0e2e.
2021-05-17 15:32:41 +09:00
Hiroshi SHIBATA
a0e97b0e2e
Use YAML.unsafe_load instead of YAML.load.
This is a temporary workaround. We should rewrite the examples with
  permitted_classes.
2021-05-17 13:36:55 +09:00
Benoit Daloze
44736a6b7a Update to ruby/mspec@d1adf59 2021-03-27 13:02:38 +01:00
Benoit Daloze
267bed0cd9 Update to ruby/mspec@a40a674 2020-12-27 17:35:30 +01:00
Nobuyoshi Nakada
fb8f011422
Fixed indefinite articles before "Integer" [ci skip] 2020-12-21 01:19:55 +09:00
Benoit Daloze
bb3d705819 Add MSpec tool to automatically wrap spec files with a guard 2020-12-05 11:39:33 +01:00