[LTP] [PATCH] syscalls/swapon: fix for variable page size

2013-06-24 Thread Stanislav Kholmanskikh
From: Stanislav kholmanskikh stanislav.kholmansk...@oracle.com mkswap refuses files of size 10*(page size). On systems with 8192 page size swapon02, swapon03 tests fail because they try to use files of size 41920 ( 81920). Modified swapon02, swapon03 so they operate on files of size 10*(page

[LTP] [PATCH V2] syscalls/swapon: fix for variable page size

2013-07-16 Thread Stanislav Kholmanskikh
From: Stanislav kholmanskikh stanislav.kholmansk...@oracle.com lib/tst_fill_file.c: added tst_fill_file function mkswap refuses files of size 10*(page size). On systems with 8192 page size swapon02, swapon03 tests fail because they try to use files of size 41920 ( 81920). Modified swapon02

[LTP] [PATCH 1/2] tst_run_cmd: added support for stdout and stderr redirection

2013-07-19 Thread Stanislav Kholmanskikh
From: Stanislav kholmanskikh stanislav.kholmansk...@oracle.com Signed-off-by: Stanislav kholmanskikh stanislav.kholmansk...@oracle.com --- include/test.h|9 - lib/tst_run_cmd.c | 20 ++-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/include

[LTP] [PATCH 1/2] tst_run_cmd: added support for stdout and stderr redirection

2013-07-19 Thread Stanislav Kholmanskikh
From: Stanislav kholmanskikh stanislav.kholmansk...@oracle.com Signed-off-by: Stanislav kholmanskikh stanislav.kholmansk...@oracle.com --- include/test.h|9 - lib/tst_run_cmd.c | 20 ++-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/include

[LTP] [PATCH 2/2] lib/tst_module.c: modification for updated tst_run_cmd specification

2013-07-19 Thread Stanislav Kholmanskikh
From: Stanislav kholmanskikh stanislav.kholmansk...@oracle.com Modified lib/tst_module.c: * for updated tst_run_cmd specification * to hide gcc warning initialization discards qualifiers from pointer target type Signed-off-by: Stanislav kholmanskikh stanislav.kholmansk...@oracle.com --- lib

[LTP] [PATCH V3 1/2] lib/tst_fill_file.c: added tst_fill_file function

2013-07-25 Thread Stanislav Kholmanskikh
From: Stanislav kholmanskikh stanislav.kholmansk...@oracle.com Signed-off-by: Stanislav kholmanskikh stanislav.kholmansk...@oracle.com --- include/test.h | 10 +++ lib/tst_fill_file.c | 67 +++ 2 files changed, 77 insertions(+), 0

[LTP] [PATCH V3 2/2] syscalls/swapon: fix for variable page size

2013-07-25 Thread Stanislav Kholmanskikh
From: Stanislav kholmanskikh stanislav.kholmansk...@oracle.com mkswap refuses files of size 10*(page size). On systems with 8192 page size swapon02, swapon03 tests fail because they try to use files of size 41920 ( 81920). Modified swapon1, swapon02, swapon03 so they operate on files of size

[LTP] [PATCH] max_map_count: corrected max_map_count condition

2013-07-30 Thread Stanislav Kholmanskikh
From: Stanislav kholmanskikh stanislav.kholmansk...@oracle.com * kernel test for max_map_count_sysctl is: /* Too many mappings? */ if (mm-map_count sysctl_max_map_count) return -ENOMEM; so in LTP test map_count should be greater than max_map_count by 1 * only [vsyscall

[LTP] [PATCH 1/2 V2] tst_run_cmd: added support for stdout and stderr redirection

2013-08-01 Thread Stanislav Kholmanskikh
From: Stanislav kholmanskikh stanislav.kholmansk...@oracle.com Signed-off-by: Stanislav kholmanskikh stanislav.kholmansk...@oracle.com --- include/test.h|9 - lib/tst_run_cmd.c | 50 -- 2 files changed, 56 insertions(+), 3

Re: [LTP] [PATCH 1/2 V2] tst_run_cmd: added support for stdout and stderr redirection

2013-08-02 Thread Stanislav Kholmanskikh
Hi! Hi, Cyril. -if (!pid) +if (!pid) { +/* redirecting stdout and stderr if needed */ +if (stdout_path != NULL) { +child_stdout = open(stdout_path, +OPEN_FLAGS, OPEN_MODE); + +if

[LTP] [PATCH] quota_remount_test01: SELinux workaround and other fixes

2013-08-05 Thread Stanislav Kholmanskikh
From: Stanislav kholmanskikh stanislav.kholmansk...@oracle.com * now it uses tst_kvercmp (to support kernels = 3) * some distros doesn't allow creation of quota files in directories with SELinux file_t type. Now we explicitly change file type of the test directory to tmp_t Signed-off

[LTP] (no subject)

2013-08-05 Thread Stanislav Kholmanskikh
Hi! This is a little fix to run quota_remount_test01.sh with SELinux enabled. Some distros (CentOS 6.x and, likely, RHEL 6) prevent from creation of quota files in 'file_t' directories, some - don't care. I tried this fix on CentOS 5.x/6.x and Oracle Linux, Debian 7. Seems, It's ok, and

Re: [LTP] [PATCH 1/2 V2] tst_run_cmd: added support for stdout and stderr redirection

2013-08-05 Thread Stanislav Kholmanskikh
On 08/05/2013 03:33 PM, chru...@suse.cz wrote: Hi! What about passing file descriptors to function (-1 means no redirection) and create a second function on the top of it that opens the files, does the checks and the calls the tst_run_cmd? So you propose creating two functions: one will

Re: [LTP] [PATCH] max_map_count: corrected max_map_count condition

2013-08-06 Thread Stanislav Kholmanskikh
On 08/05/2013 07:41 PM, chru...@suse.cz wrote: Hi! Hi, Cyril. * kernel test for max_map_count_sysctl is: /* Too many mappings? */ if (mm-map_count sysctl_max_map_count) return -ENOMEM; Hmm, that looks like we allow the map_count to became one greater than max_map_count, is

Re: [LTP] [PATCH] max_map_count: corrected max_map_count condition

2013-08-06 Thread Stanislav Kholmanskikh
On 08/05/2013 07:16 AM, Zhouping Liu wrote: On 07/30/2013 09:47 PM, Stanislav Kholmanskikh wrote: From: Stanislav kholmanskikh stanislav.kholmansk...@oracle.com * kernel test for max_map_count_sysctl is: /* Too many mappings? */ if (mm-map_count sysctl_max_map_count) return

[LTP] [PATCH 2/2 V3] lib/tst_module.c: modification for updated tst_run_cmd specification

2013-08-06 Thread Stanislav Kholmanskikh
From: Stanislav kholmanskikh stanislav.kholmansk...@oracle.com Modified lib/tst_module.c: * for updated tst_run_cmd specification * to hide gcc warning initialization discards qualifiers from pointer target type Signed-off-by: Stanislav kholmanskikh stanislav.kholmansk...@oracle.com --- lib

[LTP] [PATCH V3] tst_run_cmd: added support for stdout and stderr redirection

2013-08-06 Thread Stanislav Kholmanskikh
Now there are two functions: tst_run_cmd() - redirects cmd's stdout/stderr to file descriptors tst_run_cmd_rdr_file() - a wrapper around tst_run_cmd(), redirects its output to files. -- Get your SQL database under

[LTP] [PATCH 1/2 V3] tst_run_cmd: added support for stdout and stderr redirection

2013-08-06 Thread Stanislav Kholmanskikh
From: Stanislav kholmanskikh stanislav.kholmansk...@oracle.com For tst_run_cmd added support for stdout/stderr redirection to a file descriptor. Added function tst_run_cmd_rdr_file which allows to redirect tst_run_cmd output to a file. Signed-off-by: Stanislav kholmanskikh stanislav.kholmansk

[LTP] [PATCH 2/2 V4] lib/tst_module.c: modification for updated tst_run_cmd specification

2013-08-06 Thread Stanislav Kholmanskikh
From: Stanislav kholmanskikh stanislav.kholmansk...@oracle.com Signed-off-by: Stanislav kholmanskikh stanislav.kholmansk...@oracle.com --- lib/tst_module.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tst_module.c b/lib/tst_module.c index 832da27..c0f2c8f

[LTP] [PATCH 1/2 V4] tst_run_cmd: added support for stdout and stderr redirection

2013-08-06 Thread Stanislav Kholmanskikh
From: Stanislav kholmanskikh stanislav.kholmansk...@oracle.com Added function tst_run_cmd_fds which allows redirection of stdout/stderr to file descriptors. Now function tst_run_cmd is a wrapper to tst_run_cmd_fds. Signed-off-by: Stanislav kholmanskikh stanislav.kholmansk...@oracle.com

Re: [LTP] [PATCH] quota_remount_test01: SELinux workaround and other fixes

2013-08-07 Thread Stanislav Kholmanskikh
On 08/05/2013 07:45 PM, chru...@suse.cz wrote: Hi! * now it uses tst_kvercmp (to support kernels = 3) * some distros doesn't allow creation of quota files in directories with SELinux file_t type. Now we explicitly change file type of the test directory to tmp_t I can't check that the

[LTP] [PATCH] tst_run_cmd: const correctness

2013-08-07 Thread Stanislav Kholmanskikh
From: Stanislav kholmanskikh stanislav.kholmansk...@oracle.com Signed-off-by: Stanislav kholmanskikh stanislav.kholmansk...@oracle.com --- include/test.h|4 ++-- lib/tst_module.c |4 ++-- lib/tst_run_cmd.c |4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git

[LTP] [PATCH V2] tst_run_cmd: const correctness

2013-08-08 Thread Stanislav Kholmanskikh
Signed-off-by: Stanislav kholmanskikh stanislav.kholmansk...@oracle.com Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- include/test.h|4 ++-- lib/tst_module.c |4 ++-- lib/tst_run_cmd.c |6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff

[LTP] [PATCH V4 2/2] syscalls/swapon: fix for variable page size

2013-08-12 Thread Stanislav Kholmanskikh
sizes. Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- testcases/kernel/syscalls/swapon/Makefile|5 ++ testcases/kernel/syscalls/swapon/libswapon.c | 48 + testcases/kernel/syscalls/swapon/libswapon.h | 34 testcases/kernel/syscalls

[LTP] [PATCH V4] syscalls/swapon: fix for variable page size

2013-08-12 Thread Stanislav Kholmanskikh
Hi! I think all the style issues are fixed. -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with

[LTP] [PATCH V4 1/2] Implemented tst_fill_file function

2013-08-12 Thread Stanislav Kholmanskikh
Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- include/test.h | 10 +++ lib/tst_fill_file.c | 67 +++ 2 files changed, 77 insertions(+), 0 deletions(-) create mode 100644 lib/tst_fill_file.c diff --git

[LTP] [PATCH] rt_sigaction: headers are included in a uniform way

2013-08-12 Thread Stanislav Kholmanskikh
Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- include/ltp_signal.h | 17 .../kernel/syscalls/rt_sigaction/rt_sigaction02.c | 21 +-- .../kernel/syscalls/rt_sigaction/rt_sigaction03.c |2 + 3

Re: [LTP] [PATCH] max_map_count: corrected max_map_count condition

2013-08-13 Thread Stanislav Kholmanskikh
On 08/06/2013 10:52 AM, Stanislav Kholmanskikh wrote: On 08/05/2013 07:41 PM, chru...@suse.cz wrote: Hi! Hi, Cyril. * kernel test for max_map_count_sysctl is: /* Too many mappings? */ if (mm-map_count sysctl_max_map_count) return -ENOMEM; Hmm, that looks like we allow

Re: [LTP] [PATCH] max_map_count: corrected max_map_count condition

2013-08-13 Thread Stanislav Kholmanskikh
On 08/14/2013 07:56 AM, Zhouping Liu wrote: On 08/13/2013 09:29 PM, Stanislav Kholmanskikh wrote: On 08/06/2013 10:52 AM, Stanislav Kholmanskikh wrote: On 08/05/2013 07:41 PM, chru...@suse.cz wrote: Hi! Hi, Cyril. * kernel test for max_map_count_sysctl is: /* Too many mappings

[LTP] [PATCH V5 2/2] syscalls/swapon: fix for variable page size

2013-08-14 Thread Stanislav Kholmanskikh
sizes. Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- testcases/kernel/syscalls/swapon/Makefile|5 ++ testcases/kernel/syscalls/swapon/libswapon.c | 48 + testcases/kernel/syscalls/swapon/libswapon.h | 34 testcases/kernel/syscalls

[LTP] [PATCH V5 1/2] Implemented tst_fill_file function

2013-08-14 Thread Stanislav Kholmanskikh
Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- include/test.h | 10 +++ lib/tst_fill_file.c | 71 +++ 2 files changed, 81 insertions(+), 0 deletions(-) create mode 100644 lib/tst_fill_file.c diff --git

[LTP] [PATCH V2] rt_sigaction: headers are included in a uniform way

2013-08-14 Thread Stanislav Kholmanskikh
Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- include/ltp_signal.h | 17 + .../kernel/syscalls/rt_sigaction/rt_sigaction02.c | 20 +--- .../kernel/syscalls/rt_sigaction/rt_sigaction03.c |1 + 3

[LTP] [PATCH] syscalls/setgroups: fix implicit SETGROUPS parameter casting

2013-08-16 Thread Stanislav Kholmanskikh
One of parameters to setgroups() syscall is (gid_t *) pointer. If TST_USE_COMPAT16_VSYSCALL is defined a pointer to GID_T is passed instead (and sizeof(GID_T) sizeof(gid_t)). It's not safe and can result in unaligned access (and SIGBUS) on several platforms. Signed-off-by: Stanislav Kholmanskikh

[LTP] [PATCH] syscalls/migrate_pages: fix nodemask memory allocation

2013-08-19 Thread Stanislav Kholmanskikh
In accordance to man migrate_pages(), mbind() the bit mask size should be rounded to next multiple of sizeof(unsigned long). Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- .../syscalls/migrate_pages/migrate_pages01.c |5 - .../syscalls/migrate_pages

Re: [LTP] [PATCH] syscalls/migrate_pages: fix nodemask memory allocation

2013-08-21 Thread Stanislav Kholmanskikh
On 08/21/2013 01:17 PM, chru...@suse.cz wrote: Hi! Hi. --- .../syscalls/migrate_pages/migrate_pages01.c |5 - .../syscalls/migrate_pages/migrate_pages02.c |5 - 2 files changed, 8 insertions(+), 2 deletions(-) diff --git

[LTP] [PATCH V2 1/3] Added ALIGN, __ALIGN_MASK macroses

2013-08-21 Thread Stanislav Kholmanskikh
Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- include/test.h |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/include/test.h b/include/test.h index d9eba31..a517ff9 100644 --- a/include/test.h +++ b/include/test.h @@ -105,6 +105,12

[LTP] [PATCH V2 3/3] lib/numa_helper.c: fix nodemask_size

2013-08-21 Thread Stanislav Kholmanskikh
Now nodemask_size is rounded up to the next multiple of sizeof(nodemask_t). Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- testcases/kernel/lib/numa_helper.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/testcases/kernel/lib

Re: [LTP] [PATCH V2 3/3] lib/numa_helper.c: fix nodemask_size

2013-08-21 Thread Stanislav Kholmanskikh
On 08/21/2013 04:29 PM, Jan Stancek wrote: - Original Message - From: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com To: ltp-list@lists.sourceforge.net Cc: vasily isaenko vasily.isae...@oracle.com, jstan...@redhat.com Sent: Wednesday, 21 August, 2013 1:54:58 PM Subject

Re: [LTP] [PATCH V2 3/3] lib/numa_helper.c: fix nodemask_size

2013-08-22 Thread Stanislav Kholmanskikh
On 08/21/2013 06:28 PM, Jan Stancek wrote: - Original Message - From: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com To: Jan Stancek jstan...@redhat.com Cc: ltp-list@lists.sourceforge.net, vasily isaenko vasily.isae...@oracle.com Sent: Wednesday, 21 August, 2013 3:22:04

[LTP] [PATCH V3 2/3] syscalls/migrate_pages: fix nodemask memory allocation

2013-08-22 Thread Stanislav Kholmanskikh
In accordance to man migrate_pages(), mbind() the bit mask size should be rounded to the next multiple of sizeof(unsigned long). Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- .../syscalls/migrate_pages/migrate_pages01.c |4 ++-- .../syscalls/migrate_pages

[LTP] [PATCH V3 3/3] lib/numa_helper.c: fix nodemask_size

2013-08-22 Thread Stanislav Kholmanskikh
Now nodemask_size is rounded up to the next multiple of sizeof(unsigned long). Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- testcases/kernel/lib/numa_helper.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/testcases/kernel/lib

[LTP] [PATCH V3 1/3] Added ALIGN, __ALIGN_MASK macroses

2013-08-22 Thread Stanislav Kholmanskikh
Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- include/test.h |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/include/test.h b/include/test.h index d9eba31..a517ff9 100644 --- a/include/test.h +++ b/include/test.h @@ -105,6 +105,12

[LTP] [PATCH V3.1 1/3] Added ALIGN, __ALIGN_MASK macros

2013-08-23 Thread Stanislav Kholmanskikh
Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- include/test.h |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/include/test.h b/include/test.h index d9eba31..a517ff9 100644 --- a/include/test.h +++ b/include/test.h @@ -105,6 +105,12

Re: [LTP] [PATCH V3 1/3] Added ALIGN, __ALIGN_MASK macroses

2013-08-23 Thread Stanislav Kholmanskikh
On 08/23/2013 11:57 AM, Jan Stancek wrote: - Original Message - From: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com To: ltp-list@lists.sourceforge.net Cc: vasily isaenko vasily.isae...@oracle.com, jstan...@redhat.com Sent: Thursday, 22 August, 2013 9:41:47 AM Subject

Re: [LTP] [PATCH] syscalls/setgroups: fix implicit SETGROUPS parameter casting

2013-08-23 Thread Stanislav Kholmanskikh
) on several platforms. Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- testcases/kernel/syscalls/setgroups/compat_16.h | 22 +++- testcases/kernel/syscalls/setgroups/setgroups04.c |6 - 2 files changed, 25 insertions(+), 3 deletions

Re: [LTP] [PATCH] syscalls/setgroups: fix implicit SETGROUPS parameter casting

2013-08-26 Thread Stanislav Kholmanskikh
On 08/23/2013 03:39 PM, chru...@suse.cz wrote: Hi! Thank you for this point. At first sight it seems that this testcase is very specific for i386 (maybe for other architectures also). In i386 I found two variants of setgroups syscall (from arch/x86/syscalls/syscall_32.tbl): 81

Re: [LTP] [PATCH] syscalls/setgroups: fix implicit SETGROUPS parameter casting

2013-08-26 Thread Stanislav Kholmanskikh
On 08/26/2013 03:30 PM, chru...@suse.cz wrote: Hi! I looked at arch/* from linux sources and prepared this table: Architecture | __NR_setgroups32 defined | __NR_setgroups defined | glibc for setgroups() invokes | alpha| | + | arm | + | + | avr32 |

Re: [LTP] [PATCH] syscalls/setgroups: fix implicit SETGROUPS parameter casting

2013-08-26 Thread Stanislav Kholmanskikh
On 08/26/2013 06:16 PM, chru...@suse.cz wrote: Hi! But we can't rely on the fact that group ids of a user invoking the testcases are fit into __old_gid_t. And the purpose of current GETGROUPS definition is to handle such cases. A situation may happen where root user is a member of a group

[LTP] [PATCH V2 2/2] syscalls/getgroups: added checks for 16-bit getgroups() syscall

2013-08-27 Thread Stanislav Kholmanskikh
getgroups01_16 and getgroups03_16 did not use 16-bit version of getgroups() syscall. Fixed this in the same manner as syscalls/setgroups. Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- testcases/kernel/syscalls/getgroups/compat_16.h | 78

[LTP] [PATCH V2 1/2] syscalls/setgroups: fix 16-bit versions of the testcases

2013-08-27 Thread Stanislav Kholmanskikh
Now 16-bit testcases are executed only if platform has corresponding 16-bit version of setgroups() syscall. Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- testcases/kernel/syscalls/setgroups/compat_16.h | 11 +-- 1 files changed, 9 insertions(+), 2

Re: [LTP] [PATCH] ltp: handle missing online file

2013-08-27 Thread Stanislav Kholmanskikh
On 08/21/2013 04:19 PM, Dave Kleikamp wrote: On 08/21/2013 01:50 AM, Jan Stancek wrote: - Original Message - From: Dave Kleikamp dave.kleik...@oracle.com To: ltp-list@lists.sourceforge.net Sent: Tuesday, 20 August, 2013 10:34:39 PM Subject: [LTP] [PATCH] ltp: handle missing

Re: [LTP] [PATCH] syscalls/setgroups: fix implicit SETGROUPS parameter casting

2013-08-27 Thread Stanislav Kholmanskikh
On 08/27/2013 03:22 PM, chru...@suse.cz wrote: Hi! But we can't rely on the fact that group ids of a user invoking the testcases are fit into __old_gid_t. And the purpose of current GETGROUPS definition is to handle such cases. A situation may happen where root user is a member of a group

[LTP] [PATCH V4 2/3] syscalls/migrate_pages: fix nodemask memory allocation

2013-08-27 Thread Stanislav Kholmanskikh
In accordance to man migrate_pages(), mbind() the bit mask size should be rounded to next multiple of sizeof(unsigned long). Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- .../syscalls/migrate_pages/migrate_pages01.c |4 ++-- .../syscalls/migrate_pages

[LTP] [PATCH V4] syscalls/migrate_pages: fix nodemask_memory_allocation

2013-08-27 Thread Stanislav Kholmanskikh
This is a V4 series of patches. Changes since V3: * Macros ALIGN, __ALIGN_MASK renamed to LTP_ALIGN, __LTP_ALIGN_MASK * Both macros are placed in compiler.h (instead of test.h) -- Introducing Performance Central, a

[LTP] [PATCH V4 3/3] lib/numa_helper.c: fix nodemask_size

2013-08-27 Thread Stanislav Kholmanskikh
Now nodemask_size is rounded up to the next multiple of sizeof(unsigned long). Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- testcases/kernel/lib/numa_helper.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/testcases/kernel/lib

[LTP] [PATCH V4 1/3] Added LTP_ALIGN, __LTP_ALIGN_MASK macros

2013-08-27 Thread Stanislav Kholmanskikh
Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- include/compiler.h |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/include/compiler.h b/include/compiler.h index ec714fe..4b41f65 100644 --- a/include/compiler.h +++ b/include/compiler.h

Re: [LTP] [PATCH V2 2/2] syscalls/getgroups: added checks for 16-bit getgroups() syscall

2013-08-28 Thread Stanislav Kholmanskikh
On 08/27/2013 04:16 PM, chru...@suse.cz wrote: Hi! Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- testcases/kernel/syscalls/getgroups/compat_16.h | 78 + testcases/kernel/syscalls/getgroups/getgroups01.c | 22 +++--- testcases

Re: [LTP] [PATCH] ltp: Fix races in mmap1

2013-08-28 Thread Stanislav Kholmanskikh
On 08/28/2013 05:07 PM, Dave Kleikamp wrote: Make map_address a volatile pointer so that it is dereferenced in read_mem() after read_lock is set. Also read_lock must protect the verbose printf that reads from map_address as well. Signed-off-by: Dave Kleikamp dave.kleik...@oracle.com diff

[LTP] [PATCH V3 2/3] fixes for 16-bit syscalls testcases

2013-08-29 Thread Stanislav Kholmanskikh
syscalls/setgroups: moved compat_16.h to ../utils. This header will be common for all 16-bit syscalls definitions. Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- testcases/kernel/syscalls/setgroups/compat_16.h | 85 -- testcases/kernel/syscalls

[LTP] [PATCH V3 1/3] syscalls/utils/compat_16.mk: fix build dependencies

2013-08-29 Thread Stanislav Kholmanskikh
If we create/modify/touch file syscalls/utils/compat_16.h and execute 'make' in any of syscalls directories which includes compat_16.mk, then nothing will happen, because this approach: %.c: $(COMPAT_16_H) is not working. Fixed this. Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk

[LTP] [PATCH V3 3/3] syscalls/getgroups: added checks for 16-bit getgroups() syscall

2013-08-29 Thread Stanislav Kholmanskikh
getgroups01_16 and getgroups03_16 did not use 16-bit versions of getgroups() syscall. Fixed this in the same manner like syscalls/setgroups. Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- testcases/kernel/syscalls/getgroups/getgroups01.c | 22

Re: [LTP] [PATCH V3 1/3] syscalls/utils/compat_16.mk: fix build dependencies

2013-09-03 Thread Stanislav Kholmanskikh
this. Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- testcases/kernel/syscalls/utils/compat_16.mk |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/testcases/kernel/syscalls/utils/compat_16.mk b/testcases/kernel/syscalls/utils

Re: [LTP] [PATCH V3 2/3] fixes for 16-bit syscalls testcases

2013-09-03 Thread Stanislav Kholmanskikh
On 09/02/2013 07:23 PM, chru...@suse.cz wrote: We can even simplify this macros. At least the innter part of SETGROUPS and GETGROUPS could be created by a single macro: COMPAT16_SYSCALL(setgroups, gitsetsize, list16) #define COMPAT16_SYSCALL(sys_name, ...) \ # ifdef

Re: [LTP] [PATCH V3 2/3] fixes for 16-bit syscalls testcases

2013-09-03 Thread Stanislav Kholmanskikh
On 09/03/2013 02:11 PM, chru...@suse.cz wrote: Hi! Sorry, but is it possible to use #ifdef or #if inside a #define macro? Right it does not, sorry. I tend to forget how dumb it the C preprocessor is. This doesn't work: #define MYDEF(NN) \ # ifdef TST_USE_COMPAT16_SYSCALL return

[LTP] [PATCH V3.1 2/2] fixes for 16-bit syscalls testcases

2013-09-03 Thread Stanislav Kholmanskikh
syscalls/setgroups: moved compat_16.h to ../utils. This header will be common for all 16-bit syscalls definitions. Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- testcases/kernel/syscalls/setgroups/compat_16.h | 85 - testcases/kernel/syscalls

[LTP] [PATCH V4 3/3] syscalls/getgroups: added checks for 16-bit getgroups() syscall

2013-09-05 Thread Stanislav Kholmanskikh
getgroups01_16 and getgroups03_16 did not use 16-bit versions of getgroups() syscall. Fixed this in the same manner like syscalls/setgroups. Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- testcases/kernel/syscalls/getgroups/getgroups01.c | 22

[LTP] [PATCH V4 2/3] fixes for 16-bit syscalls testcases

2013-09-05 Thread Stanislav Kholmanskikh
syscalls/setgroups: moved compat_16.h to ../utils. This header will be common for all 16-bit syscalls definitions. Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- testcases/kernel/syscalls/setgroups/compat_16.h | 85 - testcases/kernel/syscalls

[LTP] [PATCH V4] 16-bit syscalls fixes

2013-09-05 Thread Stanislav Kholmanskikh
Hi! Changes since V3: [PATCH 1/3]: no changes [PATCH 2/3]: * Added Oracle copyright string to syscalls/utils/compat_16.h * Fixed comment next to LTP_CREATE_SYSCALL * Used alternative variant: passing cleanup callback parameter to all caps functions. I think It looks more compact. [PATCH

[LTP] [PATCH V4 1/3] syscalls/utils/compat_16.mk: fix build dependencies

2013-09-05 Thread Stanislav Kholmanskikh
If we create/modify/touch file syscalls/utils/compat_16.h and execute 'make' in any of syscalls directories which includes compat_16.mk, then nothing will happen, because this approach: %.c: $(COMPAT_16_H) is not working. Fixed this. Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk

[LTP] 16-bit syscalls, part 1

2013-09-11 Thread Stanislav Kholmanskikh
Hi! This is part 1 of fixes for 16-bit syscalls. -- How ServiceNow helps IT people transform IT departments: 1. Consolidate legacy IT systems to a single system of record for IT 2. Standardize and globalize service

[LTP] [PATCH 1/2] getuid, getgid, setuid, setgid: fixed 16-bit versions

2013-09-11 Thread Stanislav Kholmanskikh
Fixed 16-bit versions of testcases: * getgid * getuid * setgid * setuid the way like setgroups. Testcase getuid02 in fact tests geteuid() so renamed it to geteuid02. Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- runtest/ltplite |2

[LTP] [PATCH 2/2] getegid, geteuid: fixed 16-bit versions

2013-09-11 Thread Stanislav Kholmanskikh
Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- testcases/kernel/syscalls/getegid/compat_16.h | 48 - testcases/kernel/syscalls/getegid/getegid01.c |3 +- testcases/kernel/syscalls/getegid/getegid02.c | 32 +++-- testcases

[LTP] FORK_OR_VFORK

2013-09-12 Thread Stanislav Kholmanskikh
Hello! LTP employs FORK_OR_VFORK macro which is defined as: #ifdef UCLINUX #define FORK_OR_VFORK vfork #define MAP_PRIVATE_EXCEPT_UCLINUX 0 #else #define FORK_OR_VFORK fork #define MAP_PRIVATE_EXCEPT_UCLINUX MAP_PRIVATE #endif So, on UCLINUX it is a

Re: [LTP] 16-bit syscalls, part 1

2013-09-12 Thread Stanislav Kholmanskikh
On 09/12/2013 05:41 PM, chru...@suse.cz wrote: Hi! This is part 1 of fixes for 16-bit syscalls. Pushed, thanks. Note that I've cleaned up the test sources and fixed setuid04 to use standard temp directory instread of messing up CWD. Thank you. I'm proceeding with setfs{uid,gid},

[LTP] [PATCH] setfsgid, setfsuid: clean up and 16-bit version fixes

2013-09-13 Thread Stanislav Kholmanskikh
Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- testcases/kernel/syscalls/setfsgid/setfsgid01.c | 97 testcases/kernel/syscalls/setfsgid/setfsgid02.c | 95 testcases/kernel/syscalls/setfsgid/setfsgid03.c | 118 ++- testcases

Re: [LTP] [PATCH] setfsgid, setfsuid: clean up and 16-bit version fixes

2013-09-17 Thread Stanislav Kholmanskikh
On 09/16/2013 07:18 PM, chru...@suse.cz wrote: Hi! Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- testcases/kernel/syscalls/setfsgid/setfsgid01.c | 97 testcases/kernel/syscalls/setfsgid/setfsgid02.c | 95 testcases/kernel

[LTP] [PATCH] syscalls/getgroups: use TCID_DEFINE

2013-09-17 Thread Stanislav Kholmanskikh
Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- testcases/kernel/syscalls/getgroups/getgroups01.c |2 +- testcases/kernel/syscalls/getgroups/getgroups03.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/testcases/kernel/syscalls/getgroups

Re: [LTP] Policy regarding BASH

2013-09-19 Thread Stanislav Kholmanskikh
On 09/19/2013 04:47 PM, Stanislav Kholmanskikh wrote: Hi! During looking into shell testcases I came across a situation where * main shell script is a bash script (ie it has #!/bin/bash in the header) * for each testcase number main shell script executes a separate (child) shell-script

[LTP] [PATCH 1/7] controllers/cpuset: removed bash sweetnesses

2013-09-26 Thread Stanislav Kholmanskikh
Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- .../cpuset_base_ops_testset.sh | 12 ++-- .../cpuset_exclusive_test/cpuset_exclusive_test.sh |6 +- .../kernel/controllers/cpuset/cpuset_funcs.sh |2 +- .../cpuset_hierarchy_test

[LTP] cpuset controller fixes

2013-09-26 Thread Stanislav Kholmanskikh
Hi! I have very limited access to real hardware with 4 NUMA nodes. So most of these fixes were checked with numa=fake=4 kernel cmdline. It would be great if somebody verified it on real hardware. And: 1. What do you think about idea of assigning to each cpuset controller test a separate

[LTP] [PATCH 7/7] cpuset/cpuset_load_balance_test: fixes

2013-09-26 Thread Stanislav Kholmanskikh
Fixed lack of '#include config.h', perform some cleanup and set nr_cpus, nr_mems based on environment. Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- .../cpuset_load_balance_test/cpuset_cpu_hog.c | 16 .../cpuset_load_balance_test.sh

[LTP] [PATCH 5/7] cpuset/cpuset_memory_test: fixes

2013-09-26 Thread Stanislav Kholmanskikh
to a value of 2 is not sufficient. Because there is no guarantee that these hugepages will be allocated on the specified node * cleanup and several typos are fixed Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- .../cpuset/cpuset_memory_test/cpuset_memory_test.c | 31

[LTP] [PATCH 6/7] cpuset_memory_spread_test: number of nodes and sleep timeout

2013-09-26 Thread Stanislav Kholmanskikh
For unification number of nodes is set based on environment. I've not found a better way to guarantee dropping of caches than just increasing sleep timeout twice (to 20 seconds). Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- .../cpuset_memory_spread_testset.sh

[LTP] [PATCH 2/7] cpuset/cpuset_base_ops_test: fix expected error

2013-09-26 Thread Stanislav Kholmanskikh
At least since kernel 3.0.0 writing '0-' to $CPUSET/N/{cpus, mems} files doesn't raise an error. Reading content of these files after writing gives '0'. Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- .../cpuset_base_ops_testset.sh | 16

[LTP] [PATCH 4/7] cpuset/cpuset_lib: cpuinfo.c compiled incorrectly

2013-09-26 Thread Stanislav Kholmanskikh
Because of lack of '#include config.h' cpuinfo.c file was compiled incorrectly (i.e. final lib libcpu_set.a didn't contain the functions/variables from cpuinfo.c) Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- .../kernel/controllers/cpuset/cpuset_lib/cpuinfo.c |1

[LTP] [PATCH 3/7] cpuset/cpuset_syscall_test: fixes

2013-09-26 Thread Stanislav Kholmanskikh
stack anon=5 dirty=5 N2=4 N3=1 So modified a check in test 10 and removed unnessesary checks for default memory policy from tests 14, 15, 16. Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- .../cpuset/cpuset_syscall_test/Makefile|1

Re: [LTP] [PATCH 6/7] cpuset_memory_spread_test: number of nodes and sleep timeout

2013-09-26 Thread Stanislav Kholmanskikh
On 09/26/2013 04:06 PM, chru...@suse.cz wrote: Hi! For unification number of nodes is set based on environment. I've not found a better way to guarantee dropping of caches than just increasing sleep timeout twice (to 20 seconds). Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk

[LTP] [PATCH] tools: added tst_kvercmp2 binary

2013-09-27 Thread Stanislav Kholmanskikh
Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- tools/apicmds/.gitignore |1 + tools/apicmds/Makefile|4 +- tools/apicmds/ltpapicmd.c | 81 - 3 files changed, 83 insertions(+), 3 deletions(-) diff --git

[LTP] [PATCH V2 5/7] cpuset/cpuset_memory_test: fixes

2013-09-27 Thread Stanislav Kholmanskikh
resources * setting nr_hugepages to a value of 2 is not sufficient. Because there is no guarantee that these hugepages will be allocated on the specified node * cleanup and several typos are fixed Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- .../cpuset

[LTP] [PATCH] controllers/cpuset: reogranization

2013-09-30 Thread Stanislav Kholmanskikh
Renamed cpuset01 to cpuset12. A separate name (from cpuset01 to cpuset11) is assigned to each cpuset shell testcase (which was invoked earlier by run_cpuset_test.sh). This will simplify results analysis. Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- runtest

Re: [LTP] [PATCH 6/7] cpuset_memory_spread_test: number of nodes and sleep timeout

2013-09-30 Thread Stanislav Kholmanskikh
On 09/26/2013 06:06 PM, chru...@suse.cz wrote: Hi! If I remove this sleep and perform two sequential runs I get this error: root@debian7-x64:/opt/ltp/testcases/bin# ./cpuset_memory_spread_testset.sh 100+0 records in 100+0 records out 104857600 bytes (105 MB) copied, 0.0595533 s, 1.8 GB/s

Re: [LTP] [PATCH 6/7] cpuset_memory_spread_test: number of nodes and sleep timeout

2013-09-30 Thread Stanislav Kholmanskikh
On 09/30/2013 12:45 PM, Stanislav Kholmanskikh wrote: On 09/26/2013 06:06 PM, chru...@suse.cz wrote: Hi! If I remove this sleep and perform two sequential runs I get this error: root@debian7-x64:/opt/ltp/testcases/bin# ./cpuset_memory_spread_testset.sh 100+0 records in 100+0 records out

[LTP] [PATCH V2 6/7] cpuset_memory_spread_test: number of nodes and sync

2013-09-30 Thread Stanislav Kholmanskikh
For unification number of nodes is set based on environment. In accordance to Documentation/sysctl/vm.txt to reliably drop caches we should invoke 'sync' before 'echo N /proc/sys/vm/drop_caches'. Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com

Re: [LTP] [PATCH 6/7] cpuset_memory_spread_test: number of nodes and sleep timeout

2013-09-30 Thread Stanislav Kholmanskikh
On 09/30/2013 05:04 PM, chru...@suse.cz wrote: Hi! Hmmm, Mems_allowed* content of /proc/$test_pid/status before sending SIGUSR1 to $test_pid is: Mems_allowed:,0001 Mems_allowed_list:0 cpuset111 TFAIL : hog the memory on the unexpected

[LTP] [PATCH V2] tools: added tst_kvercmp2 binary

2013-10-01 Thread Stanislav Kholmanskikh
Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- tools/apicmds/.gitignore |1 + tools/apicmds/Makefile|4 +- tools/apicmds/ltpapicmd.c | 83 +++-- 3 files changed, 83 insertions(+), 5 deletions(-) diff --git

Re: [LTP] [PATCH] tools: added tst_kvercmp2 binary

2013-10-01 Thread Stanislav Kholmanskikh
On 09/30/2013 08:34 PM, chru...@suse.cz wrote: Hi! Hi! You don't have to copy the argv[3] string, you are allowed to modify it by the C standard. Sent V2 version. Well the whole ltpapicmd.c code is a bit hairy. I would personaly like to see the main being split into functions but that may

Re: [LTP] [PATCH] controllers/cpuset: reogranization

2013-10-01 Thread Stanislav Kholmanskikh
On 09/30/2013 06:17 PM, chru...@suse.cz wrote: Hi! Renamed cpuset01 to cpuset12. I slightly preffere to keep the test ids constant if possible. Note that there are databases of test results used for comparsions and changing the test ids would confuse such systems. I agree. So in this case

[LTP] [PATCH V3 1/2] tools: added tst_kvercmp2 binary

2013-10-01 Thread Stanislav Kholmanskikh
Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- tools/apicmds/.gitignore |1 + tools/apicmds/Makefile|4 +- tools/apicmds/ltpapicmd.c | 77 +++-- 3 files changed, 77 insertions(+), 5 deletions(-) diff --git

[LTP] [PATCH V3 2/2] ltpapicmd.c: split main into separate functions

2013-10-01 Thread Stanislav Kholmanskikh
Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- tools/apicmds/ltpapicmd.c | 339 + 1 files changed, 189 insertions(+), 150 deletions(-) diff --git a/tools/apicmds/ltpapicmd.c b/tools/apicmds/ltpapicmd.c index f74ffca

[LTP] [PATCH V2 8/8] controllers/cpuset: reorganization

2013-10-01 Thread Stanislav Kholmanskikh
A separate name (from controller_cpuset01 to controller_cpuset11) is assigned to each cpuset shell testcase (which was invoked earlier by run_cpuset_test.sh). This will simplify results analysis. Signed-off-by: Stanislav Kholmanskikh stanislav.kholmansk...@oracle.com --- runtest/controllers

  1   2   3   4   5   >