summaryrefslogtreecommitdiff
path: root/test/ruby/test_process.rb
AgeCommit message (Collapse)Author
2025-10-25Remove automatically set environment variablesNobuyoshi Nakada
Probably since macOS Runner Image Version 20251020.XXXX, spawned processes initialize `TMPDIR` environment variable under the hood.
2025-10-25Add configured environment variables firstNobuyoshi Nakada
And `LD_PRELOAD` is set to `PRELOADENV` on Linux.
2025-10-09Skip TestProcess#test_rlimit_nofile on LSANPeter Zhu
2025-10-08Add RUBY_FREE_AT_EXIT to MANDATORY_ENVS in test_process.rbPeter Zhu
We need to keep RUBY_FREE_AT_EXIT in these tests.
2025-08-15Fix tests using assert_raise_with_message on US-ASCII systemsPeter Zhu
On systems where the Encoding.default_internal defaults to US-ASCII instead of UTF-8, some tests using assert_raise_with_message can fail since it no longer changes Encoding.default_internal in 79f5202. This tests explicitly uses EnvUtil.with_default_internal on systems where these tests fail.
2025-07-16test_process.rb: UID.from_name may raise Errno::ENOENTTakashi Kokubun
See: 58bc97628c1 getpwnam(3) says the same thing. I got ENOENT in my Linux environment. 1) Failure: TestProcess#test_uid_from_name [/home/k0kubun/src/github.com/ruby/ruby/test/ruby/test_process.rb:1685]: Exception(ArgumentError) with message matches to /\u{4e0d 5b58 5728}/. [ArgumentError] exception expected, not #<Errno::ENOENT: No such file or directory - getpwnam_r>.
2025-05-31skip flaky testKoichi Sasada
``` 1) Failure: TestProcess#test_warmup_frees_pages [/tmp/ruby/src/trunk-random1/test/ruby/test_process.rb:2772]: <164348> expected but was <165985>. ``` can someone investigate it? Notes: Merged: https://github.com/ruby/ruby/pull/13478
2025-04-02Fixup comment for Windows platform, not SolarisHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/13037
2025-04-02Removed Solaris conditions from test filesHiroshi SHIBATA
We no longer execute those files with Solaris platforms. Notes: Merged: https://github.com/ruby/ruby/pull/13037
2025-02-13[Feature #21116] Extract RJIT as a third-party gemNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12740
2025-02-06Enable bundled gems in ruby-runnerNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12706
2025-01-24Fix "Relax expectations of errors from `getgrnam`"Nobuyoshi Nakada
Use `assert_raise_kind_of` instead of `assert_raise`, that rejects sub classes of the given exceptions. Notes: Merged: https://github.com/ruby/ruby/pull/12626
2025-01-22Relax expectations of errors from `getgrnam`Nobuyoshi Nakada
The list of errors cited in 58bc97628c14933b73f13e0856d1a56e70e8b0e4 is not exhaustive and other errors may be raised by `getgrnam`. Additionally, these errors are system dependent and may not be listed on all platforms. Notes: Merged: https://github.com/ruby/ruby/pull/12610
2025-01-15Fix ENV tests on Windows on ARM64Lars Kanis
Due to the x64 emulation of Windows 11 on ARM the environment variable PROCESSOR_ARCHITECTURE is set by the process startup code. It must therefore be excluded from tests. Otherwise tests fail like so: ``` [30585/32394] TestProcess#test_execopts_unsetenv_others = 0.10 s 16) Failure: TestProcess#test_execopts_unsetenv_others [C:/Users/Lars/ruby/test/ruby/test_process.rb:446]: <""> expected but was <"PROCESSOR_ARCHITECTURE=ARM64\n">. [30616/32394] TestProcess#test_execopts_env = 0.16 s 17) Failure: TestProcess#test_execopts_env [C:/Users/Lars/ruby/test/ruby/test_process.rb:326]: <"PATH\n"> expected but was <"PATH\n" + "PROCESSOR_ARCHITECTURE\n">. ``` Notes: Merged: https://github.com/ruby/ruby/pull/12581
2025-01-02[Bug #20995] Protect `IO.popen` block from exiting by exceptionNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12497
2024-12-25Removed Process::Status#& and Process::Status#>>Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12452
2024-10-10Revert "TestProcess#test_daemon_noclose is only working with macOS 15.1 ↵Yuta Saito
beta, we should skip with macOS 15.0" This reverts commit 3830bca5edd6964131971866c80107c89fac5362. Notes: Merged: https://github.com/ruby/ruby/pull/11849
2024-09-25TestProcess#test_daemon_noclose is only working with macOS 15.1 beta, we ↵Hiroshi SHIBATA
should skip with macOS 15.0
2024-09-17TestProcess#test_daemon_noclose is working fine with macOS 15.1 beta3 and ↵Hiroshi SHIBATA
Xcode 16 RC
2024-09-10Add predicates for platformsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/11583
2024-09-09Add keys to GC.stat and fix testsPeter Zhu
This adds keys heap_empty_pages and heap_allocatable_slots to GC.stat.
2024-08-13Make sure to wait for the thread to exit in TestProcess#test_wait_and_sigchildNaoto Ono
Notes: Merged: https://github.com/ruby/ruby/pull/11366
2024-07-12Pend some tests because these are not working with macOS 15 beta and Xcode ↵Hiroshi SHIBATA
16 beta
2024-03-28Set ASAN_OPTIONS=disable_coredump=0 for test_execopts_rlimit testKJ Tsanaktsidis
By default, ASAN sets RLIMIT_CORE to zero, "to avoid dumping a 16T+ core file" on 64 bit systems. These tests are just asserting on the expected value of RLIMIT_CORE, not actually dumping core files, so it's fine to disable that behaviour of ASAN for this test.
2024-03-27Don't clear pending interrupts in the parent process. (#10365)Samuel Williams
2024-03-01Use `File.open` and `File.write` instead of `Kernel#open`Nobuyoshi Nakada
2024-02-04Remove TestProcess#test_low_memory_startupYusuke Endoh
It is too flaky on many platforms. Nobody is willing to fix it. Let's just stop it.
2024-01-25Use Encoding.local_charmap instead of localeHiroshi SHIBATA
In my windows environment uses cp932 for terminal encoding.
2024-01-23Rewrite Array#each in Ruby using Primitive (#9533)Takashi Kokubun
2024-01-17Omit low-memory test on old platformsNobuyoshi Nakada
2024-01-16[Bug #20184] Test for low memoryNobuyoshi Nakada
2024-01-11Prevent a warning: ambiguous first argumentYusuke Endoh
2024-01-11Add a test for what happens with concurent calls to waitpidKJ Tsanaktsidis
Ruby 3.1 and 3.2 have a bug in their _implementation_, for which I'm backporting a fix. However, the current development branch doesn't have the issue (because the MJIT -> RJIT change refactored how waitpid worked substantially). I do however want to commit the test which verifies that waitpid works properly on master. [Fixes #19387]
2023-12-29Change test_warmup_frees_pages to check each size poolPeter Zhu
This should help in debugging the intermittent test failures on CI: TestProcess#test_warmup_frees_pages [test/ruby/test_process.rb:2779]: <201> expected but was <202>.
2023-11-09String#force_encoding don't clear coderange if encoding is unchangedJean Boussier
Some code out there blind calls `force_encoding` without checking what the original encoding was, which clears the coderange uselessly. If the String is big, it can be a rather costly mistake. For instance the `rack-utf8_sanitizer` gem does this on request bodies.
2023-10-27Revert "Add debug info for flaky test_warmup_frees_pages"Peter Zhu
This reverts commit db3b814cb0ff6ffe83fe0c4f66cd6ce8951c3ca7. This debugging information is no longer needed.
2023-09-22Magical wait to get rid of deadlock on macOSNobuyoshi Nakada
2023-09-14[Bug #19868] Deprecate `Process::Status#&` and `Process::Status#>>`Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/8392
2023-09-14[Bug #19868] Suggest other Process::Status method for `&` and `>>`Nobuyoshi Nakada
`Process::Status#&` and `Process::Status#>>` are provided only for the backward compatibility with older Ruby than 1.8 where `$?` was a `Fixnum`, and the knowledge about internals of system dependent macros is necessary to use them. Modern programs and libraries should not need these methods. Notes: Merged: https://github.com/ruby/ruby/pull/8392
2023-09-14Negative value to Process::Status method for compatibilityNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/8392
2023-09-12Ensure signaled processes at opening FIFO terminatedNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/8421
2023-09-06Try to fix flaky test_warmup_frees_pagesPeter Zhu
This test sometimes fails with: ``` 1) Failure: TestProcess#test_warmup_frees_pages [test/ruby/test_process.rb:2750]: <202> expected but was <203>. ```
2023-09-04Add debug info for flaky test_warmup_frees_pagesPeter Zhu
This test sometimes fails with: ``` 1) Failure: TestProcess#test_warmup_frees_pages [test/ruby/test_process.rb:2751]: <0> expected but was <1>. ``` I'm not sure why, so add some debug info.
2023-09-01Try to fix flaky test for Process.warmupPeter Zhu
The test sometimes fails with: ``` 1) Failure: TestProcess#test_warmup_frees_pages [test/ruby/test_process.rb:2749]: <0> expected but was <1>. ``` I think there's a page with an object that needs finalization, so run GC to clear that object.
2023-09-01Fix flaky test for Process.warmupPeter Zhu
The test sometimes fails with: ``` 1) Failure: TestProcess#test_warmup_run_major_gc_and_compact [test/ruby/test_process.rb:2712]: <2> expected but was <3>. ```
2023-08-27Free all empty heap pages in Process.warmupPeter Zhu
This commit adds `free_empty_pages` which frees all empty heap pages and moves the number of pages freed to the allocatable pages counter. This is used in Process.warmup to improve performance because page invalidation from copy-on-write is slower than allocating a new page. Notes: Merged: https://github.com/ruby/ruby/pull/8257
2023-08-23Handle Array#* raising ArgumentError in testJeremy Evans
Treat ArgumentError as NoMemoryError, so it will resize the array and try again. Fixes [Bug #12500] Notes: Merged: https://github.com/ruby/ruby/pull/8270
2023-08-03Remove --disable-gems for assert_separatelyPeter Zhu
assert_separately adds --disable=gems so we don't need to add --disable-gems when calling assert_separately. Notes: Merged: https://github.com/ruby/ruby/pull/8162
2023-07-26Process.warmup: precompute strings coderangeJean Boussier
This both save time for when it will be eventually needed, and avoid mutating heap pages after a potential fork. Instrumenting some large Rails app, I've witnessed up to 58% of String instances having their coderange still unknown. Notes: Merged: https://github.com/ruby/ruby/pull/8112
2023-07-17objspace is not used in parent process [ci skip]Nobuyoshi Nakada