public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/4] lib: Redirect to tst_brk_() early
Date: Tue, 14 Feb 2017 08:18:04 -0500 (EST)	[thread overview]
Message-ID: <1949501488.4310106.1487078284316.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20170214122639.442-2-chrubis@suse.cz>



----- Original Message -----
> From: "Cyril Hrubis" <chrubis@suse.cz>
> To: ltp@lists.linux.it
> Sent: Tuesday, 14 February, 2017 1:26:37 PM
> Subject: [LTP] [PATCH 2/4] lib: Redirect to tst_brk_() early
> 
> This is first patch of a patchset that would allow us to use SAFE_MACROS() in
> newlib testcases. After the patch we redirect to tst_brk_() in case of newlib
> tests directly in the test library code.
> 
> This is needed since the tst_brkm_() from the old library is marked as
> attribute ((noreturn)) and because of that the return address is not
> saved on stack and hence we cannot return from the function. Removing
> the atrribute is not an option either since that generates ~1000
> "control reaches end of non-void function" warnings.
> 
> This commit redefines tst_brkm in test.h for the test library code so that we
> branch depending on if we are running oldlib/newlib testcase and call
> corresponding tst_brk_() or tst_brkm_() function directly instead of
> branching
> in the tst_brkm_() code.
> 
> We also had to add a few returns to various places in the test library so
> that
> we exit corresponding function in a case that tst_brkm() actually returned.
> 
> Signed-off-by: Cyril Hrubis <chrubis@suse.cz>

1/4 and 2/4 look good to me, and match exactly what we discussed.
Reply to 3/4 and 4/4 will follow shortly.

Build on RHEL5.6 6.0 and 7.3 passes, but I noticed couple additional warnings:

tst_test.c: In function ‘print_result’:
tst_test.c:175: warning: ‘res’ may be used uninitialized in this function

test08.c: In function ‘worker’:
test08.c:54: warning: control reaches end of non-void function

netstress.c: In function ‘server_fn’:
netstress.c:539: warning: control reaches end of non-void function

Regards,
Jan

  reply	other threads:[~2017-02-14 13:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-14 12:26 [LTP] [PATCH 1/4] tst_test.h, test.h: Add mutual exclusion guards Cyril Hrubis
2017-02-14 12:26 ` [LTP] [PATCH 2/4] lib: Redirect to tst_brk_() early Cyril Hrubis
2017-02-14 13:18   ` Jan Stancek [this message]
2017-02-14 13:22     ` Cyril Hrubis
2017-02-14 13:36       ` Jan Stancek
2017-02-14 12:26 ` [LTP] [PATCH 3/4] newlib: Allow SAFE_MACROS to be called from cleanup Cyril Hrubis
2017-02-14 13:23   ` Jan Stancek
2017-02-14 13:23     ` Cyril Hrubis
2017-02-14 13:52     ` Cyril Hrubis
2017-02-14 14:09       ` Jan Stancek
2017-02-14 14:11         ` Cyril Hrubis
2017-02-14 12:26 ` [LTP] [PATCH 4/4] syscalls: Make use of SAFE_MACROS in cleanup Cyril Hrubis
2017-02-14 13:49   ` Jan Stancek

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=1949501488.4310106.1487078284316.JavaMail.zimbra@redhat.com \
    --to=jstancek@redhat.com \
    --cc=ltp@lists.linux.it \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox