public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH/RFC] sigaltstack02: avoid using MINSIGSTKSZ defined by glibc
@ 2014-01-13  9:39 Jan Stancek
  2014-02-18  9:43 ` Jan Stancek
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Stancek @ 2014-01-13  9:39 UTC (permalink / raw)
  To: ltp-list

The value of MINSIGSTKSZ defined by glibc can be different
as the value defined by kernel. Recent change for ppc
is now causing sigaltstack02 to fail:
https://sourceware.org/ml/libc-alpha/2013-08/msg00093.html

Use value which is low enough for all kernel versions.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
---
 .../kernel/syscalls/sigaltstack/sigaltstack02.c    |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/testcases/kernel/syscalls/sigaltstack/sigaltstack02.c b/testcases/kernel/syscalls/sigaltstack/sigaltstack02.c
index d83aa1f..98c7fd3 100644
--- a/testcases/kernel/syscalls/sigaltstack/sigaltstack02.c
+++ b/testcases/kernel/syscalls/sigaltstack/sigaltstack02.c
@@ -99,13 +99,12 @@ struct test_case_t {		/* test case struct. to hold diff. test.conds */
 } Test_cases[] = {
 	{
 	INVAL_FLAGS, SIGSTKSZ, "Invalid Flag value", EINVAL},
-#ifdef __ia64__
-	{
-	0, (131027 - 1), "alternate stack is < MINSIGSTKSZ", ENOMEM},
-#else
+	/* use value low enough for all kernel versions
+	 * avoid using MINSIGSTKSZ defined by glibc as it could be different
+	 * from the one in kernel ABI
+	 */
 	{
-	0, (MINSIGSTKSZ - 1), "alternate stack is < MINSIGSTKSZ", ENOMEM},
-#endif
+	0, (2048 - 1), "alternate stack is < MINSIGSTKSZ", ENOMEM},
 	{
 	0, 0, NULL, 0}
 };
-- 
1.7.1


------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [LTP] [PATCH/RFC] sigaltstack02: avoid using MINSIGSTKSZ defined by glibc
  2014-01-13  9:39 [LTP] [PATCH/RFC] sigaltstack02: avoid using MINSIGSTKSZ defined by glibc Jan Stancek
@ 2014-02-18  9:43 ` Jan Stancek
  2014-02-20 14:43   ` chrubis
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Stancek @ 2014-02-18  9:43 UTC (permalink / raw)
  To: ltp-list



----- Original Message -----
> From: "Jan Stancek" <jstancek@redhat.com>
> To: ltp-list@lists.sourceforge.net
> Sent: Monday, 13 January, 2014 10:39:51 AM
> Subject: [LTP] [PATCH/RFC] sigaltstack02: avoid using MINSIGSTKSZ defined by	glibc
> 
> The value of MINSIGSTKSZ defined by glibc can be different
> as the value defined by kernel. Recent change for ppc
> is now causing sigaltstack02 to fail:
> https://sourceware.org/ml/libc-alpha/2013-08/msg00093.html
> 
> Use value which is low enough for all kernel versions.
> 
> Signed-off-by: Jan Stancek <jstancek@redhat.com>
> ---

Any thoughts/ideas?

Regards,
Jan

>  .../kernel/syscalls/sigaltstack/sigaltstack02.c    |   11 +++++------
>  1 files changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/testcases/kernel/syscalls/sigaltstack/sigaltstack02.c
> b/testcases/kernel/syscalls/sigaltstack/sigaltstack02.c
> index d83aa1f..98c7fd3 100644
> --- a/testcases/kernel/syscalls/sigaltstack/sigaltstack02.c
> +++ b/testcases/kernel/syscalls/sigaltstack/sigaltstack02.c
> @@ -99,13 +99,12 @@ struct test_case_t {		/* test case struct. to hold diff.
> test.conds */
>  } Test_cases[] = {
>  	{
>  	INVAL_FLAGS, SIGSTKSZ, "Invalid Flag value", EINVAL},
> -#ifdef __ia64__
> -	{
> -	0, (131027 - 1), "alternate stack is < MINSIGSTKSZ", ENOMEM},
> -#else
> +	/* use value low enough for all kernel versions
> +	 * avoid using MINSIGSTKSZ defined by glibc as it could be different
> +	 * from the one in kernel ABI
> +	 */
>  	{
> -	0, (MINSIGSTKSZ - 1), "alternate stack is < MINSIGSTKSZ", ENOMEM},
> -#endif
> +	0, (2048 - 1), "alternate stack is < MINSIGSTKSZ", ENOMEM},
>  	{
>  	0, 0, NULL, 0}
>  };
> --
> 1.7.1
> 
> 
> ------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list
> 

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LTP] [PATCH/RFC] sigaltstack02: avoid using MINSIGSTKSZ defined by glibc
  2014-02-18  9:43 ` Jan Stancek
@ 2014-02-20 14:43   ` chrubis
  0 siblings, 0 replies; 3+ messages in thread
From: chrubis @ 2014-02-20 14:43 UTC (permalink / raw)
  To: Jan Stancek; +Cc: ltp-list

Hi!
> > The value of MINSIGSTKSZ defined by glibc can be different
> > as the value defined by kernel. Recent change for ppc
> > is now causing sigaltstack02 to fail:
> > https://sourceware.org/ml/libc-alpha/2013-08/msg00093.html
> > 
> > Use value which is low enough for all kernel versions.
> > 
> > Signed-off-by: Jan Stancek <jstancek@redhat.com>
> > ---
> 
> Any thoughts/ideas?

So they fixed the size in glibc which broke the test because the
MINSIGSTKSZ - 1 is not small enough now. I wonder if we can pass
even smaller value (zero) there and get the same result...

Anyway the change looks good to me,

Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-02-20 14:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-13  9:39 [LTP] [PATCH/RFC] sigaltstack02: avoid using MINSIGSTKSZ defined by glibc Jan Stancek
2014-02-18  9:43 ` Jan Stancek
2014-02-20 14:43   ` chrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox