Fix false FAILs on testsuite with ulimit -c unlimited.
Mark Wielaard
mjw at redhat.com
Wed Jan 15 17:20:49 UTC 2014
On Wed, 2014-01-15 at 14:19 +0100, Jan Kratochvil wrote:
> tests/test-21522/core.21602
> Core was generated by `/home/jkratoch/redhat/elfutils/tests/backtrace-child --ptraceme'.
>
> #2 0x00007f19405fb079 in main (argc=2, argv=0x7fff6d8bf1d8) at backtrace-child.c:222
> 222 abort ();
> (gdb) l
> 217 if (gencore)
> 218 pthread_join (thread, NULL);
> 219 else
> 220 raise (SIGUSR2);
> 221 /* Not reached. */
> 222 abort ();
> 223 }
> Probably obvious.
I admit it wasn't immediately obvious to me why we were letting the
child dump core in this case. The comment /* Not reached. */ is a
little misleading.
> tests/
> 2014-01-15 Jan Kratochvil <jan.kratochvil at redhat.com>
>
> Fix false FAILs on testsuite with ulimit -c unlimited.
> * backtrace.c (exec_dump): Call kill for PID.
>
> @@ -392,6 +392,7 @@ exec_dump (const char *exec)
> dwfl = pid_to_dwfl (pid);
> dump (dwfl);
> dwfl_end (dwfl);
> + kill (pid, SIGKILL);
> }
So please at least add a comment here why we are forcefully killing the
child. But I think a nicer fix would be to just let the child exit
normally after raise () returns.
Thanks,
Mark
More information about the elfutils-devel
mailing list