On 24/02/2026 15:58, Torbjorn SVENSSON wrote:
> Hi Andreas,
> 
> Thanks for your fast comment.
> 
> On 2026-02-24 16:51, Andreas Schwab wrote:
>> On Feb 24 2026, Torbjörn SVENSSON wrote:
>>
>>> diff --git a/gcc/testsuite/gcc.misc-tests/gcov-pr86536.c 
>>> b/gcc/testsuite/gcc.misc-tests/gcov-pr86536.c
>>> index febfacd9243..417c7c59b03 100644
>>> --- a/gcc/testsuite/gcc.misc-tests/gcov-pr86536.c
>>> +++ b/gcc/testsuite/gcc.misc-tests/gcov-pr86536.c
>>> @@ -1,6 +1,6 @@
>>>   // PR gcov-profile/86536
>>>   // { dg-options "-fprofile-arcs -ftest-coverage" }
>>> -// { dg-do run }
>>> +// { dg-do run { target { ! arm-none-eabi } } }
>>>   // { dg-require-fork "" }
>>
>> You should update check_fork_available instead.
>>
> 
> I was thinking about doing so, but it would effectively disable a bunch of 
> tests that only require to be able to compile/link.
> Is it desired to also limit compile test to when fork() will actually return 
> success on a target system?
> 
> Keep in mind, this is the only test case that has dg-require-fork and dg-do 
> run. All other tests that use dg-require-fork have dg-do compile.
> 
> 
> Kind regards,
> Torbjörn

How about adding a new test check_fork_runtime that uses dg_check_runtime:

#include <unistd.h>
#include <stdlib.h>

int main()
{
  pid_t p = fork();
  if (p < 0)
    abort();
  return 0;
}

Then you can change the test to

// { dg-do run { target { check_fork_runtime } } }

I don't think we need to handle waiting for the child to terminate here.

R.

Reply via email to