Garrett Cooper | 1 Feb 2011 10:20
Picon
Gravatar

Re: [PATCH] the very last patch for timer_create

On Jan 31, 2011, at 10:58 AM, Cyril Hrubis wrote:

> Hi!
> For some reason timer_create/11-1.c is missing call for reading time
> into ts_start, which is the reason for the tescase to fail. Patch is
> attached.

Committed -- thanks!
-Garrett

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
Cyril Hrubis | 4 Feb 2011 18:05
Picon

[PATCH] style guide note about writing signal handlers

Hi!
Patch with note about writing signal handlers attached.

Garrett feel free to rewrite it to match the rest of the style guide.

Signed-off-by: Cyril Hrubis <chrubis@...>

--

-- 
Cyril Hrubis
chrubis@...
Attachment (style_guide.patch): text/x-patch, 721 bytes
------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb
_______________________________________________
Ltp-list mailing list
Ltp-list@...
https://lists.sourceforge.net/lists/listinfo/ltp-list
Garrett Cooper | 4 Feb 2011 18:44
Picon
Gravatar

Re: [PATCH] style guide note about writing signal handlers

On Fri, Feb 4, 2011 at 9:05 AM, Cyril Hrubis <chrubis@...> wrote:
> Hi!
> Patch with note about writing signal handlers attached.
>
> Garrett feel free to rewrite it to match the rest of the style guide.

Patch is fine minus one typo (s/singal/signal/). The more complicated
part is that the majority of our libltp based infrastructure does use
non-async safe functions in signal handlers to crash and burn
testcases (tst_sig is built on tst_brkm, which uses fprintf, fflush,
etc).

I agree with you that doing stuff in signal handlers is non-kosher,
and some testcases should be fixed, but some concession might need to
be made for the crash and burn logic in other testcases and the
infrastructure proper.

Thanks for the suggestion :)!
-Garrett

------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb
Cyril Hrubis | 7 Feb 2011 13:50
Picon

Re: [PATCH] style guide note about writing signal handlers

Hi!
> > Patch with note about writing signal handlers attached.
> >
> > Garrett feel free to rewrite it to match the rest of the style guide.
> 
> Patch is fine minus one typo (s/singal/signal/). The more complicated
> part is that the majority of our libltp based infrastructure does use
> non-async safe functions in signal handlers to crash and burn
> testcases (tst_sig is built on tst_brkm, which uses fprintf, fflush,
> etc).

Well yes the libltp interface is far too complicated and would probably
gain from simplification, it would be much easier to do it correctly
then.  The real problem is a number of testcases using it.

The downside of signal handler and non-async safe functions is that you
will never know, when they fail, they usually fail with relatively small
probability and on some system they run just fine, because of different
libc internals etc. Such behaviour often results in false-possitive
regressions. And the only way to avoid this is not to complicate your
signal handler.

If I remember correctly the problem with printf is that it may use
malloc for allocating the buffer, that if called, while there is malloc
or free running in the main loop, could cause problems. Which is not
likely, at least most of the time.

> I agree with you that doing stuff in signal handlers is non-kosher,
> and some testcases should be fixed, but some concession might need to
> be made for the crash and burn logic in other testcases and the
(Continue reading)

Will Deacon | 7 Feb 2011 15:28
Favicon

[PATCH] Fix rt_sigtimedwait ordering test

The rt_sigtimedwait test invokes test_masked_matching_rt, which
spawns two children who send consecutive RT signals to the parent.
The test then checks (via sigwaitinfo) that the RT signals are
delivered in the correct order: namely that the lower signal is taken
first.

This test can fail due to a race condition where the parent issues
the sigwaitinfo syscall before the first child has signalled the
parent but after the second child has (due to context switching).
This results in the signals being received in the reverse order.

This patch inserts waitpid syscalls to the parent thread so that the
sigwaitinfo call is only issued after the children have exited.

Signed-off-by: Will Deacon <will.deacon@...>
---
 .../kernel/syscalls/sigwaitinfo/sigwaitinfo01.c    |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c b/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
index c0e0241..439dfb3 100644
--- a/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
+++ b/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
 <at>  <at>  -232,6 +232,7  <at>  <at>  void test_masked_matching_rt(swi_func sigwaitinfo, int signo)
 	sigset_t sigs, oldmask;
 	siginfo_t si;
 	pid_t child[2];
+	int status;

 	signo = SIGRTMIN+1;
(Continue reading)

Han Pingtian | 10 Feb 2011 08:23
Picon
Favicon

[PATCH] Fix disable set_ftrace_pid in ftrace_set_ftrace_pid.sh

It seems we need echo -1 to set_ftrace_pid to disable in. Or we'll get
these error message when running ftrace_stress:

...
ftrace_stress_test/ftrace_stress/ftrace_set_ftrace_pid.sh: line 39: echo: write error: Invalid argument
...
---
 .../ftrace_stress/ftrace_set_ftrace_pid.sh         |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git
a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_ftrace_pid.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_ftrace_pid.sh
index 541215c..bd08f04 100755
--- a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_ftrace_pid.sh
+++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_ftrace_pid.sh
 <at>  <at>  -36,7 +36,7  <at>  <at>  for ((; ; ))
 			eval echo $str >> "$TRACING_PATH"/set_ftrace_pid
 		}

-		echo > "$TRACING_PATH"/set_ftrace_pid
+		echo -1 > "$TRACING_PATH"/set_ftrace_pid
 	}

 	sleep 1
--

-- 
1.7.1

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
(Continue reading)

Han Pingtian | 10 Feb 2011 09:52
Picon
Favicon

[PATCH] Fix build of cpuset_syscall_test

cpuset_syscall_test now depends on numa lib:

make[1]: Entering directory `/root/ltp/testcases/kernel/controllers/cpuset/cpuset_syscall_test'
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall  -I/root/ltp/testcases/kernel/include
-I../../../../../include -I../../../../../include  
-L/root/ltp/testcases/kernel/controllers/cpuset/cpuset_syscall_test/../cpuset_lib
-L/root/ltp/testcases/kernel/controllers/cpuset/cpuset_syscall_test/../../libcontrollers
-L../../../../../lib  cpuset_syscall_test.c   -lltp -lcpu_set -lcontrollers -lltp -o
cpuset_syscall_test
/root/ltp/testcases/kernel/controllers/cpuset/cpuset_syscall_test/../cpuset_lib/libcpu_set.a(libcpuset.o):
In function `cpuset_addr2node':
/root/ltp/testcases/kernel/controllers/cpuset/cpuset_lib/libcpuset.c:3455: undefined
reference to
`get_mempolicy'
/root/ltp/testcases/kernel/controllers/cpuset/cpuset_syscall_test/../cpuset_lib/libcpu_set.a(libcpuset.o):
In function `cpuset_membind':
/root/ltp/testcases/kernel/controllers/cpuset/cpuset_lib/libcpuset.c:3439: undefined
reference to
`set_mempolicy'
/root/ltp/testcases/kernel/controllers/cpuset/cpuset_syscall_test/../cpuset_lib/libcpu_set.a(libcpuset.o):
In function `cpuset_unpin':
/root/ltp/testcases/kernel/controllers/cpuset/cpuset_lib/libcpuset.c:3752: undefined
reference to `set_mempolicy'
collect2: ld returned 1 exit status
make[1]: *** [cpuset_syscall_test] Error 1
make[1]: Leaving directory `/root/ltp/testcases/kernel/controllers/cpuset/cpuset_syscall_test'
make: *** [all] Error 2

This patch fixes this problem

(Continue reading)

Garrett Cooper | 10 Feb 2011 16:55
Picon
Gravatar

Re: [PATCH] Fix build of cpuset_syscall_test

On Thu, Feb 10, 2011 at 12:52 AM, Han Pingtian <phan@...> wrote:
> cpuset_syscall_test now depends on numa lib:
>
> make[1]: Entering directory `/root/ltp/testcases/kernel/controllers/cpuset/cpuset_syscall_test'
> gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall  -I/root/ltp/testcases/kernel/include
-I../../../../../include -I../../../../../include  
-L/root/ltp/testcases/kernel/controllers/cpuset/cpuset_syscall_test/../cpuset_lib
-L/root/ltp/testcases/kernel/controllers/cpuset/cpuset_syscall_test/../../libcontrollers
-L../../../../../lib  cpuset_syscall_test.c   -lltp -lcpu_set -lcontrollers -lltp -o cpuset_syscall_test
>
/root/ltp/testcases/kernel/controllers/cpuset/cpuset_syscall_test/../cpuset_lib/libcpu_set.a(libcpuset.o):
In function `cpuset_addr2node':
> /root/ltp/testcases/kernel/controllers/cpuset/cpuset_lib/libcpuset.c:3455: undefined
reference to `get_mempolicy'
>
/root/ltp/testcases/kernel/controllers/cpuset/cpuset_syscall_test/../cpuset_lib/libcpu_set.a(libcpuset.o):
In function `cpuset_membind':
> /root/ltp/testcases/kernel/controllers/cpuset/cpuset_lib/libcpuset.c:3439: undefined
reference to `set_mempolicy'
>
/root/ltp/testcases/kernel/controllers/cpuset/cpuset_syscall_test/../cpuset_lib/libcpu_set.a(libcpuset.o):
In function `cpuset_unpin':
> /root/ltp/testcases/kernel/controllers/cpuset/cpuset_lib/libcpuset.c:3752: undefined
reference to `set_mempolicy'
> collect2: ld returned 1 exit status
> make[1]: *** [cpuset_syscall_test] Error 1
> make[1]: Leaving directory `/root/ltp/testcases/kernel/controllers/cpuset/cpuset_syscall_test'
> make: *** [all] Error 2
>
> This patch fixes this problem
(Continue reading)

Bian Naimeng | 11 Feb 2011 10:32
Favicon

[POSIX][PATCH]fix mmap/31-1 test

If len is too large, mmap may return ENOMEM, so we should set a less
value to it.

Signed-off-by: Bian Naimeng <biannm@...>

---
 .../conformance/interfaces/mmap/31-1.c             |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/31-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/31-1.c
index 86ff0a0..2dbb81c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/31-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/31-1.c
 <at>  <at>  -71,12 +71,7  <at>  <at>  int main()
    * FIXME: We assume maximum offset is ULONG_MAX
    * */

-  len = ULONG_MAX;
-  if (len % page_size)
-  {
-    /* Lower boundary */
-    len &= ~(page_size - 1);
-  }
+  len = page_size * 2;

   off = ULONG_MAX;
   if (off % page_size)
 <at>  <at>  -103,4 +98,4  <at>  <at>  int main()
   close (fd);
   munmap (pa, len);
(Continue reading)

Caspar Zhang | 11 Feb 2011 16:45
Picon
Favicon

Re: [PATCH] fix mail02,03 fail due to different sender names

On 01/29/2011 01:41 AM, Caspar Zhang wrote:
> Hi all, mail02 and mail03 tests non-existed host and non-existed
> username in the test. However in some systems (at least in RHEL6),
> they both fails because of the sender name of the returned letter is
> "Mail Deliver System" instead of "Mail Delivery Subsys", which makes RC1
> to be zero and fail the test. The patch fixes this issue.

Garrett, any objection merging it to upstream?

> 
> Signed-off-by: Caspar Zhang <czhang <at> redhat.com>
> ---
>  testcases/commands/mail/mail_tests.sh |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/testcases/commands/mail/mail_tests.sh
> b/testcases/commands/mail/mail_tests.sh
> index 53a5d90..c30e2c3 100755
> --- a/testcases/commands/mail/mail_tests.sh
> +++ b/testcases/commands/mail/mail_tests.sh
>  <at>  <at>  -169,7 +169,7  <at>  <at>  else
>  		RC1=$(awk '/^>N/ {IGNORECASE=1; print match($3, "Mailer-Daemon")}' \
>  		    $LTPTMP/tst_mail.res)
>  	else
> -		RC1=$(awk '/^>N/ {IGNORECASE=1; print match($3 $4 $5,
> "MailDeliverySubsys")}' \
> +		RC1=$(awk '/^>N/ {IGNORECASE=1; print match($3 $4 $5,
> "MailDelivery(Subsys|System)")}' \
>  		    $LTPTMP/tst_mail.res)
>  	fi
(Continue reading)


Gmane