All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] lib/tst_test.c: Fix tst_brk() handling
Date: Fri, 4 Apr 2025 16:00:47 +0200	[thread overview]
Message-ID: <Z-_mD_6airOIpMNF@yuki.lan> (raw)
In-Reply-To: <20250404125517.GA527835@pevik>

Hi!
> Interesting, I never noticed lib_pid :). It's assigned in tst_run_tcases() -
> library gets initialized there. As that's the very first call in main(), this
> really applies for helpers in testcases/lib/ which define TST_NO_DEFAULT_MAIN.
> 
> I suppose this is the part of the fix for core dumped helpers.

The tst_run_shell.c needs to fill in the tst_test structure first and
that is done before the test library was initialized. If we happen to
call tst_brk() in that phase we have to make sure that we do not touch
the results structure, which wasn't mapped yet and that we exit() with
right exit value. After these changes, once the test library has been
initialized all processes but the test library has to exit with success
and the final exit value is produce by the test library process.

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  parent reply	other threads:[~2025-04-04 14:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-03 11:30 [LTP] [PATCH] lib/tst_test.c: Fix tst_brk() handling Cyril Hrubis
2025-04-03 12:36 ` Petr Vorel
2025-04-03 14:12   ` Cyril Hrubis
2025-04-04 12:04     ` Cyril Hrubis
2025-04-04 12:55       ` Petr Vorel
2025-04-04 12:58         ` Jan Stancek via ltp
2025-04-04 14:00         ` Cyril Hrubis [this message]
2025-04-04 13:18     ` Petr Vorel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z-_mD_6airOIpMNF@yuki.lan \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=pvorel@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.