[LTP] [PATCH] sched_setparam/2-1.c and sched_setparam/2-2.c

2011-12-22 Thread Song.Li
From: LiSong There is no guarantee that the LOOP of the child proecess can be certainly big enough on any device at any time. So if set_affinity function is available, use it to bind the test processes to a single CPU rather than using the LOOP. Signed-off-by: Song.Li --- .../conformance/inter

Re: [LTP] [PATCH v5 6/7] mm/zram01: verify content written to zram

2011-12-22 Thread Cyril Hrubis
Hi! > > > > Hmm, I would make sure here, that I haven't read more than SIZE > > characters. Eg. I wouldn't expect that device you are testing is null > > terminated, even if you wrote the terminating zero there. > > How about: > > while (s[i] && i < SIZE-1) { > if (s[i] != 'a') > fail++; >

Re: [LTP] [PATCH v5 6/7] mm/zram01: verify content written to zram

2011-12-22 Thread Caspar Zhang
On 12/23/2011 12:51 AM, Cyril Hrubis wrote: > Hi! >> diff --git a/testcases/kernel/mem/zram/zram01.c >> b/testcases/kernel/mem/zram/zram01.c >> index 6967bd1..38adf63 100644 >> --- a/testcases/kernel/mem/zram/zram01.c >> +++ b/testcases/kernel/mem/zram/zram01.c >> @@ -44,6 +44,7 @@ int modprobe =

Re: [LTP] [PATCH v5 2/7] mm/zram01: errno not captured

2011-12-22 Thread Cyril Hrubis
Hi! > >> Sometimes `if (access(...) && errno == ENOENT)' doesn't work due to > >> errno not captures correctly from access() exection. This patch put them > >> into 2 nested if-condition statements. > >> > >> Signed-off-by: Caspar Zhang > >> --- > >> testcases/kernel/mem/zram/zram01.c | 20

Re: [LTP] [PATCH v5 2/7] mm/zram01: errno not captured

2011-12-22 Thread Caspar Zhang
On 12/23/2011 12:44 AM, Cyril Hrubis wrote: > Hi! >> Sometimes `if (access(...) && errno == ENOENT)' doesn't work due to >> errno not captures correctly from access() exection. This patch put them >> into 2 nested if-condition statements. >> >> Signed-off-by: Caspar Zhang >> --- >> testcases/kern

Re: [LTP] [PATCH v5 6/7] mm/zram01: verify content written to zram

2011-12-22 Thread Cyril Hrubis
Hi! > diff --git a/testcases/kernel/mem/zram/zram01.c > b/testcases/kernel/mem/zram/zram01.c > index 6967bd1..38adf63 100644 > --- a/testcases/kernel/mem/zram/zram01.c > +++ b/testcases/kernel/mem/zram/zram01.c > @@ -44,6 +44,7 @@ int modprobe = 0; > > static void set_disksize(void); > static

Re: [LTP] [PATCH v5 2/7] mm/zram01: errno not captured

2011-12-22 Thread Cyril Hrubis
Hi! > Sometimes `if (access(...) && errno == ENOENT)' doesn't work due to > errno not captures correctly from access() exection. This patch put them > into 2 nested if-condition statements. > > Signed-off-by: Caspar Zhang > --- > testcases/kernel/mem/zram/zram01.c | 20 ++-- >

Re: [LTP] [PATCH] memcg_function:fix the wrong of test_proc_kill

2011-12-22 Thread Cyril Hrubis
Hi! > test_proc_kill() tests process will be killed due to exceed memory limit, but > when memcg_process exit due to mmap/munmap fails, the case still pass. > > Signed-off-by: Peng Haitao > --- > .../memcg/functional/memcg_function_test.sh| 12 +++- > 1 files changed, 11 insert

Re: [LTP] [PATCH v5 0/7] mm/zram01: fix broken testcase

2011-12-22 Thread Caspar Zhang
On 11/18/2011 05:37 PM, Caspar Zhang wrote: > Hi Cyril, Wanlong and all, > >This is the latest version of mm/zram01 testcase fixes. Current >zram01 test has mulitple issues: > >a) typo error >b) it fails to give correct behavior if zram not mounted. >c) it fails to repeat the

Re: [LTP] [PATCH] mm/swapping01: new testcase

2011-12-22 Thread Caspar Zhang
On 10/18/2011 07:02 PM, Caspar Zhang wrote: > > swapping01 - first time swap use results in heavy swapping > > This case is used for testing upstream commit: > 50a15981a1fac7e019ff7c3cba87531fb580f065 > > The upstream commit fixed a issue on s390 platform that heavy > swapping might occur in som

[LTP] [PATCH] runtest/syscalls: add getrusage04

2011-12-22 Thread Caspar Zhang
This patch adds getrusage04 test into runtest/syscalls Signed-off-by: Caspar Zhang --- runtest/syscalls | 11 ++- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/runtest/syscalls b/runtest/syscalls index 3755789..d803022 100644 --- a/runtest/syscalls +++ b/runtest/sysca

Re: [LTP] [PATCH] ext4-online-defrag: use the e4defrag from local system

2011-12-22 Thread Cyril Hrubis
Hi! > Remove the out-of-dated e4defrag prog, and use the e4defrag > we installed own. > > Note:As Kazuya said, e4defrag here is too old to defrag the > file in the latest kernel. We should use the latest e4defrag > command that is contained in e2fsprogs. So, when testing, > install the lastest e2f

Re: [LTP] [PATCH] memcg_function: delete redundant argument of check_mem_stat

2011-12-22 Thread Cyril Hrubis
Hi! > check_mem_stat() need only one argument, so the second argument is redundant. > > Signed-off-by: Peng Haitao Commited, thanks. -- Cyril Hrubis chru...@suse.cz -- Write once. Port to many. Get the SDK and tools t

Re: [LTP] [PATCH] pthread_mutex_lock/3-1: make sure install signal hanldler first

2011-12-22 Thread Cyril Hrubis
Hi! > Import a new semphore semsync2 to sync thread parent and child thread > 'th_work', so that signal handlers are installed before receive signal > USR1 and USR2. Commited, as this is better than the previous state. However the testcase implementation is quite questionable. It's trying to hamm

Re: [LTP] [PATCH 2/2] syscalls/getxattr01: new testcase to test getxattr(2) basic function

2011-12-22 Thread Cyril Hrubis
Hi! > diff --git a/runtest/syscalls b/runtest/syscalls > index 3056659..48caaae 100644 > --- a/runtest/syscalls > +++ b/runtest/syscalls > @@ -420,6 +420,8 @@ getuid02_16 getuid02_16 > getuid03 getuid03 > getuid03_16 getuid03_16 > > +getxattr01 getxattr01 > + > #Needs tty device. > #ioctl01 i

Re: [LTP] [PATCH 1/2] syscalls/setxattr01: new testcase to test setxattr(2) basic function

2011-12-22 Thread Cyril Hrubis
Hi! > diff --git a/testcases/kernel/syscalls/setxattr/setxattr01.c > b/testcases/kernel/syscalls/setxattr/setxattr01.c > new file mode 100644 > index 000..cfe5e52 > --- /dev/null > +++ b/testcases/kernel/syscalls/setxattr/setxattr01.c > @@ -0,0 +1,207 @@ > +/* > + * Copyright (C) 2011 Red Hat,

Re: [LTP] [PATCH v2] syscalls/getrusage04: new testcase

2011-12-22 Thread Cyril Hrubis
Hi! > > getrusage04 - accuracy of getrusage() with RUSAGE_THREAD > > This program is used for testing the following upstream commit: > 761b1d26df542fd5eb348837351e4d2f3bc7bffe. > > getrusage() returns cpu resource usage with accuracy of 10ms > when RUSAGE_THREAD is specified to the argument who.

Re: [LTP] [PATCH] [syscalls] getrusage04: new testcase

2011-12-22 Thread Cyril Hrubis
Hi! > while (wait--) > ; > Hmm, I do not fancy the semicolon on next line, but checkpatch doesn't seem to have problem with that... Anyway this version seems good. -- Cyril Hrubis chru...@suse.cz -- Write once. Po

Re: [LTP] [PATCH v6 2/2] mem/tunable: new testcase about overcommiting memory

2011-12-22 Thread Caspar Zhang
On 12/22/2011 03:51 PM, Caspar Zhang wrote: > On 11/15/2011 09:19 PM, Zhouping Liu wrote: >> hi, Cyril & Garrett >> >> please feel free to comment the patch. >> >> There are two tunables overcommit_memory and overcommit_ratio under >> /proc/sys/vm/, which can control memory overcommitment. >> >> Th

Re: [LTP] [PATCH] syscalls/getrusage03: fix option parsing

2011-12-22 Thread Cyril Hrubis
Hi! > On powerpc platform, getrusage03_child returns the following error > message: > > getrusage03_child1 TBROK : OPTION PARSING ERROR - parse_opts: ERROR - > Only short options are allowed > > This is because child_options[] didn't end up with a NULL array. This > patch fixes this probl

[LTP] [PATCH 2/2] syscalls/getxattr01: new testcase to test getxattr(2) basic function

2011-12-22 Thread Eryu Guan
Basic tests for getxattr(2) and make sure getxattr(2) handles error conditions correctly. There are 4 test cases: 1. Get an non-existing attribute, getxattr(2) should return -1 and set errno to ENOATTR 2. Buffer size is smaller than attribute value size, getxattr(2) should return -1 and set

[LTP] [PATCH 1/2] syscalls/setxattr01: new testcase to test setxattr(2) basic function

2011-12-22 Thread Eryu Guan
Basic tests for setxattr(2) and make sure setxattr(2) handles error conditions correctly. There are 7 test cases: 1. Any other flags being set except XATTR_CREATE and XATTR_REPLACE, setxattr(2) should return -1 and set errno to EINVAL 2. With XATTR_REPLACE flag set but the attribute does not e

Re: [LTP] [PATCH] [syscalls] getrusage04: new testcase

2011-12-22 Thread Caspar Zhang
On 07/28/2011 12:10 AM, Cyril Hrubis wrote: > Hi! >> +#define RUSAGE_THREAD 1 > > Shouldn't this be set in system headers? > > And even if not, it probably would be on newer systems so better way > should be: > > #ifndef RUSAGE_THREAD > #define RUSAGE_THREAD 1 > #endif corrected. > >> +static

[LTP] [PATCH v2] syscalls/getrusage04: new testcase

2011-12-22 Thread Caspar Zhang
getrusage04 - accuracy of getrusage() with RUSAGE_THREAD This program is used for testing the following upstream commit: 761b1d26df542fd5eb348837351e4d2f3bc7bffe. getrusage() returns cpu resource usage with accuracy of 10ms when RUSAGE_THREAD is specified to the argument who. Meanwhile, accuracy

Re: [LTP] [PATCH 0/5] Automatically mount hugetlbfs for hugemmap tests.

2011-12-22 Thread Wanlong Gao
Hi Cyril: Can you please commit this patch set? Thanks a lot -Wanlong Gao > Hi Cyril, Garrett: > > I have resend the patch set of Tang with some format fixes. > > If you have any comment with this version, please reply me, > and I'll fix and resend, otherwise, please commit them. > > > > T

Re: [LTP] [PATCH] redefine NCPU = sysconf(_SC_NPROCESSORS_CONF)

2011-12-22 Thread Garrett Cooper
On Dec 22, 2011, at 2:11 AM, Cyril Hrubis wrote: > Hi! testcase create NCPU=4 threads running with a high priority with the same sched policy and one with a low-priority. The low-priority thread should not run until the other threads stop running, unless the machine has more t

Re: [LTP] [PATCH] redefine NCPU = sysconf(_SC_NPROCESSORS_CONF)

2011-12-22 Thread Cyril Hrubis
Hi! > > > > I think using cat /proc/cpuinfo get core number is better. > > > But /proc/cpuinfo may not be supported by other OS. Yes, procfs is linux specific. -- Cyril Hrubis chru...@suse.cz -- Write once. Port to m

Re: [LTP] [PATCH] redefine NCPU = sysconf(_SC_NPROCESSORS_CONF)

2011-12-22 Thread Cyril Hrubis
Hi! > >> testcase create NCPU=4 threads running with a high priority with the same > >> sched > >> policy and one with a low-priority. The low-priority thread should not run > >> until the other threads stop running, unless the machine has more than NCPU > >processors > >> when cpu core >4,testcas

Re: [LTP] [PATCH] syscalls/getrusage03: fix option parsing

2011-12-22 Thread Wanlong Gao
On 12/22/2011 04:49 PM, Caspar Zhang wrote: > > On powerpc platform, getrusage03_child returns the following error > message: > > getrusage03_child1 TBROK : OPTION PARSING ERROR - parse_opts: ERROR - > Only short options are allowed > > This is because child_options[] didn't end up with

[LTP] [PATCH] syscalls/getrusage03: fix option parsing

2011-12-22 Thread Caspar Zhang
On powerpc platform, getrusage03_child returns the following error message: getrusage03_child1 TBROK : OPTION PARSING ERROR - parse_opts: ERROR - Only short options are allowed This is because child_options[] didn't end up with a NULL array. This patch fixes this problem. Signed-off-by:

Re: [LTP] [PATCH] mm/thp02: new testcase

2011-12-22 Thread Caspar Zhang
On 12/22/2011 04:31 PM, Caspar Zhang wrote: > > thp02 - detect mremap bug when THP is enabled. > > There was a bug in mremap THP support, sometimes crash happened > due to the following reason according to developers: > > "alloc_new_pmd was forcing the allocation of a pte before calling > move_h

[LTP] [PATCH] mm/thp02: new testcase

2011-12-22 Thread Caspar Zhang
thp02 - detect mremap bug when THP is enabled. There was a bug in mremap THP support, sometimes crash happened due to the following reason according to developers: "alloc_new_pmd was forcing the allocation of a pte before calling move_huge_page and that resulted in a VM_BUG_ON in move_huge_page

Re: [LTP] [PATCH v6 1/2] mem/lib: add vm tunable file read/write/check func

2011-12-22 Thread Caspar Zhang
On 11/15/2011 09:14 PM, Zhouping Liu wrote: > hi, Cyril & Garrett > v5 -> v6: updated the sscanf() function in read_meminfo() in order to avoid > buffer overflow. > > please feel free to comment the patch. > BTW: you would miss the patch. > > There are several vm tunable files under /proc/sys/vm

Re: [LTP] [PATCH v6 2/2] mem/tunable: new testcase about overcommiting memory

2011-12-22 Thread Caspar Zhang
On 11/15/2011 09:19 PM, Zhouping Liu wrote: > hi, Cyril & Garrett > > please feel free to comment the patch. > > There are two tunables overcommit_memory and overcommit_ratio under > /proc/sys/vm/, which can control memory overcommitment. > > The overcommit_memory contains a flag that enables me