[LTP] [PATCH v4] pthread_cond_brodcast/1-2.c hung when mem left is not enough

2012-08-09 Thread DAN LI
pthread_cond_brodcast/1-2.c try to create as many childrens(thread or process) as possible,however,if current free memory is exhausted before all childrens are started,the case will timeout and hung since it's stated with program "t0". The patch adjust count of childrens according to judgement o

Re: [LTP] [PATCH resend 0/6] NUMA and follow-up fix

2012-08-09 Thread Zhouping Liu
On 08/10/2012 11:28 AM, Caspar Zhang wrote: > On 08/10/2012 11:12 AM, Zhouping Liu wrote: >> Hi, >> >> On 08/09/2012 02:15 PM, Caspar Zhang wrote: >>> Resending the whole patch series (including Jan's 2 patches) for easier >>> reviewing. >> >> Caspar, after applying the patch set, I met the bellow

Re: [LTP] [PATCH resend 0/6] NUMA and follow-up fix

2012-08-09 Thread Caspar Zhang
On 08/10/2012 11:12 AM, Zhouping Liu wrote: > Hi, > > On 08/09/2012 02:15 PM, Caspar Zhang wrote: >> Resending the whole patch series (including Jan's 2 patches) for easier >> reviewing. > > Caspar, after applying the patch set, I met the bellow compiling error > when do 'make install': > > ... sn

[LTP] [PATCH resend 4/6 v2] numa_helper: move to libkerntest

2012-08-09 Thread Caspar Zhang
libnuma_helper could be used by testcases both under syscalls/ and mem/, it's better to add a new common lib in their parent dir, so I created libkerntest under testcases/kernel/lib/, and put numa_helper to it. In the future, we can add more APIs to it. Signed-off-by: Caspar Zhang --- testcases

Re: [LTP] [PATCH resend 0/6] NUMA and follow-up fix

2012-08-09 Thread Zhouping Liu
Hi, On 08/09/2012 02:15 PM, Caspar Zhang wrote: Resending the whole patch series (including Jan's 2 patches) for easier reviewing. Caspar, after applying the patch set, I met the bellow compiling error when do 'make install': ... snip ... make[4]: Leaving directory `/root/ltp_new/testcases

Re: [LTP] [PATCH 1/6] /lib/tst_tmpdir indentation and coding style fixes

2012-08-09 Thread Wanlong Gao
On 08/10/2012 01:36 AM, Marios Makris wrote: > Identation and coding style fixes as well as moved the function descriptions > to the header file (/include/test.h) > > Signed-off-by: Marios Makris > --- > include/test.h | 26 +++ > lib/tst_tmpdir.c | 97 > ++

[LTP] [PATCH 5/6] /lib/tst_tmpdir.c removed the TDIRECTORY part

2012-08-09 Thread Marios Makris
After recent question to the list, it seems that the TDIRECTORY PART is not used by anyone, therefore it is removed. Signed-off-by: Marios Makris --- lib/tst_tmpdir.c | 93 -- 1 file changed, 28 insertions(+), 65 deletions(-) diff --git a/li

[LTP] [PATCH 1/6] /lib/tst_tmpdir indentation and coding style fixes

2012-08-09 Thread Marios Makris
Identation and coding style fixes as well as moved the function descriptions to the header file (/include/test.h) Signed-off-by: Marios Makris --- include/test.h | 26 +++ lib/tst_tmpdir.c | 97 ++ 2 files changed, 58 insertio

[LTP] [PATCH 3/6] /lib/tst_tmpdir.c removed mkstemp method

2012-08-09 Thread Marios Makris
Removed the mkstemp method keeping only the mkdtemp since it was added in glibc in 2000, therefore it should be available in every linux distro. Signed-off-by: Marios Makris --- lib/tst_tmpdir.c | 37 - 1 file changed, 37 deletions(-) diff --git a/lib/tst_t

[LTP] [PATCH 4/6] /lib/tst_tmpdir.c removed / and * checks

2012-08-09 Thread Marios Makris
These checks are implemented in the rmobj.c file therefore there is no need to repeat them here since rmobj() is called for deletions. Signed-off-by: Marios Makris --- lib/tst_tmpdir.c | 17 - 1 file changed, 17 deletions(-) diff --git a/lib/tst_tmpdir.c b/lib/tst_tmpdir.c ind

[LTP] [PATCH 6/6] V3 /lib/tst_tmpdir Implemented a simple testcase.

2012-08-09 Thread Marios Makris
Simple testcase to check the correct functionality of the tst_tmpdir.c file. Also removed the Unit test blocks from the tst_tmdir.c. Signed-off-by: Marios Makris --- lib/tests/tst_tmpdir_test.c | 83 +++ lib/tst_tmpdir.c| 50 ---

[LTP] [PATCH 2/6] Add mkdtemp check.

2012-08-09 Thread Marios Makris
From: Cyril Hrubis Added an m4 macro checking for mkdtemp() Signed-off-by: Cyril Hrubis Signed-off-by: Marios Makris --- configure.ac |1 + m4/ltp-mkdtemp.m4 |2 ++ 2 files changed, 3 insertions(+) create mode 100644 m4/ltp-mkdtemp.m4 diff --git a/configure.ac b/configure.ac in

Re: [LTP] [PATCH resend 3/6] syscalls/numa: check syscall availability

2012-08-09 Thread Caspar Zhang
On 08/09/2012 05:22 PM, Jan Stancek wrote: > Caspar, > > I think what Garrett meant was something like this: > /* check if syscall is supported, syscall() here is macro from > linux_syscall_numbers.h */ > syscall(__NR_get_mempolicy, NULL, NULL, 0, NULL, 0); > > linux_syscall_numbers.h defines a ma

[LTP] [PATCH resend v2 3/6] syscalls/numa: check syscall availability

2012-08-09 Thread Caspar Zhang
some NUMA related syscalls: mbind, get_mempolicy are not supported on some arches (e.g. i386), this patch checks the syscalls' availability in setup() function by using the macro syscall() implemented in linux_syscall_numbers.h, if the syscall is not implemented on the system, a TCONF message will

[LTP] [PATCH 1/3] pthread_cond_signal/1-1: use sched_yield to sync threads

2012-08-09 Thread Kang Kai
This case fails on mips board routerstation randomly. The root cause is that when main thread call usleep(100) after signal the child threads, no child thread is scheduled to run. So the case fails. I update it to set main thread with a lower priority and child threads with a higher one, then cal

[LTP] [PATCH 3/3] timer_settime/5-3: fix test hung

2012-08-09 Thread Kang Kai
This case hangs on sugarbay(intel x86_64) platform. The root cause is that the case calls timer_settime with time which already took place and then calls sleep. When the timer expires and sends signal the sleep will be break. But on sugarbay the timer always expires before the case enters sleep,

[LTP] [PATCH 2/3] mq_open/16-1: use tmp file to share info

2012-08-09 Thread Kang Kai
In this test case, it uses a variable to share data between child and parent processes. But after fork there is a copy of the variable in child process and modify it will not affect the variable in the parent process. Then when the child process call mq_open() before parent process, the case will f

[LTP] Patches for posix test cases

2012-08-09 Thread Kang Kai
Hi all, The first two patches are resent because no reply for now. The third patch is for timer_settime/5-3.c. In this case the timer always expires before the caller enters sleep. So it sleeps too long time to be reported hang. Decrease the sleep value to fix it. Regards, Kai ---

Re: [LTP] [PATCH resend 0/6] NUMA and follow-up fix

2012-08-09 Thread Jan Stancek
Caspar, thanks for putting it all together. I tested it on x86_64 with and without libnuma-devel. Applies cleanly, I didn't notice anything broken while running modified testcases. Patches 1,2,4,5 look good to me. Patch 3 - I replied to this one already (no functional issue with this version) Pat

Re: [LTP] [PATCH resend 3/6] syscalls/numa: check syscall availability

2012-08-09 Thread Jan Stancek
Caspar, I think what Garrett meant was something like this: /* check if syscall is supported, syscall() here is macro from linux_syscall_numbers.h */ syscall(__NR_get_mempolicy, NULL, NULL, 0, NULL, 0); linux_syscall_numbers.h defines a macro "syscall", which checks for ENOSYS. Regards, Jan --