From: chrubis@suse.cz
To: Honggyu Kim <hong.gyu.kim@lge.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH v2] getcontext01: check getcontext function in libc
Date: Wed, 23 Oct 2013 15:32:39 +0200 [thread overview]
Message-ID: <20131023133239.GG24275@rei.Home> (raw)
In-Reply-To: <015f01cecff3$2be084e0$83a18ea0$@gyu.kim@lge.com>
Hi!
> getcontext function is implemented depends on libc version and arch.
> Some libc version for specific arch does not implement getcontext yet.
> In that case, getcontext just sets errno to ENOSYS and returns -1.
> For example, getcontext is not implemented before libc-2.17 in ARM.
> Current test goes to TFAIL when lower version of libc is used in ARM.
>
> This patch sets the test as TCONF if libc does not implement getcontext.
> If ENOSYS is not set, it goes to TFAIL as it was.
>
> Signed-off-by: Honggyu Kim <hong.gyu.kim@lge.com>
> ---
> .../kernel/syscalls/getcontext/getcontext01.c | 27
> ++++++++++++--------
> 1 file changed, 17 insertions(+), 10 deletions(-)
>
> diff --git a/testcases/kernel/syscalls/getcontext/getcontext01.c
> b/testcases/kernel/syscalls/getcontext/getcontext01.c
> index 03b2df9..34724ac 100644
> --- a/testcases/kernel/syscalls/getcontext/getcontext01.c
> +++ b/testcases/kernel/syscalls/getcontext/getcontext01.c
> @@ -54,12 +54,27 @@ int TST_TOTAL = 1;
>
> int exp_enos[] = { 0 }; /* must be a 0 terminated list */
>
> +static void test_getcontext(void)
> +{
> + ucontext_t ptr;
> +
> + TEST(getcontext(&ptr));
> +
> + if (TEST_RETURN == -1) {
> + if (errno == ENOSYS)
> + tst_resm(TCONF, "getcontext is not implemented in
> libc");
This line looks like it's line wrapped by your mail client (which
corrupts the patch). Try turning off line wrapping and/or add the patch
attached as a file.
> + else
> + tst_resm(TFAIL | TTERRNO, "getcontext failed");
> + }
> + else if (TEST_RETURN >= 0)
> + tst_resm(TPASS, "getcontext passed");
> +}
The prefered style is to have the else on the same line as the closing
curly brace.
As LTP has adopted LKML coding style, you can use chechpatch.pl (which
is shipped in scripts dir with Linux kernel sources) to theck your
patches before submission.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
prev parent reply other threads:[~2013-10-23 13:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-23 13:24 [LTP] [PATCH v2] getcontext01: check getcontext function in libc Honggyu Kim
2013-10-23 13:32 ` chrubis [this message]
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=20131023133239.GG24275@rei.Home \
--to=chrubis@suse.cz \
--cc=hong.gyu.kim@lge.com \
--cc=ltp-list@lists.sourceforge.net \
/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