• Home
  • History
  • Annotate
  • only in /external/ltp/testcases/kernel/controllers/
History log of /external/ltp/testcases/kernel/controllers/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5eca7e63c48f85c59486da4abd803b7ac9aed4b7 14-Jun-2017 Sandeep Patil <sspatil@google.com> Upgrade to LTP 20170516

A short log of commits merged as part of this is available in
Merge list

New disabled tests due to failure to build:
setpriority01
prot_hsymlinks

New configuration(s) added in android/include/config.h:
HAVE_SYS_XATTR_H

Following new tests take too long and shall be disabled in VtsLtp
dio.dio29
dio.dio30

Following shows the difference in testcases that will be run by 'vts':

Deleted Tests Added Tests
------------------------------------------
syscalls.socket03 syscalls.dirtyc0w
syscalls.msgget04 syscalls.madvise07
syscalls.access06 syscalls.madvise08
syscalls.access05 syscalls.madvise09
syscalls.msgsnd04 syscalls.flistxattr03
syscalls.setpriority05 syscalls.flistxattr02
syscalls.setpriority04 syscalls.flistxattr01
syscalls.nice05 syscalls.sendto02
syscalls.umask02 syscalls.getxattr04
syscalls.umask03 syscalls.memfd_create02
syscalls.setpriority03 syscalls.ioctl04
syscalls.msgsnd03 syscalls.ioctl05
syscalls.writev03 syscalls.ioctl06
syscalls.writev04 syscalls.quotactl03
commands.ld commands.ldd01
commands.nm commands.cp01
commands.tar commands.keyctl01
commands.ldd commands.tar01
commands.objdump commands.ld01
commands.cpio commands.cpio01
commands.mkdir_tests01 commands.mkdir01
commands.mv_tests01 commands.nm01
commands.size01 commands.ln01
commands.file commands.mv01
commands.cp_tests01 commands.file01

TODO:
Following new tests currently fail, they are to be addressed one at a
time immediately following the merge:

syscalls.getcwd01
commands.file01
commands.mv01
commands.tar01
syscalls.madvise08
syscalls.ioctl05
syscalls.pselect01
syscalls.access02
syscalls.kcmp03
syscalls.ioctl06
syscalls.access04
commands.ldd01
syscalls.ioctl04
syscalls.getxattr04

Change-Id: Iad24a01393cd0e35d5419b1318d2ee316575bac2
Signed-off-by: Sandeep Patil <sspatil@google.com>
604902bfcc589eedf4aa53d1123eef731f2fc0c9 27-Apr-2017 Cyril Hrubis <chrubis@suse.cz> cpuset: Make use of tst_kvcmp

The tst_kvercmp2 was removed in:

commit 4847f1c13dabbfadd612aa812e2c99973f35f230
Author: Cyril Hrubis <chrubis@suse.cz>
Date: Mon Nov 14 13:44:45 2016 +0100

apicmd: Get rid of tst_kvercmp* binaries.

And these calls were not fixed beforehand.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
Acked-by: Jan Stancek <jstancek@redhat.com>
puset/cpuset_base_ops_test/cpuset_base_ops_testset.sh
ea93315b5ae763bd2f01d856f6242f55a95f77ee 12-Apr-2017 Steve Ellcey <sellcey@cavium.com> memcg_stress_test.sh: Reduce runtime

Change the RUN_TIME from 60 minutes to 15 minutes so the LTP suite does not
take so long. stress_test is run twice so the overall test still takes 30
minutes (but not 2 hours). Reduce the interval between memory touches from
10 seconds to 5 seconds so we still get a reasonable amount of activity during
the test.

Signed-off-by: Steve Ellcey <sellcey@caviumnetworks.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
emcg/stress/memcg_stress_test.sh
8967f960f820f449162101a02ee5747f195a8a57 14-Feb-2017 Ngie Cooper <yaneurabeya@gmail.com> Update references with my old legal name/email to my current name/email address

No functional change

Signed-off-by: Ngie Cooper <yaneurabeya@gmail.com>
akefile
akefile.inc
group/Makefile
group_fj/Makefile
puacct/Makefile
puctl/Makefile
puctl_fj/Makefile
puset/Makefile
puset/Makefile.inc
puset/cpuset_base_ops_test/Makefile
puset/cpuset_exclusive_test/Makefile
puset/cpuset_hierarchy_test/Makefile
puset/cpuset_hotplug_test/Makefile
puset/cpuset_inherit_test/Makefile
puset/cpuset_lib/Makefile
puset/cpuset_load_balance_test/Makefile
puset/cpuset_memory_pressure_test/Makefile
puset/cpuset_memory_spread_test/Makefile
puset/cpuset_memory_test/Makefile
puset/cpuset_syscall_test/Makefile
reezer/Makefile
o-throttle/Makefile
ibcontrollers/Makefile
emcg/Makefile
emcg/control/Makefile
emcg/functional/Makefile
emcg/regression/Makefile
emcg/stress/Makefile
emctl/Makefile
437d181393d9b957cd77086d575e5e9ce746fbc2 13-Dec-2016 Steven Jackson <sj@oscode.net> various: include sys/sycall.h instead of syscall.h

A majority of tests already use sys/syscall.h and Android's NDK doesn't
have syscall.h.

Signed-off-by: Steven Jackson <sj@oscode.net>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
puset/cpuset_memory_test/cpuset_memory_test.c
puset/cpuset_syscall_test/cpuset_syscall_test.c
47a1e461bcaf8c59ed47f7ef012956d92f645f8c 21-Nov-2016 Petr Vorel <petr.vorel@gmail.com> testcases: bashisms: s/==/=/

Fixed also for scripts with bash shebang

Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
group/cgroup_regression_test.sh
group_fj/cgroup_fj_common.sh
puset/cpuset_regression_test.sh
23d7e7cd60e9ff88f2bded9b705dbf031024b0f2 23-Nov-2016 Cyril Hrubis <chrubis@suse.cz> Revert "testcases: bashisms: s/==/=/"

This reverts commit 65767d11920b333998c2eca618d2878d59c97e70.

Binary file memcg_getpagesize slipped in by accidend, sorry everyone.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
group/cgroup_regression_test.sh
group_fj/cgroup_fj_common.sh
puset/cpuset_regression_test.sh
emcg/functional/memcg_getpagesize
65767d11920b333998c2eca618d2878d59c97e70 21-Nov-2016 Petr Vorel <petr.vorel@gmail.com> testcases: bashisms: s/==/=/

Fixed also for scripts with bash shebang

Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
group/cgroup_regression_test.sh
group_fj/cgroup_fj_common.sh
puset/cpuset_regression_test.sh
emcg/functional/memcg_getpagesize
31aa46c0765bb99daf030de5505f2df4a9c9076b 14-Nov-2016 Cyril Hrubis <chrubis@suse.cz> memcg: Make use of tst_kvcmp

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
emcg/functional/memcg_limit_in_bytes.sh
emcg/functional/memcg_memsw_limit_in_bytes_test.sh
emcg/regression/memcg_regression_test.sh
8fdec6a5db522f3194615668c6a22531d7f72e2f 14-Nov-2016 Cyril Hrubis <chrubis@suse.cz> cpuset: Make use of tst_kvcmp

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
puset/cpuset_funcs.sh
puset/cpuset_regression_test.sh
3835e7eb0ee96feea28d4cec96af4af7129152b2 14-Nov-2016 Cyril Hrubis <chrubis@suse.cz> cgroup_regresson_test: Make use of tst_kvcmp + fixes

Also fixes the elif maze and TCONF exit value.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
group/cgroup_regression_test.sh
7ceac0dd4af714ace579e8e8cf05cae53fee596f 13-Oct-2016 Cyril Hrubis <chrubis@suse.cz> controllers/cpuacct.sh: Convert to the new library

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
puacct/cpuacct.sh
450551cb0291c5e14328c92de027988245dd4e6b 13-Oct-2016 Cyril Hrubis <chrubis@suse.cz> controllers/pids.sh: Convert to the new library

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
ids/pids.sh
9f7b382ab332759865d7eb88b100572790b52bf8 17-Oct-2016 Cyril Hrubis <chrubis@suse.cz> cgroup_fj_function.sh: Wait for $pid before cleanup

There seems to be rare race condition where the ltp subgroup created for
the test cannot be removed:

...
cgroup_fj_function2_cpu 9 TPASS : Set /sys/fs/cgroup/cpu,cpuacct/ltp/ltp_1/notify_on_release to 1
cgroup_fj_function2_cpu 10 TINFO : Removing all ltp subgroups...
rmdir: failed to remove '/sys/fs/cgroup/cpu,cpuacct/ltp/': Device or resource busy

The reason for the failure is likely the cgroup_fj_proc that ends up in
tasks for the ltp/ subgroup after test5(). This patch simply adds a
'wait $pid' after the 'kill -9 $pid' to avoid it.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
group_fj/cgroup_fj_function.sh
ec1da996fb11a8ab8f03738aaaefd6fc216ab057 20-Sep-2016 Cyril Hrubis <chrubis@suse.cz> controllers/memcg: Remove force_empty with locked memory test

The testcase started to fail with newer kernels. The reason for this is
that we only try to reclaim all the memory from the given memcg and
retry MEM_CGROUP_RECLAIM_RETRIES (5) times. Mlocked memory is not
reclaimable so we will simply eat all the retries and return back. We
used to reparent the remaining charges to the parent. This is no longer
true since f61c42a7d911 ("memcg: remove tasks/children test from
mem_cgroup_force_empty()"). The behavior change is documented and
considered complying with the previous documentation.

The main use case for the knob as described by
Documentation/cgroups/memory.txt is to:

"
The typical use case for this interface is before calling rmdir().
Because rmdir() moves all pages to parent, some out-of-use page caches can be
moved to the parent. If you want to avoid that, force_empty will be useful.
"

So this change of behavior was deliberate and considering the testcase is quite
artificial I do not consider this a bug.

Signed-off-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
emcg/functional/memcg_force_empty.sh
107ee820fa2e310c1948607f316df4d20825c24b 05-Sep-2016 Cyril Hrubis <chrubis@suse.cz> memcg_control_test.sh: Simplify runtest file

This commit makes use of $(getconf PAGESIZE) instead of the mem_process
and also moves the parameters to the test itself as there is no need to
keep these outside the script.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
Acked-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
emcg/control/mem_process.c
emcg/control/memcg_control_test.sh
eef9f53157616120fa39110efeaac1a688380a21 05-Sep-2016 Cyril Hrubis <chrubis@suse.cz> memcg_lib.sh: Remove subdirectories in cleanup

Some tests create subdirectories in the memcg directory created for the
testcase, namely the move_charge_at_immigrate ones. Hence we need to
remove all subdirectories before we attempt to remove the test
directory. Otherwise the test will not clean up properly on TBROK.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
Acked-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
emcg/functional/memcg_lib.sh
302b451011573212d4bdfceb4dc9f1e5a4174bd0 01-Sep-2016 Cyril Hrubis <chrubis@suse.cz> memcg_function_test.sh: Split

Split the memcg_function_test.sh into five tests based on what is
tested.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
Acked-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
emcg/functional/memcg_failcnt.sh
emcg/functional/memcg_force_empty.sh
emcg/functional/memcg_function_test.sh
emcg/functional/memcg_lib.sh
emcg/functional/memcg_limit_in_bytes.sh
emcg/functional/memcg_stat_rss.sh
emcg/functional/memcg_subgroup_charge.sh
44e843b0d4478e9ea8196adb4c743062b5aa88d5 01-Sep-2016 Cyril Hrubis <chrubis@suse.cz> memcg_lib.sh: Get rid of sleep 1 in signal_memcg_process

The signal_memcg_process function, if passed a size parameter, now polls the
memory.usage_in_bytes file until it increases or decreases by a given amount
(the amount the memcg_process is expected to allocate/free) or until the
process is killed.

We now sleep only in the warmup and only after we send second signal to
the memcg_process.

This further brings down the test runtime down by another minute, now
the tests finish in about 30 second while we also assert that the
usage_in_bytes gets incremented as process consumes memory.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
Acked-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
emcg/functional/memcg_function_test.sh
emcg/functional/memcg_lib.sh
emcg/functional/memcg_move_charge_at_immigrate_test.sh
emcg/functional/memcg_stat_test.sh
emcg/functional/memcg_usage_in_bytes_test.sh
879ea0bea23f877763ef6ae25f832f770dd28937 01-Sep-2016 Cyril Hrubis <chrubis@suse.cz> memcg_lib.sh: Move all the kill -s XXX to functions

This commit adds two functions:

* signal_memcg_process
which asks the memcg_process to allocate/free memory and waits for
completion

* stop_memcg_process
which sends SIGINT to the memcg_process and waits for the pid

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
Acked-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
emcg/functional/memcg_function_test.sh
emcg/functional/memcg_lib.sh
1123128ce77efe5ce5b4df2339896bfac801bf32 01-Sep-2016 Cyril Hrubis <chrubis@suse.cz> memcg_lib.sh: Print test number at test start

Given that some of the testcases report more than one TPASS/TFAIL you
cannot easily tell from the log which exact testcase has failed/passed.

This commit fixes that by adding "Starting test $i" TINFO message into
the loop that executes the testcases.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
Acked-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
emcg/functional/memcg_lib.sh
9eb8cb7c8b4f817d0c66631d7248f68b659862db 02-Sep-2016 Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com> memcg_process: cleanup the SHM segment

Let's mark the segment for removal right after we attach it.
This way memcg* test cases will no longer leave unused
segments after they finish.

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
emcg/functional/memcg_process.c
e957a5f71d465d96b43224909ec4726701b41890 02-Sep-2016 Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com> cpuacct_task: exit cleanly on SIGVTALRM

We don't handle the SIGVTALRM signal in cpuacct_task,
so the process gets terminated, and it makes cpuacct.sh generate
a "Virtual timer expired" message for each cpuacct_task process.

In my opinion, these messages have no real value, and there is no
need in keeping them in the output.

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
puacct/cpuacct_task.c
3490e3edbb2b753ba3d59a5e0fbdf40bb3ce85db 01-Sep-2016 Cyril Hrubis <chrubis@suse.cz> memcg_lib.sh: Fix failures introduced by rewrite

The commit:

commit 5e65d837ee4e3390c885db1d2eb340c80c2b6c36
Author: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
Date: Tue Aug 23 14:25:52 2016 +0300

memcg/functional: rewrite

Included:

@@ -231,15 +237,15 @@ test_proc_kill()
wait $pid
ret=$?
if [ $ret -eq 1 ]; then
- result $FAIL "process $pid is killed by error"
+ tst_resm TFAIL "process $pid is killed by error"
elif [ $ret -eq 2 ]; then
- result $PASS "Failed to lock memory"
+ tst_resm TFAIL "Failed to lock memory"
else
- result $PASS "process $pid is killed"
+ tst_resm TPASS "process $pid is killed"
fi

Which more or less reverted changes in:

Author: Dong ZHu <bluezhudong@gmail.com>
Date: Tue Jun 7 09:44:32 2016 +0800

controllers/memcg: Mark testcase_2 as pass when mlock failed

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
emcg/functional/memcg_lib.sh
88875cb925ebde66212c31fe8541c40a35babd7d 23-Aug-2016 Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com> memcg/functional: check several times if the process is killed

On some systems it may take slightly more than one second
to kill the memcg_process. So let's check several times if the
process is alive.

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
emcg/functional/memcg_lib.sh
968eeffdd60b904784ac6ae905dac3c70fbb003b 23-Aug-2016 Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com> memcg/functional: use checkpoints

This patch implements the idea proposed in [1], [2], that
we use the checkpoint interface to let memcg_process inform
the parent process that it's ready.

In my enviroment it saves ~50 secs of time.

[1] http://lists.linux.it/pipermail/ltp/2016-May/001841.html
[2] http://lists.linux.it/pipermail/ltp/2016-May/001846.html

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
emcg/functional/memcg_function_test.sh
emcg/functional/memcg_lib.sh
emcg/functional/memcg_process.c
348a153047d1c702bebfef43bbb9884d70740853 23-Aug-2016 Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com> memcg/functional/memcg_process: cleanup

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
emcg/functional/memcg_process.c
5e65d837ee4e3390c885db1d2eb340c80c2b6c36 23-Aug-2016 Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com> memcg/functional: rewrite

* Use the LTP API for shell tests
* Remove memcg_getpagesize binary, since its functionality
can be provided by 'getconf PAGESIZE'
* Move common code to memcg_lib.sh

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
emcg/.gitignore
emcg/functional/memcg_function_test.sh
emcg/functional/memcg_getpagesize.c
emcg/functional/memcg_lib.sh
emcg/functional/memcg_max_usage_in_bytes_test.sh
emcg/functional/memcg_memsw_limit_in_bytes_test.sh
emcg/functional/memcg_move_charge_at_immigrate_test.sh
emcg/functional/memcg_stat_test.sh
emcg/functional/memcg_usage_in_bytes_test.sh
emcg/functional/memcg_use_hierarchy_test.sh
48b1bdecbfac9a8a7f3bf32f49a5d1a5979a3d96 22-Jul-2016 Khem Raj <raj.khem@gmail.com> rename 'sigset' var to avoid shadowing with libc symbol sigset

Fixes errors like

epoll_pwait01.c:44:17: error: ‘sigset’ redeclared as different kind of symbol
static sigset_t sigset;
^~~~~~
In file included from ../../../../include/old/test.h:38:0,
from epoll_pwait01.c:36:
/usr/include/signal.h:231:8: note: previous declaration of ‘sigset’ was here
void (*sigset(int, void (*)(int)))(int);
^~~~~~

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
group_fj/cgroup_fj_proc.c
puctl_fj/cpuctl_fj_cpu-hog.c
puset/cpuset_load_balance_test/cpuset_cpu_hog.c
puset/cpuset_memory_spread_test/cpuset_mem_hog.c
0ed5b6ad5eb85bc03840150d65f2a0eefd9c5f9c 15-Jul-2016 Yuexi Ma <yuexima@google.com> patched the repo for a small set of succesfull build

Change-Id: I03d2b4126c913c387e6c5cfbd07bd10e67ca805c
ibcontrollers/libcontrollers.h
6ce94db5bbff0be40813f3fdfe61a55b3186c49a 12-Jul-2016 Shuang Qiu <shuang.qiu@oracle.com> cgroup_fj/cgroup_fj_common.sh: check for cpuset prefix

Depending on how you mount cpuset cgroup, there may be a "cpuset."
prefix:
mount -t cpuset cpuset /mnt/test # no prefix
mount -t cgroup -o cpuset cpuset /mnt/test # prefix

The old "no prefix" way is presumably still supported as a legacy,
introduced by this patch:
commit 8793d854edbc2774943a4b0de3304dc73991159a
Author: Paul Menage <menage@google.com>
Date: Thu Oct 18 23:39:39 2007 -0700
Task Control Groups: make cpusets a client of cgroups

So try either $mount_point/XXXX or $mount_point/cpuset.XXXX.

Signed-off-by: Shuang Qiu <shuang.qiu@oracle.com>
Acked-by: Jan Stancek <jstancek@redhat.com>
group_fj/cgroup_fj_common.sh
e3531c9303b6af71ceef9f79305c5a066ed9c6ce 13-Jun-2016 Cyril Hrubis <chrubis@suse.cz> cgroup_xattr: Fix for kernel 4.5 and later

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
group_xattr/cgroup_xattr.c
6bfc531e1987b03c27ceb635783b2f0fd229cacc 07-Jun-2016 Dong ZHu <bluezhudong@gmail.com> controllers/memcg: Mark testcase_2 as pass when mlock failed

While running "memcg_memsw_limit_in_bytes_test" always reported below error:
"memcg_memsw_limit_in_bytes_test 2 TFAIL : ltpapicmd.c:193: process 3769
is killed by error"

In function mmap_lock2() mlock failed to lock pages with errno EAGAIN,
the "memcg_process" process exits before the oom killer can kill it.

And based on this:
http://marc.info/?l=linux-mm&m=142122902313315&w=2

mlock failing under memory pressure is a expect behavior in this case
and test should return PASS.

Signed-off-by: Dong Zhu <bluezhudong@gmail.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
emcg/functional/memcg_lib.sh
emcg/functional/memcg_process.c
43955d98fcea2ba2d5dfc53345cf1daa377abbbe 25-Jan-2016 Cyril Hrubis <chrubis@suse.cz> test.sh: Fix ROD redirection && callers

The ROD could not detect failures when the output was redirected into a
file since the redirection was handled in the caller.

For example doing:

ROD echo a > /proc/cpus

Would have worked just fine since the $@ in ROD function would contain
only 'echo a'.

Moreover doing:

ROD false > tmpfile

Would end up writing the error message to the tmpfile instead of the
stdout.

For this reasons the ROD has been changed to take special char \> as
redirection operator. The only difference is that the > in the ROD
command must be prefixed with \ so that it's passed along with the file
to the ROD function. The $@ there is split on '>' and the redirection is
done inside ROD function which fixes the errors described above.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
Acked-by: Alexey Kodanev <alexey.kodanev@oracle.com>
group_fj/cgroup_fj_common.sh
group_fj/cgroup_fj_function.sh
ids/pids.sh
e47c80e64652dc07bb15a66857c295e756e70809 20-Jan-2016 Cyril Hrubis <chrubis@suse.cz> controllers: cgroup_fj: Partial rewrite

Most of the functionality has been preserved.

The main changes are:
---------------------

Changed the testcases to use test.sh.

Got rid of bashisms.

The code is much more clean now :).

The testcases no longer move all system processes into test subgroups
which has proven to be troublesome for a few reasons. The main one was
that when the testcase failed to clean up the system ended up
half-functioning. The other was that this did not scale up reasonably as
the runtime depends on number of processes and there were systems (with
large amounts of CPUs and RAM and slightly older kernel) where only one
of the stress tests took about hour. The stress tests should now take at
most a few minutes each (at least they all took less than five minutes
on slowest machine I had) and the run should be < 1h on reasonably fast
machine.

I've also removed the ns namespace testcases since I haven't tested
these and discussion on ML suggested that ns namespace needs some extra
steps. We may add them later.

Another TODO is proper release agent testing, but since the original
code didn't actually test it (the code checked if release agent could be
set but that was all it tested) I've omitted it for now as well.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
group_fj/README
group_fj/cgroup_fj_common.sh
group_fj/cgroup_fj_function.sh
group_fj/cgroup_fj_function2.sh
group_fj/cgroup_fj_release_agent
group_fj/cgroup_fj_stress.sh
group_fj/cgroup_fj_utility.sh
group_fj/run_cgroup_test_fj.sh
9a59e01de0799890bcd55d66be963beec73905ec 14-Dec-2015 Cedric Hnyda <chnyda@suse.com> controllers/cgroup_fj_stress: Remove mount_times

Looking at the source carefully the mount_times parameter caused the
test to be executed n-times and this is the reason there is cleanup
hacked in the test setup.

So let's get rid of it as well has of the cleanup hack in setup.

Signed-off-by: Cedric Hnyda <chnyda@suse.com>
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
group_fj/cgroup_fj_stress.sh
group_fj/cgroup_fj_utility.sh
0a9610227c028ac0258383d989bd0345f088369d 19-Jan-2016 Cyril Hrubis <chrubis@suse.cz> controllers: cgroup_fj: Fix commit a6e8e5a

The changes to cgroup_fj_utility.sh didn't made it to:

commit a6e8e5ad92ed5f54a2776acb2ab816fd8e1e8f3b
Author: Cyril Hrubis <chrubis@suse.cz>
Date: Tue Jan 19 11:57:56 2016 +0100

testcases/cgroup_fj: Fixes.

Sorry everyone.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
group_fj/cgroup_fj_utility.sh
a7c0af93a2fdd30ebcdd002f1437343ebb870f50 19-Jan-2016 Cyril Hrubis <chrubis@suse.cz> controllers/pids.sh: A few fixes

* Add executable flag to the pids.sh script

* Redirect stderr to stdout for kill pids_task2

* Fix the limit for third testcase:

Since we start a pids_task1 which tries to do a fork and expects to
succeed the limit must be lesser number of attached tasks - 2. It
makes more sense to increase the parameter by two rather than
decreasing it since the test 'pids.sh 3 1' fails because it tries to
start -1 tasks. The runtest file is updated accordingly.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
ids/pids.sh
a6e8e5ad92ed5f54a2776acb2ab816fd8e1e8f3b 19-Jan-2016 Cyril Hrubis <chrubis@suse.cz> testcases/cgroup_fj: Fixes.

* Do not use full path when executing test binaries

* Make use of $TMPDIR

* Correct TCONF exits

* Decrease sleeps from 1 second to 100 miliseconds

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
group_fj/cgroup_fj_function.sh
group_fj/cgroup_fj_function2.sh
group_fj/cgroup_fj_stress.sh
group_fj/run_cgroup_test_fj.sh
6d0784dce3bbab8bb4740ef1d5447d2740db2189 25-Dec-2015 Cedric Hnyda <cedric@hnyda.net> controllers/cgroup_fj: remove broken testcase

cgroup_fj_function_cpuset_yes_no_1_yes_2_3_2_1 fails on newer systems.

Once upon a time there was backward compatibility noprefix mount option
for cpuset cgroup but since we cannot cannot mount cgroups on newer
systems (since it's allready mounted) the test is pointless (and will
fail).

The test was removed from runtest/controllers.

The option noprefix was removed for all function testcases since it was
only used for that testcase.

Signed-off-by: Cedric Hnyda <cedric@hnyda.net>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
group_fj/cgroup_fj_function.sh
group_fj/cgroup_fj_utility.sh
5ad79b71f6df2f191f6a81c6ef71078781c0ab15 26-Nov-2015 Cedric Hnyda <chnyda@suse.com> controllers/pids: Add new testcases

Created new testcases to test the pids controller
which is used to stop any new tasks from being fork()'d
after a certain limit is reached.

Signed-off-by: Cedric Hnyda <chnyda@suse.com>
ids/.gitignore
ids/Makefile
ids/pids.sh
ids/pids_task1.c
ids/pids_task2.c
9fbcac5640cdee9128faa77b472edc1454df9057 23-Nov-2015 Cedric Hnyda <chnyda@suse.com> controllers/cgroup_fj: add tests

Add tests for controllers which were not tested:
- blkio, hugetlb, pids, net_cls, net_prio, devices and freezer
Modify cgroup_fj_utility.sh to test more controllers.
Update the description of cgroup_fj_function.sh and
cgroup_fj_stress.sh

Signed-off-by: Cedric Hnyda <chnyda@suse.com>
group_fj/cgroup_fj_function.sh
group_fj/cgroup_fj_stress.sh
group_fj/cgroup_fj_utility.sh
2623d44abed6081cc08755171dec671ff5de0515 20-Nov-2015 Xiao Yang <yangx.jy@cn.fujitsu.com> controllers/cpuacct: add cpuacct availability check

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
puacct/cpuacct.sh
9da4a271759156e7fe8055bc687ed23d5628ec31 12-Nov-2015 Cedric Hnyda <chnyda@suse.com> cgroup_fj: function2

Check if the cgroup exists. The cgroup
will be mounted (and umounted) only if it doesn't exist at
the start of the test.
Removed testcases 3-6 because they tested a no longer supported
feature.
Renamed testcases 6-13 to 3-9 (ie: testcase 3 = former testcase 7)
Add tests for every subsystem instead of only debug except for
testcases 1 & 2 which are specific for debug and cpuset.

Signed-off-by: Cedric Hnyda <chnyda@suse.com>
group_fj/cgroup_fj_function2.sh
c7b2a114dfee5e6beac8ed1782434940885419cb 12-Nov-2015 Cedric Hnyda <chnyda@suse.com> cgroup_fj: testcases

Removed irrelevant testcases and the code handling them
1) Removed testcases with "all", it is irrelevant to mount all
cgroups when some are already mounted and it is not possible to
mount them several times in newer kernel.
2) Removed "none" testcases. Cannot find what -onone is supposed
to do when cgroups are mounted. Maybe the author confused with
"mount -t cgroup none /cgroups"

Signed-off-by: Cedric Hnyda <chnyda@suse.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
group_fj/cgroup_fj_function.sh
group_fj/cgroup_fj_stress.sh
group_fj/cgroup_fj_utility.sh
a83bb15f92610c30e458a5edabe6de15a2fc138b 02-Nov-2015 Cedric Hnyda <chnyda@suse.com> cgroup_fj: add prefix ltp_ to subgroups

Add prefix "ltp_" to the subgroups to make sure
the tests will not collide with anything else on the
system.

Signed-off-by: Cedric Hnyda <chnyda@suse.com>
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
group_fj/cgroup_fj_function.sh
group_fj/cgroup_fj_release_agent
group_fj/cgroup_fj_stress.sh
group_fj/cgroup_fj_utility.sh
7b0d6e7f131036d693d4841234cca6d39e805e45 11-Nov-2015 Cedric Hnyda <chnyda@suse.com> controllers/cgroup_fj: fix and clean up

Many tests were failing on recent kernels because it is not
possible to mount cgroup several times anymore.
Now the test first checks if the cgroup exists. The cgroup
will be mounted (and umounted) only if it doesn't exist at
the start of the test.
It also checks that the subsystem exist before we run the
tests.
A few minor typo mistakes were fixed (expectted instead of
expected).
Most of the tests are now passing.

Signed-off-by: Cedric Hnyda <chnyda@suse.com>
group_fj/cgroup_fj_function.sh
group_fj/cgroup_fj_stress.sh
group_fj/cgroup_fj_utility.sh
1bdfee68c9cb04524d76dd239f5d8e42b1a29f8c 11-Nov-2015 Cedric Hnyda <chnyda@suse.com> controllers/cpuacct: rewrote testcases

Rewrote cpuacct testcases since they were outdated.
Removed old files
Added 6 tests for cpuacct.

Signed-off-by: Cedric Hnyda <chnyda@suse.com>
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
puacct/.gitignore
puacct/README
puacct/cpuacct.sh
puacct/cpuacct_setup.sh
puacct/cpuacct_task.c
puacct/cpuacct_task01.c
puacct/cpuacct_testplan.txt
puacct/run_cpuacct_test.sh
ca77742387f0bd4e42c39b1c70e5995be3433687 09-Nov-2015 Yuan Sun <sunyuan3@huawei.com> cpuset_syscall_test: simplify grep actions

Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
Acked-by: Jan Stancek <jstancek@redhat.com>
puset/cpuset_syscall_test/cpuset_syscall_testset.sh
c1d919b71f474d964cb02845182acd6934ac3701 30-Sep-2015 Cedric Hnyda <chnyda@suse.com> controllers/cgroup_fj: Fixed exit codes

Fixed exit codes in case of not supported tests

Signed-off-by: Cedric Hnyda <chnyda@suse.com>
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
group_fj/cgroup_fj_function.sh
group_fj/cgroup_fj_function2.sh
group_fj/cgroup_fj_stress.sh
group_fj/cgroup_fj_utility.sh
group_fj/run_cgroup_test_fj.sh
0022ce7db440a5856600bd3d4b76e51372577bea 01-Oct-2015 Cedric Hnyda <chnyda@suse.com> controllers/cgroup_fj: split cgroup_fj tests

Split cgroup_fj tests to run them separately
and removed the useless LOGFILE

Signed-off-by: Cedric Hnyda <chnyda@suse.com>
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
group_fj/cgroup_fj_function.sh
group_fj/cgroup_fj_function2.sh
group_fj/cgroup_fj_stress.sh
group_fj/cgroup_fj_testcases.sh
group_fj/cgroup_fj_utility.sh
group_fj/run_cgroup_test_fj.sh
d10b7a91a6d1fb46fb435f24eac3e1cc95027ac7 08-Sep-2015 Cedric Hnyda <chnyda@suse.com> cgroup_fj: rename arguments

Renamed arguments because the previous ones were not clear.

Signed-off-by: Cedric Hnyda <chnyda@suse.com>
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
group_fj/cgroup_fj_function.sh
group_fj/cgroup_fj_stress.sh
group_fj/cgroup_fj_testcases.sh
group_fj/cgroup_fj_utility.sh
40a2457cb8ec42a05a2f96b0810057efdb2a55f5 16-Sep-2015 Kai Kang <kai.kang@windriver.com> Fix compilation for gcc-5.x

The gcc-5.x defaults to -std=gnu11 instead of -std=gnu89 which causes
semantics for inline functions changes.

GNU89 inline: Same as C99 extern inline.

So the standalone 'inline' causes error such as:

git/testcases/kernel/syscalls/kill/kill10.c:355: undefined reference to `k_sigaction'

Replace inline with static inline to fix this issue.

Ref:
https://gcc.gnu.org/gcc-5/porting_to.html

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
ibcontrollers/libcontrollers.c
ibcontrollers/libcontrollers.h
3750bdad20cb54252af92f96265e664965342a02 19-Aug-2015 Yuan Sun <sunyuan3@huawei.com> Use cpuctl_test* as TCID for cpuctl_test*.c.

Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
puctl/cpuctl_test01.c
puctl/cpuctl_test02.c
puctl/cpuctl_test03.c
puctl/cpuctl_test04.c
d1e794d62b1bf619df8390535e4c2a58899b1145 30-Jul-2015 Cyril Hrubis <chrubis@suse.cz> lib: Get rid of unused tst_require_root() callback

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
group_xattr/cgroup_xattr.c
5e391383f6f00930123c5c17c4161ebf232063d4 06-Jul-2015 Zeng Linggang <zenglg.jy@cn.fujitsu.com> cpuset: regression test for "system crash if cpuset_cpumask_can_shrink() is passed an empty cpumask"

This fixed by:
commit bb2bc55a694d45cdeda91b6f28ab2adec28125ef
Author: Mike Galbraith <umgwanakikbuti@gmail.com>
Date: Wed Jan 28 04:53:55 2015 +0100

sched: Fix crash if cpuset_cpumask_can_shrink() is passed an empty cpumask

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
puset/cpuset_regression_test.sh
bc6d0f707d87b50e69e622a42ccf265753182d55 20-Jul-2015 Vladimir Davydov <vdavydov@parallels.com> memcg_control: fix mem_process not moved to cgroup

$! is not set after ( cmd & )

This bug was introduced by commit 49010e502a74c ("Replace pushd // popd
with cd calls.").

Since we create a sub-shell in test_proc_kill only to preserve PWD,
let's change this to cd $OLDPWD. In contrast to pushd/popd this will
work in busybox.

Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Reviewed-by: Jan Stancek <jstancek@redhat.com>
emcg/control/memcg_control_test.sh
38eaae6c95a93066bca0deac5511923d0c6e348f 19-Jun-2015 Alexey Kodanev <alexey.kodanev@oracle.com> cgroup_xattr: fix test on kernels >= 3.15

* cgroup was converted to kernfs that supports xattr natively and
doesn't have simple 'security.' namespace handler. So using just
'security.' name in setxattr syscall returns EOPNOTSUPP.

Also,

* adding 'trusted.' name to the test - should be valid xattr name.

* silent warnings about comparison between signed and unsigned int.

Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
group_xattr/cgroup_xattr.c
f5b5b063a58d42d20dc2cb49b7d7c86c2f9e2819 10-Jun-2015 Wei,Jiangang <weijg.fnst@cn.fujitsu.com> cpuset/cpuset_lib/cpuinfo.c: fix FILE pointer leak

Signed-off-by: Wei,Jiangang <weijg.fnst@cn.fujitsu.com>
puset/cpuset_lib/cpuinfo.c
6e2495902690294475f64ad0093d4fc05abaea4c 10-Jun-2015 Maninder Singh <maninder1.s@samsung.com> kernel/libcpuset.c: remove explicit NULL check before free

No need of NULL check before free

Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Signed-off-by: Akhilesh Kumar <akhilesh.k@samsung.com>
puset/cpuset_lib/libcpuset.c
0a5f7141419d3ed6868edc6a814669d5dc5780d8 05-Jun-2015 Yuan Sun <sunyuan3@huawei.com> Fix the return value error of read_shares_file.

Add "return -1" after the error_function execution.

Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
ibcontrollers/libcontrollers.c
ibcontrollers/libcontrollers.h
8c493501f6614b485f1597810555d7ce38439ffd 14-May-2015 Michal Hocko <mhocko@suse.cz> controllers/memcg: Fix limit alignment expectations

since 3e32cb2e0a12 ("mm: memcontrol: lockless page counters") kernel
commit the limit_in_bytes is round down rather than up. This behavior
change has been discussed during the review and it was considered a
reasonable so fix the test case. As we have to be backward compatible
we have to check for both round down and up. It doesn't make any sense
to give the target value in all callers so calculate the appropriate
values in test_limit_in_bytes.

Signed-off-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
emcg/functional/memcg_function_test.sh
emcg/functional/memcg_lib.sh
emcg/functional/memcg_memsw_limit_in_bytes_test.sh
4af6d295d0a6e25214838f1237e9ec7cc9600ef8 21-May-2015 Wei,Jiangang <weijg.fnst@cn.fujitsu.com> kernel/controllers/cpuctl: cleanup

* Remove redundant include(s) for unistd.h
* Add void where needed

Signed-off-by: Wei,Jiangang <weijg.fnst@cn.fujitsu.com>
puctl/cpuctl_def_task01.c
puctl/cpuctl_def_task02.c
puctl/cpuctl_def_task03.c
puctl/cpuctl_test03.c
5c3635d26929a00103f70a54365229449f71a217 14-May-2015 Michal Hocko <mhocko@suse.cz> controllers/memcg: fix force_empty

testcase_29 and testcase_30 are no longer testing anything because
the kernel allows to use force_empty even for memcgs with active
tasks since f61c42a7d911 ("memcg: remove tasks/children test from
mem_cgroup_force_empty()) kernel commit.

If we really want to test this functionality then just expect the
success for regular mmap and expect the failure when the charged
memory is mlocked.

Signed-off-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
emcg/functional/memcg_function_test.sh
3bbb17821f9213924000d73ae79904c1d7878ad9 14-May-2015 Nikolay Borisov <n.borisov@siteground.com> controllers: Fix --mmap-lock1 test

After kernel 3.12 doing a mmap with the MAP_LOCKED flag
wouldn't trigger an oom. This has been discussed and explained
in http://marc.info/?l=linux-mm&m=142122902313315&w=2

To work around this simply touch the memory after
mmap, that way we are going to cause a fault and the process
is going to be killed. This fixes both use_hierarchy and
the memcg functional tests

Signed-off-by: Nikolay Borisov <n.borisov@siteground.com>
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
emcg/functional/memcg_process.c
0aaaf37500ec21d4e673c8f36f9934346269ac21 24-Apr-2015 Wei,Jiangang <weijg.fnst@cn.fujitsu.com> cpuset_cpu_hog: fix memory leak

Signed-off-by: Wei,Jiangang <weijg.fnst@cn.fujitsu.com>
puset/cpuset_load_balance_test/cpuset_cpu_hog.c
d6d11d08678aac1ed2c370ea8e42e5f45aea07be 09-Mar-2015 Cyril Hrubis <chrubis@suse.cz> Introduce tst_parse_opts()

The pattern that was used in all testcases is:

const char *msg;

msg = parse_opts(...);
if (msg)
tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);

This change simplifies the steps to just calling:

tst_parse_opts(...);

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
group_xattr/cgroup_xattr.c
aabb8340f63ed31afe995fd97795e542dc68b93c 04-Feb-2015 Cyril Hrubis <chrubis@suse.cz> Include usctest.h in test.h

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
group_xattr/cgroup_xattr.c
puset/cpuset_syscall_test/cpuset_syscall_test.c
605fa3362fd7cef0baa2131be32cf44661783d3e 04-Feb-2015 Cyril Hrubis <chrubis@suse.cz> Get rid of TEST_CLEANUP

Special thanks to Coccinelle for making this easy job.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
group_xattr/cgroup_xattr.c
c07cfe0deb852ab7aaf23412b39f60ef72dc6cde 29-Jan-2015 Lijinyue <lijinyue@huawei.com> controllers: disallow attaching kthreadd or threads with flag 0x04000000 to cgroups on kernel > 3.4.0

Since kernel commit c4c27fbdda4e8ba87806c415b6d15266b07bce4b and
14a40ffccd6163bbcd1d6f32b28a88ffe6149fc6, disallow attaching kthreadd
or threads with flag 0x04000000 to cgroups.
(Thread flag 0x04000000 is representation of PF_THREAD_BOUND which
had been replaced with PF_NO_SETAFFINITY on kernel 3.9 and later.)

The following testcases in cgroup_fj_testcases.sh will encounter
"echo: write error: Invalid argument" error while attaching tasks to the cgroup.
function 1 1 1 1 1 3 1 1 1
function 1 1 1 1 1 3 2 1 1
function 1 1 1 1 1 3 4 1 1

Error messages as follows:
/opt/ltp/testcases/bin/cgroup_fj_utility.sh: line 295: echo: write error: Invalid argument
/opt/ltp/testcases/bin/cgroup_fj_utility.sh: line 497: 10571 Killed $TESTROOT/cgroup_fj_proc
/opt/ltp/testcases/bin/cgroup_fj_utility.sh: line 497: 10573 Killed $TESTROOT/cgroup_fj_proc
cgroup_test_fj 1 TFAIL : ltpapicmd.c:190: case98(function 1 1 1 1 1 3 1 1 1) FAIL
/opt/ltp/testcases/bin/cgroup_fj_utility.sh: line 295: echo: write error: Invalid argument
/opt/ltp/testcases/bin/cgroup_fj_utility.sh: line 497: 10624 Killed $TESTROOT/cgroup_fj_proc
/opt/ltp/testcases/bin/cgroup_fj_utility.sh: line 497: 10626 Killed $TESTROOT/cgroup_fj_proc
cgroup_test_fj 1 TFAIL : ltpapicmd.c:190: case99(function 1 1 1 1 1 3 2 1 1) FAIL
/opt/ltp/testcases/bin/cgroup_fj_utility.sh: line 295: echo: write error: Invalid argument
/opt/ltp/testcases/bin/cgroup_fj_utility.sh: line 497: 10677 Killed $TESTROOT/cgroup_fj_proc
/opt/ltp/testcases/bin/cgroup_fj_utility.sh: line 497: 10679 Killed $TESTROOT/cgroup_fj_proc
cgroup_test_fj 1 TFAIL : ltpapicmd.c:190: case100(function 1 1 1 1 1 3 4 1 1) FAIL

So, we kindly avoid to attach these threads in cgroup tests.

Signed-off-by: Li Jinyue <lijinyue@huawei.com>
Acked-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
group_fj/cgroup_fj_function.sh
526fdf8d8ea3b43b73de7cc25eb754f12702c8d2 04-Dec-2014 Cyril Hrubis <chrubis@suse.cz> Change tst_resm() followed by tst_exit() to tst_brkm()

Created with coccinelle patch:

@@
expression list L;
expression C != {TINFO, TPASS};
@@
- tst_resm
+ tst_brkm
(C,
+ NULL,
L);
- tst_exit();

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
puset/cpuset_load_balance_test/cpuset_sched_domains_check.c
reezer/vfork.c
6fb9117f6b1bebe1b746135abc405e74c2cdf0ea 10-Nov-2014 Jan Stancek <jstancek@redhat.com> cpuset_syscall_testset.sh: check TCONF for do_syscall_test

If HAVE_DECL_MPOL_F_MEMS_ALLOWED is not defined, test returns -1,
which is evaluted as failure.

Treat it as TCONF, but don't break the execution, cpuset_syscall_testset.sh
script is expecting to handle stopping/waiting for children by itself.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
puset/cpuset_syscall_test/cpuset_syscall_test.c
puset/cpuset_syscall_test/cpuset_syscall_testset.sh
ac6342fcfe9eed5cc73adffa9bfdfd1cb8decc1d 06-Nov-2014 Jan Stancek <jstancek@redhat.com> controllers/cpuset: update to use test.sh

Remove useless returns and ret code checking.

cpuset_memory_spread_testset.sh:
- treat node with not enough memory as TCONF, not failure

Signed-off-by: Jan Stancek <jstancek@redhat.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
puset/cpuset_funcs.sh
puset/cpuset_hotplug_test/cpuset_hotplug_test.sh
puset/cpuset_memory_spread_test/cpuset_memory_spread_testset.sh
70214281d2f78b5f1785cbf578a70fe4e2d87655 07-Aug-2014 Xing Gu <gux.fnst@cn.fujitsu.com> run_memctl_test.sh: replace tr + cut with awk

In RHEL6.5GA and RHEL7.0GA, running run_memctl_test.sh outputs
"/opt/ltp/testcases/bin/run_memctl_test.sh: line 87: [: -lt: unary
operator expected" error. This is because $MEM_AVAIL is empty here,
which is caused by command "tr -s [:space:]" because the string
[:space:] is interpreted as wildcard and evaluates to 'c' because a file
with this name exist in the installed testcases/bin/ directory.

Signed-off-by: Xing Gu <gux.fnst@cn.fujitsu.com>
Reviewed-by: Jan Stancek <jstancek@redhat.com>
emctl/run_memctl_test.sh
d218f348c12b42a78fa0306d9a033bfa4f67238b 23-Sep-2014 Cyril Hrubis <chrubis@suse.cz> Remove useless malloc() casts.

Created with coccinelle patch:

@@
expression E1, E2;
type T;
@@
- E1 = (T)malloc(E2)
+ E1 = malloc(E2)

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
puset/cpuset_lib/cpuinfo.c
puset/cpuset_load_balance_test/cpuset_cpu_hog.c
emctl/memctl_test01.c
a57ed2abd76ce0d7383b36fe8ac9cee307d9c2d6 01-Aug-2014 Xing Gu <gux.fnst@cn.fujitsu.com> cpuacct/run_cpuacct_test.sh: fix the order of cleanup and task_kill

When there are running tasks in the child group of cgroup, the child
group can't be removed. So fix the order of cleanup and task_kill in
run_cpuacct_test.sh.

Signed-off-by: Xing Gu <gux.fnst@cn.fujitsu.com>
puacct/run_cpuacct_test.sh
be417c5d23240730fba627dad860be87540060dc 04-Aug-2014 Xing Gu <gux.fnst@cn.fujitsu.com> cgroup/cgroup_regression_test.sh: fix an issue about removing directories

After running test_$cur cases successfully, executing
"rmdir -p cgroup/*" outputs "rmdir: failed to
remove cgroup/*: No such file or directory" error
message, this is because cgroup is an empty directory
here. Fix it.

Signed-off-by: Xing Gu <gux.fnst@cn.fujitsu.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
group/cgroup_regression_test.sh
e549be72eaf0615547c22da101d6cf666e615419 05-Aug-2014 Cyril Hrubis <chrubis@suse.cz> controllers/memcg: Remove ./ from the lib includes

This fixes failures when the test working directory is not the same as
the directory with binaries (the directory with binaries must always be
in PATH hence we can safely change this).

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
emcg/functional/memcg_function_test.sh
emcg/functional/memcg_max_usage_in_bytes_test.sh
emcg/functional/memcg_memsw_limit_in_bytes_test.sh
emcg/functional/memcg_move_charge_at_immigrate_test.sh
emcg/functional/memcg_stat_test.sh
emcg/functional/memcg_usage_in_bytes_test.sh
emcg/functional/memcg_use_hierarchy_test.sh
02a4e2668387aef570875b9cfa3f4736194fee51 29-May-2014 Zeng Linggang <zenglg.jy@cn.fujitsu.com> controllers/cpuacct: add cpuacct tests to default and somecleanup

* Change the entry like:
cpuacct01 run_cpuacct_test.sh 1
cpuacct02 run_cpuacct_test.sh 2

* Add cpuacct tests to scenario_groups/default

* Add umount_cpuacct_mounted function for umount cpuacct mounted

* Make use of tst_require_root, exists and tst_resm

* Some cleanup

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
puacct/cpuacct_setup.sh
puacct/run_cpuacct_test.sh
0b9589f3f9c0345b29cfcf7da5a1253c708303eb 27-May-2014 Cyril Hrubis <chrubis@suse.cz> testcases: Constify char *msg variable.

The parse_opts() now returns const char * instead of char * this commit
fixes all warnings caused by the change.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
group_xattr/cgroup_xattr.c
9c31ad210f817055592163cbc648032fcbe8b130 14-May-2014 Cyril Hrubis <chrubis@suse.cz> lib, tests: Rename get_tst_tmpdir() to tst_get_tmpdir()

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
group_xattr/cgroup_xattr.c
169720fd17d0632b78499d7b8168727736c98fb0 26-Mar-2014 Joseph Beckenbach <jbeckenbach@lancope.com> Fix shell scripts to run correctly on Debian

Temporarily change shebang to /bin/bash in scripts that depends on bash
extensions.

Also corrects a few 'exit -1' in netns/*.sh scripts.

Signed-off-by: Joseph Beckenbach <jbeckenbach@lancope.com>
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
group_fj/cgroup_fj_function.sh
group_fj/cgroup_fj_function2.sh
group_fj/cgroup_fj_stress.sh
group_fj/cgroup_fj_utility.sh
group_fj/run_cgroup_test_fj.sh
805677e81d437384264ddc21fd8761cb57846a36 14-Feb-2014 Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com> controllers/memcg_lib.sh: reset root cgroup's memory.use_hierarchy to 0

In some linux distribution, such as RHEL7U0Beta, memory.use_hierarchy is
set to 1 by systemd default, which will cause some tests failed, such as
memcg_stat_test.sh, memcg_use_hierarchy_test.sh.

According to kernel Documentation/cgroups/memory.txt's description,
the default value should be 0, and some ltp tests are written based on
this assumption, so here we set the root cgroup's memory.use_hierarchy
to 0 before running the test and restore it when finishing the test.

Signed-off-by: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
emcg/functional/memcg_lib.sh
14f1d23efa361ad7fe6a3f357a5bc08555a2db85 07-Jan-2014 Jan Stancek <jstancek@redhat.com> cpuset/cpuset_syscall_test: check HAVE_DECL_MPOL_F_MEMS_ALLOWED

This is to fix compilation on RHEL5.3:
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_FORTIFY_SOURCE=2
-I/root/ltp/testcases/kernel/include -DNUMA_VERSION1_COMPATIBILITY
-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 -lnuma -o cpuset_syscall_test
cpuset_syscall_test.c: In function ‘test_get_mempolicy’:
cpuset_syscall_test.c:190: error: ‘MPOL_F_MEMS_ALLOWED’ undeclared
(first use in this function)
cpuset_syscall_test.c:190: error: (Each undeclared identifier is
reported only once
cpuset_syscall_test.c:190: error: for each function it appears in.)
make[5]: *** [cpuset_syscall_test] Error 1

This patch restores check which has been removed by this commit:
commit 87156a05a2ffd50f5e467d6f986daae9da7b9cf7
Author: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
Date: Tue Oct 1 17:44:50 2013 +0400
cpuset/cpuset_syscall_test: fixes

Signed-off-by: Jan Stancek <jstancek@redhat.com>
Tested-by: Cyril Hrubis <chrubis@suse.cz>
puset/cpuset_syscall_test/cpuset_syscall_test.c
4177e38064cd4c35176132c5c38ac54e07f9033f 22-Oct-2013 Shuang Qiu <shuang.qiu@oracle.com> Fix cgroup_regression_test.sh script issue

Testcase cgroup sometimes fail although there is no bug found.
Initialize the exit status to fix it.
Using "rmdir cgroup/" to clean up test_dir sometimes failed because
there may be subdir not removed in cgroup/.
Using "rmdir -p cgroup/*" instead.

Signed-off-by: Shuang Qiu <shuang.qiu@oracle.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
group/cgroup_regression_test.sh
1e5da030e9cdeb431d41e7eb84658d9c4a5b67e3 17-Oct-2013 Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com> memcg_control: revert memory.use_hierarchy value to 0

Documentation/cgroups/memory.txt states that "Enabling/disabling will
fail if either the cgroup already has other cgroups created below it,
or if the parent cgroup has use_hierarchy enabled."

memcg_control_test.sh sets global memory.use_hierarchy value to 1 before
the execution of its own tests but doesn't revert it back to 0 after
they complete.

It causes failures of memcg_stat_test.sh and memcg_use_hierarchy_test.sh
testcases if runtest/controllers is run twice on the same host.

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
emcg/control/memcg_control_test.sh
c793aee5f06b46bdc8171814df71df3c90d47c7d 17-Oct-2013 Cyril Hrubis <chrubis@suse.cz> controllers/cpuset: Fix cleanup.

On some systems (found on SLES10) cpuset mounts aren't listed in the output
from mount (they are not in /etc/mtab at all), so we switch to the /proc/mounts
instead.

Also fix a race in the loop that kills processes that are left in the currently
mounted cpuset. The problem is that if you kill a LTP test, the cleanup is
still executed and the test takes some time to finish which results in EBUSY in
the umount that is executed right after the loop. The fix is to kill the
processes with -9 (SIGKILL) which makes them exit immediately.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
puset/cpuset_funcs.sh
08dcfbb5a4ebad9319c54935a600ab936708c6da 17-Oct-2013 Cyril Hrubis <chrubis@suse.cz> controllers/cpuset: Fix check for root.

The $USER == root check may fail (for example if you did su and the user stayed
set to whatever was there before). Moreover rest of the LTP uses euid == 0 to
check if you have root privileges, so let's stick to it.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
puset/cpuset_funcs.sh
7fab4c4d439c9ed108d70c663e50cf4bd99f4254 17-Oct-2013 Cyril Hrubis <chrubis@suse.cz> controllers/cpuset: Remove unused file.

Remove unused copy of cpuset_funcs.sh from the cpuset_lib directory.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
puset/cpuset_lib/cpuset_funcs.sh
8bd901edaac6ce1b4edaef835e46b30bec495aee 04-Oct-2013 Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com> cpuset_base_ops_test: using tst_kvercmp2

RHEL6 kernel backported a fix to not produce
an error in case of writing '0-' to cpuset/N/{cpus,mems} file.

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
puset/cpuset_base_ops_test/cpuset_base_ops_testset.sh
d266efb30fd17c290de5bbdf55afcfbbcce3315a 04-Oct-2013 Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com> controllers/cpuset: required number of nodes

Initially these testcases required a host with 4 CPUs
and 3 memory nodes minumum. This prevented to run the
testcases on widely used 2-memory-nodes configuration.

And in fact the testcases only need 2 memory nodes, and
a few needs 4 CPUs.

Modified the checks accordingly. Now "ideal" minumum
configuration of a host is 4 CPUs and 2 memory nodes.

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
puset/cpuset_base_ops_test/cpuset_base_ops_testset.sh
puset/cpuset_funcs.sh
puset/cpuset_load_balance_test/cpuset_load_balance_test.sh
puset/cpuset_load_balance_test/cpuset_sched_domains_test.sh
puset/cpuset_memory_spread_test/cpuset_memory_spread_testset.sh
puset/cpuset_memory_test/cpuset_memory_testset.sh
puset/cpuset_syscall_test/cpuset_syscall_testset.sh
836c1f2982c2b1f17a0925987b36565327371ed9 04-Oct-2013 Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com> controllers/cpuset: fix for old grep

It seems that '\s' does not work with old version
of grep (2.6.3).

Therefore several testcases fail on some distributions
using this version. For example - RHEL5-based.

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
puset/cpuset_memory_spread_test/cpuset_memory_spread_testset.sh
puset/cpuset_syscall_test/cpuset_syscall_testset.sh
9d466859928d3b811032d0cfd9eea99677f9942a 04-Oct-2013 Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com> controllers/cpuset: removed './' next to binaries

In the testcases removed './' next to binaries.

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
puset/cpuset_hotplug_test/cpuset_hotplug_test.sh
puset/cpuset_load_balance_test/cpuset_load_balance_test.sh
puset/cpuset_load_balance_test/cpuset_sched_domains_test.sh
puset/cpuset_memory_pressure_test/cpuset_memory_pressure_testset.sh
puset/cpuset_memory_spread_test/cpuset_memory_spread_testset.sh
puset/cpuset_memory_test/cpuset_memory_testset.sh
puset/cpuset_syscall_test/cpuset_syscall_testset.sh
e44edbaf213f3e3a5499aa123f86e60e633617a1 04-Oct-2013 Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com> controllers/cpuset: reorganization

A separate name 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.kholmanskikh@oracle.com>
puset/cpuset_base_ops_test/cpuset_base_ops_testset.sh
puset/cpuset_exclusive_test/cpuset_exclusive_test.sh
puset/cpuset_funcs.sh
puset/cpuset_hierarchy_test/cpuset_hierarchy_test.sh
puset/cpuset_hotplug_test/cpuset_hotplug_test.sh
puset/cpuset_inherit_test/cpuset_inherit_testset.sh
puset/cpuset_load_balance_test/cpuset_load_balance_test.sh
puset/cpuset_load_balance_test/cpuset_sched_domains_test.sh
puset/cpuset_memory_pressure_test/cpuset_memory_pressure_testset.sh
puset/cpuset_memory_spread_test/cpuset_memory_spread_testset.sh
puset/cpuset_memory_test/cpuset_memory_testset.sh
puset/cpuset_syscall_test/cpuset_syscall_testset.sh
puset/run_cpuset_test.sh
est_controllers.sh
971bcd7e51e4e6f94a58374f9b3cd22e53e7e53e 01-Oct-2013 Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com> cpuset/cpuset_load_balance_test: fixes

Fixed lack of '#include "config.h"', perform some cleanup
and set nr_cpus, nr_mems based on environment.

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
puset/cpuset_load_balance_test/cpuset_cpu_hog.c
puset/cpuset_load_balance_test/cpuset_load_balance_test.sh
puset/cpuset_load_balance_test/cpuset_sched_domains_check.c
puset/cpuset_load_balance_test/cpuset_sched_domains_test.sh
8ddc6cd37204819e67dbb2b7164475ebb21b02dd 01-Oct-2013 Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com> cpuset_memory_spread_test: number of nodes and sync

For unification number of nodes is set based on environment.

OS caches were not reliably dropped after execution of 'dd'
on DATAFILE. And since 'dd' was executed in root cpuset the
caches were spread among all available memory nodes. Because on
consecutive reading of DATAFILE in cpuset_mem_hog didn't increase
memory consumption. This situation caused random failures of
the testcase.

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.kholmanskikh@oracle.com>
puset/cpuset_memory_spread_test/cpuset_memory_spread_testset.sh
b5077cf12f122b97ee69f0f1438071ef1ddd66e3 01-Oct-2013 Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com> cpuset/cpuset_memory_test: fixes

cpuset_memory_test.c:
* lack of "config.h"
* incorrect use of HAVE_LINUX_MEMPOLICY macro
* modification to make use of sigwaitinfo
* some cleanup

cpuset_memory_testset.sh:
* number of cpu and memory nodes are set based on environment
* we send second SIGUSR1 signal to make the child free its 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.kholmanskikh@oracle.com>
puset/cpuset_memory_test/cpuset_memory_test.c
puset/cpuset_memory_test/cpuset_memory_testset.sh
aeafd8315e2d0d31207b54e6b246f1dae4836e18 01-Oct-2013 Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com> cpuset/cpuset_lib: cpuinfo.c compiled incorrectly

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.kholmanskikh@oracle.com>
puset/cpuset_lib/cpuinfo.c
87156a05a2ffd50f5e467d6f986daae9da7b9cf7 01-Oct-2013 Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com> cpuset/cpuset_syscall_test: fixes

cpuset_syscall_test.c:
I suppose that now there is no need in many '#if' and explicit
definition of functions get_mempolicy, set_mempolicy, mbind.
Including numa.h and numaif.h (as we do in the other testcases)
should be sufficient.

cpuset_syscall_testset.sh:
Since linux kernel 3.8.0 (commit 5606e3877ad8baea42f3a71ebde0a03622bbb551
"mm: numa: Migrate on reference policy") default task memory policy and
its output in /proc/<pid>/numa_maps changed.

For example in 3.7.10 for stack vma /proc/<pid>/numa_maps show:
7fff81e01000 default stack anon=3 dirty=3 N3=3
but in 3.8.0:
7fff08950000 prefer:3 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.kholmanskikh@oracle.com>
puset/cpuset_syscall_test/Makefile
puset/cpuset_syscall_test/cpuset_syscall_test.c
puset/cpuset_syscall_test/cpuset_syscall_testset.sh
08f8781892b8a28efbba8b4104beacb623ce39dd 01-Oct-2013 Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com> cpuset/cpuset_base_ops_test: fix expected error

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.kholmanskikh@oracle.com>
puset/cpuset_base_ops_test/cpuset_base_ops_testset.sh
27f2cc5998cd63a26a3c3d679bd1dec40cf741e7 01-Oct-2013 Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com> controllers/cpuset: removed bash sweetnesses

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
puset/cpuset_base_ops_test/cpuset_base_ops_testset.sh
puset/cpuset_exclusive_test/cpuset_exclusive_test.sh
puset/cpuset_funcs.sh
puset/cpuset_hierarchy_test/cpuset_hierarchy_test.sh
puset/cpuset_hotplug_test/cpuset_hotplug_test.sh
puset/cpuset_inherit_test/cpuset_inherit_testset.sh
puset/cpuset_load_balance_test/cpuset_load_balance_test.sh
puset/cpuset_load_balance_test/cpuset_sched_domains_test.sh
puset/cpuset_memory_pressure_test/cpuset_memory_pressure_testset.sh
puset/cpuset_memory_spread_test/cpuset_memory_spread_testset.sh
puset/cpuset_memory_test/cpuset_memory_testset.sh
puset/cpuset_syscall_test/cpuset_syscall_testset.sh
puset/run_cpuset_test.sh
208669109e427ee358285eba4073b5b07d475560 11-Jun-2013 Alexey Kodanev <alexey.kodanev@oracle.com> prot_hsymlinks & cgroup_xattr: fix copyright header

Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
group_xattr/Makefile
group_xattr/cgroup_xattr.c
0e335dbed65afb79eab5b30e8d49d8066f165316 29-May-2013 Alexey Kodanev <alexey.kodanev@oracle.com> New core test of cgroups and extended attributes

Support of extended attributes in cgroups was added in Linux 3.7.

Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
group_xattr/.gitignore
group_xattr/Makefile
group_xattr/README
group_xattr/cgroup_xattr.c
fdce7d5e2a219d201a2b0e3bab6b61b01ec1d716 04-Apr-2013 Cyril Hrubis <chrubis@suse.cz> Another semiautomated cleanup.

Remove comments such as:

- /* Test program identifier. */

- /* Total number of test cases. */

- /* Extern Global Variables */

- /* Harness Specific Include Files. */

- /* Standard Include Files */

- /* Parse standard options given to run the test. */

- etc.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
puctl/cpuctl_def_task01.c
puctl/cpuctl_def_task02.c
puctl/cpuctl_def_task03.c
puctl/cpuctl_def_task04.c
puctl/cpuctl_test01.c
puctl/cpuctl_test02.c
puctl/cpuctl_test03.c
puctl/cpuctl_test04.c
emctl/memctl_test01.c
359980f68b19c77c698b121b57a071dfe6e3ca31 15-Feb-2013 Jan Stancek <jstancek@redhat.com> rename syscall() macro to ltp_syscall()

This patch renames syscall() macro defined in linux_syscall_numbers.h
to reduce confusion with syscall(2). It also updates all places
where it was previously in use.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
puset/cpuset_lib/libcpuset.c
puset/cpuset_syscall_test/cpuset_syscall_test.c
354ebb48db8e66a853a58379a4808d5dcd1ceac3 07-Dec-2012 Wanlong Gao <gaowanlong@cn.fujitsu.com> cleanup code indent

Cleanup the code indent using:

find . -name *.c -exec Lindent {} \;

It's really a big change, but can fix almost all of
the indent problem in C code, although we can't
ensure all of the changes are right, but the error
changes are really few.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
group/getdelays.c
group/test_6_2.c
puctl/cpuctl_def_task01.c
puctl/cpuctl_def_task02.c
puctl/cpuctl_def_task03.c
puctl/cpuctl_def_task04.c
puctl/cpuctl_latency_check_task.c
puctl/cpuctl_latency_test.c
puctl/cpuctl_test01.c
puctl/cpuctl_test02.c
puctl/cpuctl_test03.c
puctl/cpuctl_test04.c
puctl_fj/cpuctl_fj_simple_echo.c
puset/cpuset_hotplug_test/cpuset_list_compute.c
puset/cpuset_lib/cpuinfo.c
puset/cpuset_lib/libbitmask.c
puset/cpuset_lib/libcpuset.c
puset/cpuset_load_balance_test/cpuset_cpu_hog.c
puset/cpuset_load_balance_test/cpuset_sched_domains_check.c
puset/cpuset_memory_pressure_test/cpuset_memory_pressure.c
puset/cpuset_memory_spread_test/cpuset_mem_hog.c
puset/cpuset_memory_test/cpuset_memory_test.c
puset/cpuset_syscall_test/cpuset_syscall_test.c
reezer/fork_exec_loop.c
reezer/timed_forkbomb.c
reezer/vfork.c
o-throttle/iobw.c
ibcontrollers/libcontrollers.c
emcg/control/mem_process.c
emcg/functional/memcg_process.c
emcg/regression/memcg_test_1.c
emcg/regression/memcg_test_2.c
emcg/regression/memcg_test_4.c
emcg/stress/memcg_process_stress.c
emctl/memctl_test01.c
4548c6cf9bcdd96d8303caa4130ab638b61f8a30 19-Oct-2012 Wanlong Gao <gaowanlong@cn.fujitsu.com> Update FSF address

find . -type f -exec sed -i 's/675 Mass Ave, Cambridge, MA 02139, USA/51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA/g' {} \;
find . -type f -exec sed -i 's/59 Temple Place, Suite 330, Boston, MA 02111-1307 USA/51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA/g' {} \;

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
group/cgroup_regression_test.sh
group/fork_processes.c
group/test_10_1.sh
group/test_10_2.sh
group/test_3_1.sh
group/test_3_2.sh
group/test_6_1.sh
group/test_6_2.c
group/test_9_1.sh
group/test_9_2.sh
group_fj/cgroup_fj_function.sh
group_fj/cgroup_fj_function2.sh
group_fj/cgroup_fj_proc.c
group_fj/cgroup_fj_stress.sh
group_fj/cgroup_fj_utility.sh
group_fj/run_cgroup_test_fj.sh
puacct/cpuacct_setup.sh
puacct/run_cpuacct_test.sh
puctl/cpuctl_def_task01.c
puctl/cpuctl_def_task02.c
puctl/cpuctl_def_task03.c
puctl/cpuctl_def_task04.c
puctl/cpuctl_latency_check_task.c
puctl/cpuctl_latency_test.c
puctl/cpuctl_test01.c
puctl/cpuctl_test02.c
puctl/cpuctl_test03.c
puctl/cpuctl_test04.c
puctl/parameters.sh
puctl/run_cpuctl_latency_test.sh
puctl/run_cpuctl_stress_test.sh
puctl/run_cpuctl_test.sh
puctl_fj/cpuctl_fj_cpu-hog.c
puctl_fj/cpuctl_fj_simple_echo.c
puctl_fj/run_cpuctl_test_fj.sh
puset/cpuset_base_ops_test/cpuset_base_ops_testset.sh
puset/cpuset_exclusive_test/cpuset_exclusive_test.sh
puset/cpuset_funcs.sh
puset/cpuset_hierarchy_test/cpuset_hierarchy_test.sh
puset/cpuset_hotplug_test/cpuset_hotplug_test.sh
puset/cpuset_inherit_test/cpuset_inherit_testset.sh
puset/cpuset_lib/cpuset_funcs.sh
puset/cpuset_load_balance_test/cpuset_cpu_hog.c
puset/cpuset_load_balance_test/cpuset_load_balance_test.sh
puset/cpuset_load_balance_test/cpuset_sched_domains_check.c
puset/cpuset_load_balance_test/cpuset_sched_domains_test.sh
puset/cpuset_memory_pressure_test/cpuset_memory_pressure.c
puset/cpuset_memory_pressure_test/cpuset_memory_pressure_testset.sh
puset/cpuset_memory_spread_test/cpuset_mem_hog.c
puset/cpuset_memory_spread_test/cpuset_memory_spread_testset.sh
puset/cpuset_memory_test/cpuset_memory_test.c
puset/cpuset_memory_test/cpuset_memory_testset.sh
puset/cpuset_syscall_test/cpuset_syscall_test.c
puset/cpuset_syscall_test/cpuset_syscall_testset.sh
puset/run_cpuset_test.sh
ibcontrollers/libcontrollers.c
ibcontrollers/libcontrollers.h
emcg/control/mem_process.c
emcg/control/memcg_control_test.sh
emcg/functional/memcg_function_test.sh
emcg/functional/memcg_getpagesize.c
emcg/functional/memcg_lib.sh
emcg/functional/memcg_max_usage_in_bytes_test.sh
emcg/functional/memcg_memsw_limit_in_bytes_test.sh
emcg/functional/memcg_move_charge_at_immigrate_test.sh
emcg/functional/memcg_process.c
emcg/functional/memcg_stat_test.sh
emcg/functional/memcg_usage_in_bytes_test.sh
emcg/functional/memcg_use_hierarchy_test.sh
emcg/regression/memcg_regression_test.sh
emcg/regression/memcg_test_1.c
emcg/regression/memcg_test_2.c
emcg/regression/memcg_test_4.c
emcg/regression/memcg_test_4.sh
emcg/stress/memcg_process_stress.c
emcg/stress/memcg_stress_test.sh
emctl/memctl_test01.c
emctl/myfunctions.sh
emctl/run_memctl_test.sh
est_controllers.sh
58e4d417516cf8265f7c01c930c2b993fe8729ca 18-Oct-2012 Wanlong Gao <gaowanlong@cn.fujitsu.com> let testcases use the new api commands tst_ncpus/_max

Change the testcases use the new api commands tst_ncpus/_max
to get the CPUS onlined and configured.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
puacct/run_cpuacct_test.sh
puctl/run_cpuctl_latency_test.sh
puctl/run_cpuctl_stress_test.sh
puctl/run_cpuctl_test.sh
puset/cpuset_funcs.sh
puset/cpuset_lib/cpuset_funcs.sh
37550cf5a86c7ca7424a2a318dd64e550f13f5df 18-Oct-2012 Chris Dearman <chris@mips.com> Remove whitespace at end of line

This is a scripted change done using the following command:

find . -type d -name .git -prune -o \
-type f \! -name \*\~ \! -name .\#\* \
\! -name \*.gz \! -name \*.pdf \! -name \*.patch -print0 | \
xargs -0 sed -i -e 's/[\t ]*$//'

Signed-off-by: Chris Dearman <chris@mips.com>
group/cgroup_regression_test.sh
group_fj/README
group_fj/cgroup_fj_function.sh
group_fj/cgroup_fj_function2.sh
group_fj/cgroup_fj_stress.sh
group_fj/cgroup_fj_utility.sh
puacct/README
puacct/cpuacct_testplan.txt
puctl_fj/README
puset/cpuset_base_ops_test/cpuset_base_ops_testset.sh
puset/cpuset_exclusive_test/cpuset_exclusive_test.sh
puset/cpuset_hierarchy_test/cpuset_hierarchy_test.sh
puset/cpuset_hotplug_test/cpuset_hotplug_test.sh
puset/cpuset_inherit_test/cpuset_inherit_testset.sh
puset/cpuset_lib/cpuset.h
puset/cpuset_memory_test/cpuset_memory_testset.sh
emcg/README
emcg/control/memcg_control_test.sh
ec6edca7aa42b6affd989ef91b5897f96795e40f 18-Oct-2012 Chris Dearman <chris@mips.com> Add missing newline at end of file

This is a scripted change done using the following command:

find . -type d -name .git -prune -o \
-type f \! -name \*\~ \! -name .\#\* \
\! -name \*.gz \! -name \*.pdf \! -name \*.patch -print0 | \
xargs -0 sed -i -e '$a\'

Signed-off-by: Chris Dearman <chris@mips.com>
group/fork_processes.c
group_fj/cgroup_fj_proc.c
puacct/cpuacct_task01.c
puctl/cpuctl_latency_check_task.c
puctl/cpuctl_latency_test.c
puctl_fj/cpuctl_fj_cpu-hog.c
puctl_fj/cpuctl_fj_simple_echo.c
puset/cpuset_hotplug_test/cpuset_list_compute.c
puset/cpuset_lib/cpuinfo.c
puset/cpuset_lib/libbitmask.c
puset/cpuset_lib/meminfo.c
puset/cpuset_load_balance_test/cpuset_cpu_hog.c
puset/cpuset_load_balance_test/cpuset_sched_domains_check.c
puset/cpuset_memory_pressure_test/cpuset_memory_pressure.c
puset/cpuset_memory_spread_test/cpuset_mem_hog.c
reezer/fork_exec_loop.c
reezer/timed_forkbomb.c
ibcontrollers/libcontrollers.c
emcg/control/mem_process.c
emcg/functional/memcg_getpagesize.c
emcg/regression/memcg_test_1.c
emcg/regression/memcg_test_4.c
emcg/stress/memcg_process_stress.c
emctl/memctl_test01.c
94c5708a8dcb6baf61e0e8c7985c1c86685baf5f 24-Apr-2012 Peng Haitao <penght@cn.fujitsu.com> memcg_move_charge_at_immigrate_test: fix a bug of usage_in_bytes is not 'exact'

In memory.txt says:
usage_in_bytes is affected by the method and doesn't show 'exact' value of memory(and swap) usage, it's an fuzz value for efficient access. (Of course, when necessary, it's synchronized.) If you want to know more exact memory usage, you should use RSS+CACHE(+SWAP) value in memory.stat(see 5.2).

So memory.usage_in_bytes should be replaced with memory.stat in the case of
memcg_move_charge_at_immigrate_test.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
emcg/functional/memcg_lib.sh
emcg/functional/memcg_move_charge_at_immigrate_test.sh
b55240061add9475f0e5fbe24b0fda844b1647da 12-Mar-2012 Mike Frysinger <vapier@gentoo.org> expand gitignore coverage

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
group/.gitignore
group_fj/.gitignore
puacct/.gitignore
puctl/.gitignore
puctl_fj/.gitignore
puset/.gitignore
reezer/.gitignore
o-throttle/.gitignore
emcg/.gitignore
emctl/.gitignore
e26de088946a7ba9b252603a13e2484eeecd6997 29-Feb-2012 ZHou Guojian <Guojian.Zhou@windriver.com> run_cpuctl_test_fj.sh : change the cpu usage method.

The get_cpu_usage() function which used the "ps" command
could not get the cpu real time usage informaion.
So the run_cpuctl_test_fj.sh case19-22 would often run failed.

The "top" command could fix up this bug.

Signed-off-by: ZHou Guojian <Guojian.Zhou@windriver.com>
Tested-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
puctl_fj/run_cpuctl_test_fj.sh
98645d3c3449b372a149abee774c33852c23f2c3 23-Feb-2012 Peng Haitao <penght@cn.fujitsu.com> Add test usage_in_bytes

Add test cases of memory.usage_in_bytes and memory.memsw.usage_in_bytes.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
emcg/functional/memcg_usage_in_bytes_test.sh
d806da6aff7ecaa97bd02845c2be577e88bbcbd1 23-Feb-2012 Peng Haitao <penght@cn.fujitsu.com> Add test memory.use_hierarchy

Add test cases of memory.use_hierarchy.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
emcg/functional/memcg_use_hierarchy_test.sh
525a169037652c48d0bb0df2467bf9b7b838f883 23-Feb-2012 Peng Haitao <penght@cn.fujitsu.com> Add test memory.stat

Add test cases of memory.stat.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
emcg/functional/memcg_stat_test.sh
beb32f59014b903c46dcc9b4389a27aae19a74ce 23-Feb-2012 Peng Haitao <penght@cn.fujitsu.com> Add test memory.memsw.limit_in_bytes

Add test cases of memory.memsw.limit_in_bytes.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
emcg/functional/memcg_memsw_limit_in_bytes_test.sh
7ff68313c3bed7d2d0323365e2f94693965f6223 23-Feb-2012 Peng Haitao <penght@cn.fujitsu.com> Add test memory.move_charge_at_immigrate

Add test cases of memory.move_charge_at_immigrate.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
emcg/functional/memcg_move_charge_at_immigrate_test.sh
3ae3debadf57ad48fa2e2a481e6b9c3887cf3778 23-Feb-2012 Peng Haitao <penght@cn.fujitsu.com> Add test max_usage_in_bytes

Add test cases of memory.max_usage_in_bytes and memory.memsw.max_usage_in_bytes.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
emcg/functional/memcg_max_usage_in_bytes_test.sh
cea237917abd80240873e3c396d3903bbd78e654 23-Feb-2012 Peng Haitao <penght@cn.fujitsu.com> Modify memcg_function_test.sh to use lib

memcg_function_test.sh should use lib.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
emcg/functional/memcg_function_test.sh
5ac2d3d2b102464b97d9865055832b9a6414b763 23-Feb-2012 Peng Haitao <penght@cn.fujitsu.com> A library used to test memcg

This library includes a set of functions used to test memcg.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
emcg/functional/memcg_lib.sh
31604522f38b92e6968ef1013cf026346a2ef622 03-Jan-2012 Peng Haitao <penght@cn.fujitsu.com> memcg_function:fix the wrong of test_proc_kill

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 <penght@cn.fujitsu.com>
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
emcg/functional/memcg_function_test.sh
57019f3beae6b2d50cb403239cbe70d11990b9f5 03-Jan-2012 Markos Chandras <Markos.Chandras@imgtec.com> cgroup/getdelays: Squish uninitialized variable warning for old GCC compilers

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
group/getdelays.c
2df2407e27c0dfad702a36c9cf2accccff678dce 21-Dec-2011 Peng Haitao <penght@cn.fujitsu.com> memcg_function: delete redundant argument of check_mem_stat

check_mem_stat() need only one argument, so the second argument is redundant.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
emcg/functional/memcg_function_test.sh
17a0258436f77611bf3e2455a08c800aa911db27 15-Dec-2011 Peng Haitao <penght@cn.fujitsu.com> controllers: fix the wrong use of mlock and munmap

mlock and munmap will return -1 when ERROR.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Reviewed-by: Caspar Zhang <caspar@casparzhang.com>
Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
puset/cpuset_memory_test/cpuset_memory_test.c
emcg/functional/memcg_process.c
f67911d0cc32e65734115e930ffa5b7001aa9ccb 21-Dec-2011 Cyril Hrubis <chrubis@suse.cz> Revert "mlock and munmap will return -1 if they fail."

This reverts commit 17ecdc4e0f895f61067a65d6105f29d4f55680be.

The patch was applied only partly. Fixed version comes right away.
emcg/functional/memcg_process.c
17ecdc4e0f895f61067a65d6105f29d4f55680be 15-Dec-2011 Garrett Cooper <yanegomi@gmail.com> mlock and munmap will return -1 if they fail.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Reviewed-by: Caspar Zhang <caspar@casparzhang.com>
Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
emcg/functional/memcg_process.c
12a6408e32a9e2b5a774bded827b3f79cce1f3da 03-Nov-2011 Jan Stancek <jstancek@redhat.com> memcg_function_test: do a warmup before actual test

This test relies on getting correct rss number out of memory.stat.
Very rarely it fails and finds bigger number than expected,
for example:
memcg_function_test 6 TFAIL : rss=8192/4096

My assumption is that extra page is faulted in as result of
need for another stack page.

Documentation describes it as:
"rss - # of bytes of anonymous and swap cache memory."

This includes also stack pages. I intentionally modified
memcg_process' sigusr handler to grab few extra stack pages,
to confirm, that these indeed contribute to this number.

This patch adds a 'warmup' before actual test. The point
is to exercise the whole code path, so that any page fault,
which is unrelated to actual test occurs before process is
moved to target cgroup.

What happens now is:
spawn process
[NEW] signal it with SIGUSR1 (alloc)
[NEW] signal it with SIGUSR1 (free)
move it to cgroup
signal it with SIGUSR1 (alloc)
check rss in memory.stat
signal it with SIGUSR1 (free)
optionally check rss in memory.stat

Signed-off-by: Jan Stancek <jstancek@redhat.com>
emcg/functional/memcg_function_test.sh
ab837b74fcee26b52f68daec7777fc5b8781771b 19-Sep-2011 Jan Stancek <jstancek@redhat.com> cgroup/cpuctl: clean cpuctl_task_* in case of OOM

If one of cpuctl_task_* gets killed by OOM, it won't
signal run script with SIGUSR1, and trap action
"killall cpuctl_task_*;" never runs.

Try to kill all left over cpuctl_task_* in cleanup() to be sure,
none are left behind.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
puctl/parameters.sh
775fbe2a31493bd57011e8dd96331b5b00fb61bc 19-Sep-2011 Jan Stancek <jstancek@redhat.com> cgroup/memcg_regression_test: treat failed mount as error

If test fails to mount memory subsytem, it should exit
with non-zero code.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
emcg/regression/memcg_regression_test.sh
21fcf86f1c65207bf20c17892720895c5e3bc7c7 19-Sep-2011 Jan Stancek <jstancek@redhat.com> cgroup/memcg_regression_test: fix test4 cleanup

If test_4.sh gets killed, it won't clean cgroup it created,
so clean it here.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
emcg/regression/memcg_regression_test.sh
81b12e500d38b4c511f8781ca3b36c211f824800 19-Sep-2011 Jan Stancek <jstancek@redhat.com> cgroup/memcg_regression_test: clear dmesg before test

dmesg can rotate and number of found bugs can actually go down,
so clear the buffer before test to avoid this.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
emcg/regression/memcg_regression_test.sh
489fc0e8a283d0791c9be1f65f25d2bf02e8e0fc 19-Sep-2011 Jan Stancek <jstancek@redhat.com> cpuset_base_ops_testset.sh: drop sched_relax_domain_level test

At the moment we don't have reliable way to enumerate
all possible values, which can be used. They are dependent
on both kernel version and kernel config.

Based on previous discussion here:
http://article.gmane.org/gmane.linux.ltp/14146/match=sched_relax_domain_level
it seems better to get rid of this testcase, rather than testing
internal knobs, which can change at anytime.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
puset/cpuset_base_ops_test/cpuset_base_ops_testset.sh
019ed6c71369217ac02c399abb12abb93bd527f3 26-Aug-2011 Cyril Hrubis <chrubis@suse.cz> Fix build with latest glibc.

Since glibc commit ce67228d570d2df88d74184e5e3618a5b2ef8704
(glibc-2.14 probably) the cloning flags require _GNU_SOURCE defined.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
group/test_6_2.c
3417a3fb67c8107af5b9cb3bcee106dd083ea9a0 22-Aug-2011 Jan Stancek <jstancek@redhat.com> memcg_test_2.c: clear all fields of sigaction structure

This test didn't set all fields of sigaction structure before
using it, which caused some of them to be left in random state.
Namely sa_flags could end up with SA_RESTORER, which after
receiving signal would call invalid pointer in sa_restorer.

Something, we apparently hit here:
Bug 731954 - segfault on s390x when setting memory.limit_in_bytes
https://bugzilla.redhat.com/show_bug.cgi?id=731954

Fix this by zero-ing whole structure before usage.
Clearing just sa_flags should be enough, but let's match the style
of other test in this group: memcg_test_4.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
emcg/regression/memcg_test_2.c
9853cb4c81e1388479c21b6ea96b75b74995f65e 30-Jun-2011 Andrew Chen <ypchen@faraday-tech.com> testcases: memcg_function: set hugepage size to zero when no hugepage support

Signed-off-by: Andrew Chen <ypchen@faraday-tech.com>
emcg/functional/memcg_function_test.sh
22b6b918d008a7813eefb8626a70bebd566dc66a 30-Jun-2011 Andrew Chen <ypchen@faraday-tech.com> testcases: controllers: fix wrong cpu number calculated

Only "Processor" will be showed up in /proc/cpuinfo for ARM non-SMP CPUs.
Ignore case to fix this issue.

Signed-off-by: Andrew Chen <ypchen@faraday-tech.com>
puacct/run_cpuacct_test.sh
puctl/run_cpuctl_latency_test.sh
puctl/run_cpuctl_stress_test.sh
puctl/run_cpuctl_test.sh
8542ed618f00a38cfda7600384a007f9911e5b55 22-Jul-2011 Jan Stancek <jstancek@redhat.com> cgroups/cgroup_regression_test: fix test_*.sh trap in loop

test_*.sh scripts use trap in tight loop, which may cause bash
to miss signal, see:
https://bugzilla.redhat.com/show_bug.cgi?id=695656

Move trap outside loop to avoid it.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
group/test_10_1.sh
group/test_10_2.sh
group/test_3_1.sh
group/test_3_2.sh
group/test_6_1.sh
group/test_9_1.sh
group/test_9_2.sh
9bedd8f536847589702e1ad1fd936a41510d042d 22-Jul-2011 Jan Stancek <jstancek@redhat.com> cgroups/cgroup_regression_test: fix test_10 cleanup

test_10 can leave cgroups umounted before cleanup,
make sure cgroups are mounted before doing cleanup.
Also keep stderr output from rmdir and umount,
if these fail it's better to have it in logs.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
group/cgroup_regression_test.sh
7c24ff7ead383484fdc2e799da5c39966926e630 22-Jul-2011 Jan Stancek <jstancek@redhat.com> cgroups/cgroup_regression_test: fix test_7_2 failed mount message

test_7_2 mounts whole cgroup not $subsys

Signed-off-by: Jan Stancek <jstancek@redhat.com>
group/cgroup_regression_test.sh
efddd4fd581790e2121d2a0e6d953807eebb9fc7 22-Jul-2011 Jan Stancek <jstancek@redhat.com> cgroups/cgroup_regression_test: fix test_6 cleanup

test may leave groups behind, fix rmdir to match test_6_1.sh

Signed-off-by: Jan Stancek <jstancek@redhat.com>
group/cgroup_regression_test.sh
fb5cb67aefa4f5cd00c9f3bbe06bdf87004a73cb 22-Jul-2011 Jan Stancek <jstancek@redhat.com> cgroups/cgroup_regression_test: fix test_5 mount typo

test_5 should mount 2 subsystems, but mount command has typo,
it says "$subsys" instead of "$subsys2"

Signed-off-by: Jan Stancek <jstancek@redhat.com>
Signed-off-by: Andrew Chen <ypchen@faraday-tech.com>
group/cgroup_regression_test.sh
e67dd48747851c79a3487911cd77333f3c540ac6 22-Jul-2011 Jan Stancek <jstancek@redhat.com> cgroups/cgroup_regression_test: clear dmesg before test

dmesg can rotate and number of found bugs can actually go down,
clear the buffer before test to avoid this

Signed-off-by: Jan Stancek <jstancek@redhat.com>
group/cgroup_regression_test.sh
b382804b39064ec05b682e76c79277e29c1b4e6d 07-Jun-2011 Jan Stancek <jstancek@redhat.com> cgroups/cpuacct_setup: fix task_kill() search for process

1. "i* in "grep cpuacct_taski*" seems pointless as
its target is cpuacct_task01

2. using cut fails when ps indents the output as following:
99 cpuacct_task01
112 cpuacct_task01
1111 cpuacct_task01

Signed-off-by: Jan Stancek <jstancek@redhat.com>
puacct/cpuacct_setup.sh
6404352c10f1f2d91956ee9830a36f1fb6d2c6b2 23-May-2011 Garrett Cooper <yanegomi@gmail.com> Some testcases are not subsystem specific, So there's no need
to mount all subsystems at "cgroup/". Furthre more, if some
subsystem is already mounted, it would fail if we're trying
to mount all subsystems at a mountpoint.
This patch creates a hierarchy with no bound subsystems.

Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
group/cgroup_regression_test.sh
f8d9373e0b1042459c32d55fc2636c1cdfe3f817 20-Apr-2011 Cyril Hrubis <chrubis@suse.cz> Remove removed testcases from test_controllers.sh script.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
est_controllers.sh
4a1b88c146e89ac3dc78501321cb2d17ed760345 20-Apr-2011 Michal Hocko <mhocko@suse.cz> Fix memctl tests 1 and 2

Since http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=7dc74be032bfcaa2f9d9e4296ff5bbddfa9e2f19
introduced in 2.6.34-rc2 we have a per-groub knob which controls if and what
kind of memory is recharged to the group if a task is migrated.
The current default is no migration but who knows what will happen later so
we should rather enforce no migration for this test.

Signed-off-by: Michal Hocko <mhocko@suse.cz>
emctl/run_memctl_test.sh
513185f86f94a87cb83aefc7f727594746bd44ad 20-Apr-2011 Michal Hocko <mhocko@suse.cz> revert memctl test 3

This test relies on two things:
- CONFIG_CGROUP_MEM_RES_CTLR_SWAP is on which is not true for many
distributions and even if it is enabled it still can be disabled
by the kernel command-line parameter
- $GRP1_MEMUSAGE -gt $MEMLIMIT_GROUP_1 is never true because either
we reclaim some memory to allow further allocation for the group
or the application gets killed by OOM.

I think that the best way is just to revert this test case. It doesn't test
for anything useful, anyway.

Signed-off-by: Michal Hocko <mhocko@suse.cz>
emctl/memctl_testplan.txt
emctl/run_memctl_test.sh
16461fc29c6063146232952b2cef7c24b4d667e8 20-Apr-2011 Michal Hocko <mhocko@suse.cz> Remove memctl test 4

The test relies on the exact value of memory.usage_in_bytes but the internal
kernel accounting for this counter has changed with
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=cdec2e4265dfa09490601b00aeabd8a8d4af30f0
(merged in 2.6.33-rc1) upstream commit which implemented per-cpu batch
charging to improve scalability.

This means that the value of memory.usage_in_bytes is updated in
CHARGE_BATCH (currently 32 pages) chunks so the exported value may be in
+-NUR_ONLINE_CPUS*CHARGE_BATCH range.

There is also another optimization for uncharging which is done in batches
as well. This, however, is not per-cpu but rather per task to make exit (or
more precisely memory regions unmap) path as fast as possible. Very roughly
it marks a block of uncharges which are counted per task and once the block
is done the accumulated value is subtracted from the resource counter.

This means that the value is rather fuzzy and we cannot use it for any exact
comparisons.

Signed-off-by: Michal Hocko <mhocko@suse.cz>
emctl/memctl_testplan.txt
emctl/run_memctl_test.sh
66ee0905402744aca530c60e3da62c32c3969863 20-Apr-2011 Garrett Cooper <yanegomi@gmail.com> Don't check for "cache" in memory.stat.

Even if the task gets killed, cache might be still in page
cache, and "cache" showed in memory.stat might not be zero.
So just kill the checking of "cache".

Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
emcg/functional/memcg_function_test.sh
b6a1aceee05cffa2e93a28af19ebf1dfa037ece0 14-Apr-2011 Garrett Cooper <yanegomi@gmail.com> Stupid me. Got it backwards.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
emcg/functional/memcg_process.c
8e9f01369fb81b75badc16ae788d4d7922e977af 14-Apr-2011 Garrett Cooper <yanegomi@gmail.com> Merge branch 'master' of ssh://ltp.git.sourceforge.net/gitroot/ltp/ltp
c966e87111503a5ff7ca6200d5ad4ce1601b47cb 14-Apr-2011 Garrett Cooper <yanegomi@gmail.com> Fix signal handler initialization.

1. There seems to be copy paste error, instead of clearing
sigusr_action.sa_mask it clears sigint_action.sa_mask.
Change comes from 6c4d1c6d4b3c116ff88f9209b4860940fb8659a8

2. Other fields of these structures are left to be uninitialized.

Both 1) and 2) make the behaviour unexpected. Occasionally I saw,
this program to end upon receiving SIGUSR1.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
emcg/functional/memcg_process.c
c4701025b5408ec1d71abc4fe1e597adfd40d5f4 21-Feb-2011 Han Pingtian <phan@redhat.com> Fix build of cpuset_syscall_test

Added $(NUMA_LIBS) into Makefile.

Signed-off-by: Han Pingtian <phan@redhat.com>
puset/cpuset_syscall_test/Makefile
a44a48e658e18b9c6b7de67dc8c58ec9e213a5f2 21-Feb-2011 Han Pingtian <phan@redhat.com> Fix build of cpuset_syscall_test

Added $(NUMA_LIBS) into Makefile.

Signed-off-by: Han Pingtian <phan@redhat.com>
puset/cpuset_syscall_test/Makefile
12475ee0bd6cc6d4537677b794067898f4e8a182 25-Mar-2011 Peng Haitao <penght@cn.fujitsu.com> libcpuset.c: fix error of undefined reference to 'get_mempolicy'

'HAVE_DECL_MEMPOLICY' is wrong in commit 6c4d1c6.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
puset/cpuset_lib/libcpuset.c
75443f90281b06036727d257796f4effb749c604 23-Mar-2011 Cyril Hrubis <chrubis@suse.cz> Commit 223e12e rename file cgroup_fj_testcases to cgroup_fj_testcases.sh,
so cgroup_fj_testcases should be replaced with cgroup_fj_testcases.sh in
run_cgroup_test_fj.sh.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
group_fj/README
group_fj/run_cgroup_test_fj.sh
1e5873887512be9d1ec109c4d5c77bccd16fa2b7 15-Mar-2011 Garrett Cooper <yanegomi@gmail.com> Make sure the global variable TCID is defined.

Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
puset/cpuset_syscall_test/cpuset_syscall_test.c
bacc849720ec4efda5a0a8a9ea6a0e93a1415541 14-Jan-2011 Garrett Cooper <yanegomi@gmail.com> Remove references to malloc.h. Sort headers some.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
o-throttle/iobw.c
5262667a4c30c82180d439bae4d7787f45281289 21-Dec-2010 Garrett Cooper <yanegomi@gmail.com> Fix some signalhandling code.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
reezer/vfork.c
b6ff02cd9592e40c4b435ff7755cb69572a23f47 20-Dec-2010 Garrett Cooper <yanegomi@gmail.com> Fix all remaining warnings.

These warnings were mostly caused by the fact that tst_brk* is now reentrant
and thus, the noreturn attribute is removed.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
puctl/cpuctl_def_task01.c
puctl/cpuctl_def_task02.c
puctl/cpuctl_def_task03.c
puctl/cpuctl_def_task04.c
puctl/cpuctl_test01.c
puctl/cpuctl_test02.c
puctl/cpuctl_test03.c
puctl/cpuctl_test04.c
b4fb4fdc43e1dd4b3bd31e7a67beac8dd1f0e416 20-Dec-2010 Garrett Cooper <yanegomi@gmail.com> Fix testcases and tools that don't depend on libltp.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
puset/cpuset_memory_test/cpuset_memory_test.c
857712fe2a8a93dd5a30f2981061c6fe797a76f1 20-Dec-2010 Garrett Cooper <yanegomi@gmail.com> getdelays.c doesn't use libltp.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
group/getdelays.c
1e6f5a673655551de5734ff31ef48cd63b604e6d 19-Dec-2010 Garrett Cooper <yanegomi@gmail.com> Resolving all compile errors via a script

This may leave dupe calls to tst_exit in main, but those are easier
to deal (and much less) than no-compile scenarios.

As a side-effect, fix all trailing whitespace issues.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
group/fork_processes.c
group/test_6_2.c
group_fj/cgroup_fj_proc.c
puacct/cpuacct_task01.c
puctl/cpuctl_latency_check_task.c
puctl/cpuctl_latency_test.c
puctl_fj/cpuctl_fj_cpu-hog.c
puctl_fj/cpuctl_fj_simple_echo.c
puset/cpuset_hotplug_test/cpuset_list_compute.c
puset/cpuset_lib/libcpuset.c
puset/cpuset_memory_pressure_test/cpuset_memory_pressure.c
puset/cpuset_syscall_test/cpuset_syscall_test.c
o-throttle/iobw.c
emcg/control/mem_process.c
emcg/functional/memcg_getpagesize.c
emcg/functional/memcg_process.c
emcg/regression/memcg_test_1.c
emcg/regression/memcg_test_2.c
emcg/regression/memcg_test_4.c
emcg/stress/memcg_process_stress.c
emctl/memctl_test01.c
72521cf0741034f67dd17107453cda9a9819264c 18-Dec-2010 Garrett Cooper <yanegomi@gmail.com> Fix more tests; remove more Tst_count externs.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
puctl/cpuctl_def_task01.c
puctl/cpuctl_def_task02.c
puctl/cpuctl_def_task03.c
puctl/cpuctl_def_task04.c
puctl/cpuctl_latency_test.c
puctl/cpuctl_test01.c
puctl/cpuctl_test02.c
puctl/cpuctl_test03.c
puctl/cpuctl_test04.c
6c4d1c6d4b3c116ff88f9209b4860940fb8659a8 18-Dec-2010 Garrett Cooper <yanegomi@gmail.com> Fix all warnings.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
group_fj/cgroup_fj_proc.c
puacct/cpuacct_task01.c
puctl/cpuctl_latency_check_task.c
puctl/cpuctl_latency_test.c
puctl_fj/cpuctl_fj_cpu-hog.c
puctl_fj/cpuctl_fj_simple_echo.c
puset/cpuset_hotplug_test/cpuset_list_compute.c
puset/cpuset_lib/libcpuset.c
puset/cpuset_memory_pressure_test/cpuset_memory_pressure.c
puset/cpuset_syscall_test/cpuset_syscall_test.c
emcg/functional/memcg_getpagesize.c
emcg/functional/memcg_process.c
emcg/regression/memcg_test_1.c
emcg/regression/memcg_test_2.c
emcg/regression/memcg_test_4.c
0814418f628e6c1391da15f0c9b55849197cc507 18-Dec-2010 Garrett Cooper <yanegomi@gmail.com> Fix format string warnings.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
o-throttle/iobw.c
61ca66978059c21c98d4f10b09ca071b1f6056a8 18-Dec-2010 Garrett Cooper <yanegomi@gmail.com> Fix the compile and provide useful diags for failures.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
emcg/control/mem_process.c
864a20e3d5953c588f0bd15675d0d463fd8f9d03 18-Dec-2010 Garrett Cooper <yanegomi@gmail.com> Fix compile and other minor issues.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
emcg/stress/memcg_process_stress.c
fb5799a88c4476cd901448e265829c8b12ebef2c 18-Dec-2010 Garrett Cooper <yanegomi@gmail.com> Cleanup and fix testcase.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
emctl/memctl_test01.c
aab7c00a7425ada5f64f5ef92263b828709296f9 17-Dec-2010 Garrett Cooper <yanegomi@gmail.com> Fix undefined references to libltp APIs.

Also sort headers and do minor cleanup.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
group/test_6_2.c
23060f4c29afc173b31215a567a6173a67e21f82 17-Dec-2010 Garrett Cooper <yanegomi@gmail.com> Fix style, types, and remove libltp API calls.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
group/fork_processes.c
2c28215423293e443469a07ae7011135d058b671 16-Dec-2010 Garrett Cooper <yanegomi@gmail.com> Style and conformance changes.

1. Strip all leading space.
2. Move tst_exit() to main().
3. Remove tst_exit() from cleanup().
4. Remove cluebat comments.
5. Reduce some unnecessary whitespace.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
group/fork_processes.c
group/getdelays.c
group/test_6_2.c
group_fj/cgroup_fj_proc.c
puacct/cpuacct_task01.c
puctl/cpuctl_def_task01.c
puctl/cpuctl_def_task02.c
puctl/cpuctl_def_task03.c
puctl/cpuctl_def_task04.c
puctl/cpuctl_latency_check_task.c
puctl/cpuctl_latency_test.c
puctl/cpuctl_test01.c
puctl/cpuctl_test02.c
puctl/cpuctl_test03.c
puctl/cpuctl_test04.c
puctl_fj/cpuctl_fj_cpu-hog.c
puctl_fj/cpuctl_fj_simple_echo.c
puset/cpuset_hotplug_test/cpuset_list_compute.c
puset/cpuset_lib/cpuinfo.c
puset/cpuset_lib/libbitmask.c
puset/cpuset_lib/libcpuset.c
puset/cpuset_lib/meminfo.c
puset/cpuset_load_balance_test/cpuset_cpu_hog.c
puset/cpuset_load_balance_test/cpuset_sched_domains_check.c
puset/cpuset_memory_pressure_test/cpuset_memory_pressure.c
puset/cpuset_memory_spread_test/cpuset_mem_hog.c
puset/cpuset_memory_test/cpuset_memory_test.c
puset/cpuset_syscall_test/cpuset_syscall_test.c
reezer/fork_exec_loop.c
reezer/timed_forkbomb.c
reezer/vfork.c
o-throttle/iobw.c
ibcontrollers/libcontrollers.c
emcg/control/mem_process.c
emcg/functional/memcg_getpagesize.c
emcg/functional/memcg_process.c
emcg/regression/memcg_test_1.c
emcg/regression/memcg_test_2.c
emcg/regression/memcg_test_4.c
emcg/stress/memcg_process_stress.c
emctl/memctl_test01.c
df3eb16e38c6a163b0a7367c885679eed6140964 29-Nov-2010 Garrett Cooper <yanegomi@gmail.com> Deal with a lot of annoying style nits.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
group_fj/cgroup_fj_proc.c
puset/cpuset_load_balance_test/cpuset_cpu_hog.c
reezer/vfork.c
ibcontrollers/libcontrollers.c
emcg/control/mem_process.c
d2eaa506e661410156ad547d5847ef88205561bf 21-Nov-2010 Garrett Cooper <yanegomi@gmail.com> Remove unused variables.

Signed-off-by: Francesco RUNDO <francesco.rundo@st.com>
group/getdelays.c
6c1c5acd356aa524b1d6b1f497cbee99e0aa9e5e 22-Sep-2010 Garrett Cooper <yanegomi@gmail.com> Remove multibyte noise in shebang.

In RHEL4.8, the shell file is recognized as binary file.
In RHEL5.5, the first command line of the shell cannnt be recognized.

By following patch, BOM (Byte Order Mark) was set to
"memcg_stress_test.sh":
http://ltp.git.sourceforge.net/git/gitweb.cgi?p=ltp/ltp-dev.git;a=commitdiff;h=9b9a6bb10258bc975bd1707b418699264d3bdcef#patch1

I noticed BOM in the shell by using "less memcg_stress_test.sh" command.

I removed this BOM and this test passed.

Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp>
emcg/stress/memcg_stress_test.sh
88bf535821cc5b49131038b1873e369fd2947ed0 17-Sep-2010 Garrett Cooper <yanegomi@gmail.com> Add missing return code.

Noticed by Masaya Eramoto (eramoto.masaya@jp.fujitsu.com).

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
puset/cpuset_syscall_test/cpuset_syscall_test.c
9b9a6bb10258bc975bd1707b418699264d3bdcef 14-Sep-2010 Subrata Modak <subratamodak@subratamodak.linux.ibm.com> Patch suggested inside LTP memcg stress test case 'memcg_stress_test.sh':
Hi,
We have found out a cgroup test case issue with 'ltp-full-20100331/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh'. The sniff of test case function is as below:-

Note: - Below code sniff is taken from latest LTP August month release.

run_stress()
{
do_mount;

for i in $(seq 0 $(($1-1)))
do
mkdir /dev/memcg/$i 2> /dev/null
./memcg_process_stress $2 $3 &
eval pid$i=$!

eval echo \$pid$i > /dev/memcg/$i/tasks
done

for i in $(seq 0 $(($1-1)))
do
eval /bin/kill -s SIGUSR1 \$pid$i 2> /dev/null
done

sleep $4

for i in $(seq 0 $(($1-1)))
do
eval /bin/kill -s SIGINT \$pid$i 2> /dev/null <----send SIGINT signal for a pid
eval wait \$pid$i

rmdir /dev/memcg/$i 2> /dev/null
done

cleanup;
}

Basically, the test case is not doing a proper cleanup using SIGINT.It seems that the current test runs for much longer time than expected, thus affecting test performance. During this course of time, other dependent tests were also not proceeding further and system seemed to be in a process hang state. However we have found that SIGKILL does a better cleanup job compared to SIGINT, to overcome this situation.

So, I have created a patch to fix above test case issue. Kindly review this patch and acknowledge. I think this patch can be merged into latest LTP code to avoid this problem.

Please let me know if you need any clarifications.
Signed-off-by: Shubham <shubham@linux.vnet.ibm.com>,
emcg/stress/memcg_stress_test.sh
c58cf0cff52cc72179c6fb4303509a3f2db19945 31-Mar-2010 Rishikesh K Rajak <risrajak@linux.vnet.ibm.com> cgroup_fj_release_agent is not getting installed as it does not end with *.sh.

And

Other fix is about the indentation of rtc device driver testcases

Signed-off-by: Rishikesh K Rajak <risrajak@linux.vnet.ibm.com>
group_fj/Makefile
391e757d43b3ac33a4a435e319ee77b1daa6da76 23-Mar-2010 Rishikesh K Rajak <risrajak@linux.vnet.ibm.com> Fix the proper return for testcase.

Reported By: Srinivasa R Chamarthy <schamart@linux.vnet.ibm.com>
Signed-off By: Rishikesh K Rajak <risrajak@linux.vnet.ibm.com>
group_fj/run_cgroup_test_fj.sh
00c8b3450d151482e9f7424224fc8a64bff27fdd 11-Mar-2010 Garrett Cooper <yanegomi@gmail.com> Merge branch 'master' of ssh://yaberauneya@ltp.git.sourceforge.net/gitroot/ltp/ltp-dev
007dce57f645ad796f8cb60a13de936ac04fd1e8 11-Mar-2010 Garrett Cooper <yanegomi@gmail.com> Hi,

I found following problem about "memcg_control" test.
---------
/opt/ltp/testcases/bin/memcg_control_test.sh: line 30: [: : integer
expression expected
----------

This happens because of following process.
[ memcg_control_test.sh: line 30 ]
---------
if [ "$(grep -w memory /proc/cgroups | cut -f4)" -ne "1" ]; then
echo "WARNING:"
echo "Either kernel does not support memory resource controller or
feature not ena
bled"
echo "Skipping all memcg_control testcases...."
exit 0
fi
---------

"$(grep -w memory /proc/cgroups | cut -f4)" can't comparable with "1"
if "$(grep -w memory /proc/cgroups | cut -f4)" = nothing.

How about fixing like the other "memcg" tests?

Signed-off-by: Yuki Yao<y_yao@ryobi.co.jp>
Acked-by: Garrett Cooper <yanegomi@gmail.com>
emcg/control/memcg_control_test.sh
58854395050b8a3bb2fa4e5e4401546925f6aad8 08-Mar-2010 Rishikesh K Rajak <risrajak@linux.vnet.ibm.com> Commenting "make all" in run_freezer.sh file as it is stopping to run
the freezer testcase

Signed-off By: Rishikesh K Rajak<risrajak@linux.vnet.ibm.com>
reezer/run_freezer.sh
63f0a8f554d28b28b207f41e42182e1b789333b6 08-Mar-2010 Rishikesh K Rajak <risrajak@linux.vnet.ibm.com> libcgroup_freezer , pushd/popd removal.

> I went over the libcgroup_freezer testcase and there are a number
> of areas which use pushd / popd. I realize this was for ease-of-use,
> but pushd / popd aren't functional built-ins with busybox and so the
> testcases fail on Debian based distros. Could you please fix this?
> Thanks,
> -Garrett

I ported and tested your patch on top of latest git. And it works fine.

Tested & Ported-By: Rishikesh K Rajak <risrajak@linux.vnet.ibm.com>
Reported-By :Garrett Cooper <yanegomi@gmail.com>
Signed-off By: Matt Helsley <matthltc@linux.vnet.ibm.com>
reezer/libcgroup_freezer
6d722f4ff2317c60f9fff1287af5d41cddca937e 08-Mar-2010 Garrett Cooper <yanegomi@gmail.com> Use $TMP (which defaults to /tmp) rather than /tmp as $TMP can be parameterized via runltp, et all.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
reezer/libcgroup_freezer
223e12ee3f7fdb525746462747954552f0e07538 08-Mar-2010 Garrett Cooper <yanegomi@gmail.com> Fix install for cgroup_fj_testcases.

Turns out this script wasn't being installed properly, and thus its testcases were failing; fix by suffixing with .sh

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
group_fj/cgroup_fj_testcases
group_fj/cgroup_fj_testcases.sh
49010e502a74cb6461fe9c64c90dd878c8edd398 08-Mar-2010 Garrett Cooper <yanegomi@gmail.com> Replace pushd // popd with cd calls.

Busybox doesn't have a concept of the pushd // popd builtins available in bash and tcsh, so let's convert the calls to cd. This is just something I noticed after executing this test, and I know there are other locations that need to be cleaned up like this in the tree...

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
emcg/control/memcg_control_test.sh
d822fce8b5b1c353cc879070774875984cd44b2c 03-Mar-2010 Rishikesh K Rajak <risrajak@linux.vnet.ibm.com> Merge branch 'next' of ssh://ltp.git.sourceforge.net/gitroot/ltp/ltp-dev
b60acfe85c751a8996df7e9648e031a16b27fe15 03-Mar-2010 Garrett Cooper <yanegomi@gmail.com> Inspite of memcg kernel support being available, memcg_[functional|regression
|stress] test script fails to execute with message

"Either Kernel does not support for memory resource controller or feature not enabled"
"Skipping all memcgroup testcases...."

Fix the scripts to use proper if []; then .. fi statements.

Signed-off-by : Sachin Sant <sachinp@in.ibm.com>
emcg/functional/memcg_function_test.sh
emcg/regression/memcg_regression_test.sh
emcg/stress/memcg_stress_test.sh
88a1dde39cc27bd9db20297c640376ef413a8aad 03-Mar-2010 Rishikesh K Rajak <risrajak@linux.vnet.ibm.com> Merge branches 'master' and 'next' into next
c65443529ee1ab84f98777cdd4827066f4a69c96 02-Mar-2010 Rishikesh K Rajak <risrajak@linux.vnet.ibm.com> Inspite of memcg kernel support being available, memcg_[functional|regression
|stress] test script fails to execute with message

"Either Kernel does not support for memory resource controller or feature not enabled"
"Skipping all memcgroup testcases...."

Fix the scripts to use proper if []; then .. fi statements.

Signed-off-by : Sachin Sant <sachinp@in.ibm.com>
Acked-By & Tested-By: Rishikesh K Rajak <risrajak@linux.vnet.ibm.com>

Thanks
Rishi
emcg/functional/memcg_function_test.sh
emcg/regression/memcg_regression_test.sh
emcg/stress/memcg_stress_test.sh
c0b8157365beb18a627fe197be6ab111e8281e86 01-Mar-2010 Rishikesh K Rajak <risrajak@linux.vnet.ibm.com> New testcase added by Naufal.

These are the testcases I plan to implement (taken from
http://workouts.foss.in/2009/index.php/Hacking_Linux_Kernel_Through_testing)

1. Validate the upper limit imposed by the topmost hierarchy.

2. Test the testcase no 1 for subgroups far below in hierarchy.

3. A group has n siblings. They start consuming memory and the total
increases to more than parent's limit. Check if the group with max memory
consumption gets it's task killed.

4. Write a test which uses lots of memory, reaches swap limits and ensure it
gets killed.

5. A task is running in a group which has a limit N on memory.limit_in_bytes
but no limit on memory.memsw.limit_in_bytes. The system has swap memory in
use and the task's memory consumption is >> N. Therefore the task should be
using a big amount of swap memory(say M) > N. Try to set the
memory.memsw.limit_in_bytes to a low value say N. It should fail to change
the limits.

6. In test no 5 instead of changing the mem+swap limits turn the swap off.
Since the memory usage of the task is more than the current limits the task
should be killed.

The first testcase has been attached. Reimplemented using named pipes.

Naufal

Signed-off-by Mohamed Naufal Basheer <naufal11@gmail.com>
emcg/README
emcg/control/Makefile
emcg/control/mem_process.c
emcg/control/memcg_control_test.sh
e180e61b301cf49c9c7357706ecbcd57c99991a4 01-Mar-2010 Rishikesh K Rajak <risrajak@linux.vnet.ibm.com> Reverting the commit id: 3bc8ecdb69b29436e2987173ffdd7244d8897942
emcg/README
3bc8ecdb69b29436e2987173ffdd7244d8897942 28-Feb-2010 Rishikesh K Rajak <risrajak@linux.vnet.ibm.com> Signed-off-by Mohamed Naufal Basheer <naufal11@gmail.com>
emcg/README
e520c3189f54b690d057ccdae29167d33771584c 21-Feb-2010 Garrett Cooper <yanegomi@gmail.com> Switch all of these Makefiles over to MAKE_DEPS instead of ad hoc
trunk-all // incorrectly specified all: | type dependencies.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
akefile
akefile.inc
puset/Makefile
puset/Makefile.inc
012df4560f15e8076382f3908d3539ee20b404cc 23-Jan-2010 yaberauneya <yaberauneya> Fix awk print expression so that expr(1) evaluation is corrected, and thus the tests pass. Please see the comment for get_cpu_usage as to why this is an issue...

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
puctl_fj/run_cpuctl_test_fj.sh
397ae83c6395406527786c4afd74b36356670934 19-Jan-2010 yaberauneya <yaberauneya> Effectively neuter all tests that require mempolicy support on systems that don't have mempolicy.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
puset/cpuset_lib/cpuinfo.c
puset/cpuset_lib/libcpuset.c
puset/cpuset_load_balance_test/cpuset_cpu_hog.c
puset/cpuset_load_balance_test/cpuset_sched_domains_check.c
puset/cpuset_memory_test/cpuset_memory_test.c
puset/cpuset_syscall_test/cpuset_syscall_test.c
2592e98f6e7c7e5c4f120605c0dcb5c70efe571f 18-Jan-2010 yaberauneya <yaberauneya> Don't run make install for libs unless make install is specifically called in the subdir.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
akefile
akefile.inc
618f41a8ad6e4c95f4285ff3af006f5e97fc2c8b 14-Jan-2010 yaberauneya <yaberauneya> Finish this mempolicy crud off for good, after a fair amount of tweaking.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
puset/cpuset_lib/libcpuset.c
puset/cpuset_syscall_test/cpuset_syscall_test.c
8990a20fd4bb09cdbbf3c6037c037712fbc71289 14-Jan-2010 yaberauneya <yaberauneya> Properly resolve mbind stuff... it was actually mempolicy tests... and it was present in more than just mbind01.c

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
puset/cpuset_lib/libcpuset.c
puset/cpuset_syscall_test/cpuset_syscall_test.c
2e86d9e9309f32acbdca3fd3be37ffbdd12860a2 13-Jan-2010 subrata_modak <subrata_modak> cpuset_syscall_test: delete '0x' from hex string: By the latest ltp version, the following fail message outputted on my x86_64 box.
------------
TEST 5: CPUSET CONTROLLER TESTING
TEST STARTED: Please avoid using system while this test executes
...
cpuset05 8 TFAIL : Result(/proc/<pid>/status) = "", expect = "0")
cpuset05 9 TFAIL : Result(/proc/<pid>/status) = "", expect = "1")
cpuset05 10 TFAIL : Result(/proc/<pid>/status) = "", expect = "default")
------------
The reason is:
1, '0x' wasn't deleted from a hex string's head. e.g. 7f343c900000 is expected ,but 0x7f343c900000 outputted.
2, a wrong '\b' was used in a grep command.
This patch fix the upper problem. Now the message is:
------------
cpuset05 7 TPASS : Cpuset vs systemcall test succeeded.
cpuset05 8 TPASS : Cpuset vs systemcall test succeeded.
cpuset05 9 TPASS : Cpuset vs systemcall test succeeded.
cpuset05 10 TPASS : Cpuset vs systemcall test succeeded.
------------
Signed-off-by: Shi Weihua <shiwh@cn.fujitsu.com>,
puset/cpuset_syscall_test/cpuset_syscall_testset.sh
20d091b31ab334e719505814953ac836c47a94cc 07-Jan-2010 yaberauneya <yaberauneya> Fix check.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
emcg/regression/memcg_regression_test.sh
36670807662c06ba6d931560b0cfb8321ebd237f 07-Jan-2010 subrata_modak <subrata_modak> Added check for memory controller (functional, regression & stress). Signed-off By : Rishikesh K Rajak <risrajak@linux.vnet.ibm.com>, Acked-by: Li Zefan <lizf@cn.fujitsu.com>,
emcg/functional/memcg_function_test.sh
emcg/regression/memcg_regression_test.sh
emcg/stress/memcg_stress_test.sh
est_controllers.sh
46155adbb9229f940fece37a21bd8cad60c2ff75 06-Jan-2010 yaberauneya <yaberauneya> Hi,

Thank you for fixing "cgroup" and "cgroup_fj".
However, I found a new problem in revised "cgroup" testcases.

It's in "cgroup_regression_test.sh".

In my original patch, I didn't revise about "tst_kvercmp 2 6 29"
judgment.
But in fixed version, the error route of above judgment revised
from "TBROK" to "TCONF".
If "TCONF" is used, the shell should end by exit 0, I think.
But "cgroup_regression_test.sh" does not end by exit 0.

Please consider about the following patch:
============
--- cgroup_regression_test.sh 2009-12-23 09:52:18.000000000 +0900
+++ cgroup_regression_test.sh.new 2009-12-24 15:47:06.000000000 +0900
@@ -31,7 +31,7 @@
tst_kvercmp 2 6 29
if [ $? -eq 0 ]; then
tst_brkm TCONF ignored "test must be run with kernel 2.6.29 or
newer"
- exit 1
+ exit 0
elif [ ! -f /proc/cgroups ]; then
tst_brkm TCONF ignored "Kernel does not support for control groups;
skipping testcases";
exit 0
============

Signed-off-by: Tomomori Mitani <mitani@ryobi.co.jp>
group/cgroup_regression_test.sh
807c32342bb0a8de07d0edf3fec5db8294717a32 06-Jan-2010 yaberauneya <yaberauneya> In latest ltp version, the following message occured when run the case of cpuset.
-----
./cpuset_hotplug_test.sh: line 39: ./cpuset_list_compute: No such file or directory
./cpuset_hotplug_test.sh: line 227: ./cpuset_list_compute: No such file or directory
-----

The reason is that cpuset_list_compute.c(in testcases/kernel/controllers/cpuset/
cpuset_hotplug_test/) has not been compiled.
This patch fix it.

Signed-off-by: Shi Weihua <shiwh@cn.fujitsu.com>
puset/cpuset_hotplug_test/Makefile
0fc7a94e6f91fff30f3f5aff9d95806db50a3047 06-Jan-2010 yaberauneya <yaberauneya> Actually, that doesn't make sense. No where in the awk call does it actually have awk or the pid listed as being awked. Something else is fishy here...

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
puctl_fj/run_cpuctl_test_fj.sh
de6ca21d30f461930f044e86b38f0432ae684570 06-Jan-2010 yaberauneya <yaberauneya> Noob mistake: forgot to unawk the awk call.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
puctl_fj/run_cpuctl_test_fj.sh
230fe1724ef61163645a167a35d146238a66f497 23-Dec-2009 yaberauneya <yaberauneya> Fix part two of the email below... and fix some bash-isms while I'm at it...

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>

I took your indication and changed the patch as follows.

Case 1:
I revised "[ -f /proc/cgroups ]" case to use "tst_resm TCONF"
instead of "echo".
But this revision is unbalanced with the other exit messages,
so I revised other cases too.
I don't know how to use exit code, so I use 0 or 1.
I might mistake those code.

============
--- run_cgroup_test_fj.sh 2009-10-26 23:49:23.000000000 +0900
+++ run_cgroup_test_fj.sh.new 2009-12-14 14:21:53.000000000 +0900
@@ -34,19 +34,19 @@
export CASENO2=0

if [ "$(id -ru)" -ne 0 ]; then
- echo "***error***:you must use root to test"
- exit -1
+ tst_brkm TBROK ignored "***error***:you must use root to test"
+ exit 1
fi

if ! [ -f /proc/cgroups ]; then
- echo "***error***:you must enable cgroup config in kernel";
- exit -3;
+ tst_resm TCONF "***error***:you must enable cgroup config in
kernel";
+ exit 0;
fi

if [ ! -x $TESTROOT/cgroup_fj_proc ]; then
- echo "***warning***:file \"cgroup_fj_proc\" is not exist or not
executable";
- echo "please do make and check execution permission"
- exit -4;
+ tst_brkm TBROK ignored "***warning***:file \"cgroup_fj_proc\" is not
exist or not executable";
+ tst_brkm TBROK ignored "please do make and check execution
permission"
+ exit 1;
fi

CPUSET=`grep -w cpuset /proc/cgroups | cut -f1`;
@@ -83,10 +83,10 @@
SYBSYSCOMPILED="$SYBSYSCOMPILED devices,"
fi
if [ "$SYBSYSCOMPILED" = "" ];then # Warning and exit if all cgroup
subsystem are not compiled
- echo "CONTROLLERS TESTCASES: WARNING";
- echo "Kernel does not support for any cgroup subsystem";
- echo "Skipping all controllers testcases....";
- exit -2;
+ tst_resm TCONF "CONTROLLERS TESTCASES: WARNING";
+ tst_resm TCONF "Kernel does not support for any cgroup subsystem";
+ tst_resm TCONF "Skipping all controllers testcases....";
+ exit 0;
fi

echo "Now, we start the test for cgroup...";
============


Case 2:
I revised "[ "$USER" != root ]" case, and revised
"[ ! -f /proc/cgroups ]" case to use "tst_resm" instead of "echocase"
for balance.

============
--- cgroup_regression_test.sh 2009-11-30 17:41:37.000000000 +0900
+++ cgroup_regression_test.sh.new 2009-12-14 11:42:58.000000000 +0900
@@ -29,15 +29,15 @@
export TST_COUNT=1

if [ ! -f /proc/cgroups ]; then
- echo "CONTROLLERS TESTCASES: WARNING"
- echo "Kernel does not support for control groups";
- echo "Skipping all controllers testcases....";
+ tst_resm TCONF "CONTROLLERS TESTCASES: WARNING"
+ tst_resm TCONF "Kernel does not support for control groups"
+ tst_resm TCONF "Skipping all controllers testcases...."
exit 0
fi

if [ "$USER" != root ]; then
tst_brkm TBROK ignored "Test must be run as root"
- exit 0
+ exit 1
fi

tst_kvercmp 2 6 29
============


Regards--


-Tomonori Mitani
- Show quoted text -


-----Original Message-----
From: Garrett Cooper [mailto:yanegomi@gmail.com]
Sent: Friday, December 11, 2009 6:45 PM
To: Mitani
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] "cgroup_fj" and "cgroup" have problems?

On Dec 11, 2009, at 1:21 AM, Mitani wrote:

> Hi,
>
> Sorry for my many many mails today.
>
>
> I ran tests with "ltp-2009-12-10" cvs.
>
> In my system (kernel 2.6.18-164.el5), kernel does not support
> control groups.
> So, when I ran test of "cgroup_fj", I got following message and the
> test faild by "FAIL 253".
>
> ------------
> ***error***:you must enable cgroup config in kernel
> ------------
>
> In the investigation for above error message, I found that there may be
> two problems,.
>
> (a) "cgroup_fj" test failed in the system not support "control groups".
> (b) "cgroup" test may passed by user-ID which isn't "root".
>
>
> (a) "cgroup_fj" test
> Above message is correct message, but exiting by "FAIL" is not
> correct, I think.
> Referring to the example of other tests, I think that the tests
> for non-supported functions must be finished in "PASS 0" basically.
> (For example, "move_pages{01...11}" tests exit in "PASS 0" and with
> "NUMA support not provided" messages.)
>
> I suggest following patch to resolve this problem.
>
> ============
> --- run_cgroup_test_fj.sh 2009-10-26 23:49:23.000000000 +0900
> +++ run_cgroup_test_fj.sh.new 2009-12-11 16:10:39.000000000 +0900
> @@ -40,7 +40,7 @@
>
> if ! [ -f /proc/cgroups ]; then
> echo "***error***:you must enable cgroup config in kernel";
> - exit -3;
> + exit 0;
> fi
>
> if [ ! -x $TESTROOT/cgroup_fj_proc ]; then
>
> ============
>
>
> (b) "cgroup" test
> I watched "cgroup" test source for hints for (a), and found another
> problem.
> If this test run by user-ID non-"root", it will exit in "PASS", I think.
> But I think that it must exit in "FAIL".
> Because this test cannot be tested only by "root" user.
>
> =========
> --- cgroup_regression_test.sh 2009-11-30 17:41:37.000000000 +0900
> +++ cgroup_regression_test.sh.new 2009-12-11 16:22:14.000000000 +0900
> @@ -37,7 +37,7 @@
>
> if [ "$USER" != root ]; then
> tst_brkm TBROK ignored "Test must be run as root"
> - exit 0
> + exit -1
> fi
>
> tst_kvercmp 2 6 29

1. Case 1 should be tst_brkm TCONF and should have exit 0 (like you
suggested).
2. Case 2 should have the equivalent exit code for TBROK (it's in
include/test.h). $? -> -1 is undefined via POSIX and while it passes on
bash, it doesn't pass on ash, and thus would fail with busybox.
Thanks,
-Garrett=
group/cgroup_regression_test.sh
d99ad684dc1befc9f7a2e9ed9d02427863425e85 23-Dec-2009 yaberauneya <yaberauneya> Fix part 1 of the issue described in the following email:

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>

I took your indication and changed the patch as follows.

Case 1:
I revised "[ -f /proc/cgroups ]" case to use "tst_resm TCONF"
instead of "echo".
But this revision is unbalanced with the other exit messages,
so I revised other cases too.
I don't know how to use exit code, so I use 0 or 1.
I might mistake those code.

============
--- run_cgroup_test_fj.sh 2009-10-26 23:49:23.000000000 +0900
+++ run_cgroup_test_fj.sh.new 2009-12-14 14:21:53.000000000 +0900
@@ -34,19 +34,19 @@
export CASENO2=0

if [ "$(id -ru)" -ne 0 ]; then
- echo "***error***:you must use root to test"
- exit -1
+ tst_brkm TBROK ignored "***error***:you must use root to test"
+ exit 1
fi

if ! [ -f /proc/cgroups ]; then
- echo "***error***:you must enable cgroup config in kernel";
- exit -3;
+ tst_resm TCONF "***error***:you must enable cgroup config in
kernel";
+ exit 0;
fi

if [ ! -x $TESTROOT/cgroup_fj_proc ]; then
- echo "***warning***:file \"cgroup_fj_proc\" is not exist or not
executable";
- echo "please do make and check execution permission"
- exit -4;
+ tst_brkm TBROK ignored "***warning***:file \"cgroup_fj_proc\" is not
exist or not executable";
+ tst_brkm TBROK ignored "please do make and check execution
permission"
+ exit 1;
fi

CPUSET=`grep -w cpuset /proc/cgroups | cut -f1`;
@@ -83,10 +83,10 @@
SYBSYSCOMPILED="$SYBSYSCOMPILED devices,"
fi
if [ "$SYBSYSCOMPILED" = "" ];then # Warning and exit if all cgroup
subsystem are not compiled
- echo "CONTROLLERS TESTCASES: WARNING";
- echo "Kernel does not support for any cgroup subsystem";
- echo "Skipping all controllers testcases....";
- exit -2;
+ tst_resm TCONF "CONTROLLERS TESTCASES: WARNING";
+ tst_resm TCONF "Kernel does not support for any cgroup subsystem";
+ tst_resm TCONF "Skipping all controllers testcases....";
+ exit 0;
fi

echo "Now, we start the test for cgroup...";
============


Case 2:
I revised "[ "$USER" != root ]" case, and revised
"[ ! -f /proc/cgroups ]" case to use "tst_resm" instead of "echocase"
for balance.

============
--- cgroup_regression_test.sh 2009-11-30 17:41:37.000000000 +0900
+++ cgroup_regression_test.sh.new 2009-12-14 11:42:58.000000000 +0900
@@ -29,15 +29,15 @@
export TST_COUNT=1

if [ ! -f /proc/cgroups ]; then
- echo "CONTROLLERS TESTCASES: WARNING"
- echo "Kernel does not support for control groups";
- echo "Skipping all controllers testcases....";
+ tst_resm TCONF "CONTROLLERS TESTCASES: WARNING"
+ tst_resm TCONF "Kernel does not support for control groups"
+ tst_resm TCONF "Skipping all controllers testcases...."
exit 0
fi

if [ "$USER" != root ]; then
tst_brkm TBROK ignored "Test must be run as root"
- exit 0
+ exit 1
fi

tst_kvercmp 2 6 29
============


Regards--


-Tomonori Mitani
- Show quoted text -


-----Original Message-----
From: Garrett Cooper [mailto:yanegomi@gmail.com]
Sent: Friday, December 11, 2009 6:45 PM
To: Mitani
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] "cgroup_fj" and "cgroup" have problems?

On Dec 11, 2009, at 1:21 AM, Mitani wrote:

> Hi,
>
> Sorry for my many many mails today.
>
>
> I ran tests with "ltp-2009-12-10" cvs.
>
> In my system (kernel 2.6.18-164.el5), kernel does not support
> control groups.
> So, when I ran test of "cgroup_fj", I got following message and the
> test faild by "FAIL 253".
>
> ------------
> ***error***:you must enable cgroup config in kernel
> ------------
>
> In the investigation for above error message, I found that there may be
> two problems,.
>
> (a) "cgroup_fj" test failed in the system not support "control groups".
> (b) "cgroup" test may passed by user-ID which isn't "root".
>
>
> (a) "cgroup_fj" test
> Above message is correct message, but exiting by "FAIL" is not
> correct, I think.
> Referring to the example of other tests, I think that the tests
> for non-supported functions must be finished in "PASS 0" basically.
> (For example, "move_pages{01...11}" tests exit in "PASS 0" and with
> "NUMA support not provided" messages.)
>
> I suggest following patch to resolve this problem.
>
> ============
> --- run_cgroup_test_fj.sh 2009-10-26 23:49:23.000000000 +0900
> +++ run_cgroup_test_fj.sh.new 2009-12-11 16:10:39.000000000 +0900
> @@ -40,7 +40,7 @@
>
> if ! [ -f /proc/cgroups ]; then
> echo "***error***:you must enable cgroup config in kernel";
> - exit -3;
> + exit 0;
> fi
>
> if [ ! -x $TESTROOT/cgroup_fj_proc ]; then
>
> ============
>
>
> (b) "cgroup" test
> I watched "cgroup" test source for hints for (a), and found another
> problem.
> If this test run by user-ID non-"root", it will exit in "PASS", I think.
> But I think that it must exit in "FAIL".
> Because this test cannot be tested only by "root" user.
>
> =========
> --- cgroup_regression_test.sh 2009-11-30 17:41:37.000000000 +0900
> +++ cgroup_regression_test.sh.new 2009-12-11 16:22:14.000000000 +0900
> @@ -37,7 +37,7 @@
>
> if [ "$USER" != root ]; then
> tst_brkm TBROK ignored "Test must be run as root"
> - exit 0
> + exit -1
> fi
>
> tst_kvercmp 2 6 29

1. Case 1 should be tst_brkm TCONF and should have exit 0 (like you
suggested).
2. Case 2 should have the equivalent exit code for TBROK (it's in
include/test.h). $? -> -1 is undefined via POSIX and while it passes on
bash, it doesn't pass on ash, and thus would fail with busybox.
Thanks,
-Garrett
group_fj/run_cgroup_test_fj.sh
96105577b8250e57dc572fef9e65739c1e2f8a97 20-Dec-2009 yaberauneya <yaberauneya> Need to check if the preprocessor define is true or false, not if the definition exists as autoconf sets the preprocessor define to 0 if the DECL doesn't exist.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
reezer/vfork.c
f12a19a16200b31e82c80dd6df417fa24109ad19 19-Dec-2009 yaberauneya <yaberauneya> Fix the remaining `lib-not-found' error when compiling for the second time as re
ported by Caspar Zhang <czhang@redhat.com>

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
akefile
akefile.inc
puset/cpuset_syscall_test/cpuset_syscall_test.c
490580063dd065214fe86012904fdb2c9a2139b5 19-Dec-2009 yaberauneya <yaberauneya> Fix autoconf preprocessor defines.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
reezer/vfork.c
edc2e92335b37c9349da9b0eb5804d5eb7697f1b 03-Dec-2009 subrata_modak <subrata_modak> Remove the use of bash arrays from memcg_stress_test: this patch removes the use of bash arrays from memcg_stress_test.sh, thus making the script more POSIX friendly. I changed the array into a series of variables, read and written using eval. Signed-off-by: Jiri Palecek <jpalecek@web.de>.
emcg/stress/memcg_stress_test.sh
c5d8805b5dc5cf79b729ff3b60617649e2f9ea0c 30-Nov-2009 yaberauneya <yaberauneya> Checkin all local changes for testcases/kernel/controllers to avoid compile-time warnings and errors, so that I can move forward with the weak handlers change.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
group/cgroup_regression_test.sh
puset/Makefile.inc
puset/cpuset_lib/Makefile
puset/cpuset_load_balance_test/cpuset_cpu_hog.c
puset/cpuset_memory_test/cpuset_memory_test.c
puset/cpuset_syscall_test/cpuset_syscall_test.c
fdc916830a751e33842a095f758c7652444b959a 27-Nov-2009 yaberauneya <yaberauneya> Need to change this script to scrape stdout.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
puset/cpuset_load_balance_test/cpuset_sched_domains_test.sh
fb84f2d96b7171afd102e5b3e9efc5b96fba00fc 27-Nov-2009 yaberauneya <yaberauneya> Clean up testcase and have it conform to a more LTP-like standard.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
puset/cpuset_load_balance_test/cpuset_sched_domains_check.c
e2ac9f39320567eb94104be3bb74595668e0bdee 16-Nov-2009 yaberauneya <yaberauneya> As noticed by Shi Weihua, there was a syntax error in the awk command in get_cpu_usage:

awk: print $9
awk: ^ syntax error
pid 8077 cpu_usage
cpuctl_test_fj 1 TFAIL : case19 FAIL
awk: print $9
awk: ^ syntax error
pid 8104 cpu_usage
cpuctl_test_fj 1 TFAIL : case20 FAIL
awk: print $9
awk: ^ syntax error
pid 8131 cpu_usage
cpuctl_test_fj 1 TFAIL : case21 FAIL
awk: print $9
awk: ^ syntax error
pid 8193 cpu_usage
cpuctl_test_fj 1 TFAIL : case22 FAIL

The checkin corrects the syntax error by implementing the function in a much cleaner manner than the previous implementation, by using just ps | awk instead of top | tail | head | awk | awk.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
puctl_fj/run_cpuctl_test_fj.sh
d05c28d86fc646f8a9a3bb8badadb0cbd35359e7 09-Nov-2009 subrata_modak <subrata_modak> Fix build failure in cgroup_fj testcase: The following build failure occured on my x86 box. But the case "cgroup_fj" does not need "-lcontrollers" when building. So in my patch, i deleted "-lcontrollers" in testcases/kernel/controllers/Makefile.inc and added it to testcases/kernel/controllers/memctl/Makefile because the case "memctl" need it. All other cases in testcases/kernel/controllers/ build well too when my patch merged. Signed-off-by: Shi Weihua <shiwh@cn.fujitsu.com>.
akefile.inc
emctl/Makefile
c60024a41756a0c5b653b48994cfdce95a4724f0 09-Nov-2009 yaberauneya <yaberauneya> vfork.c:
1. Add signal handling code and cleanup code.
2. Protect against ptrace(PTRACE_KILL, -1, ...) *grins*.
3. Add a -f option so one could print out info with tst_res(3) while outputting data to the ptrace logfile.

vfork_freeze.sh:
1. Standardize the log name.
2. Fix a syntax error.
reezer/vfork.c
reezer/vfork_freeze.sh
e2550ed006ffd595c37731129c0b9637fbb97042 09-Nov-2009 yaberauneya <yaberauneya> Just remove the frak'ing \t to be consistent with the old version. Blasted cylons...

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
reezer/vfork.c
6de5de8c4a5d9ec5f878172e6e21d6fabfb38f55 09-Nov-2009 yaberauneya <yaberauneya> Dumb arse typo...

Signed-off-by: The idiot that made the last checkin <root@devnull.com>
reezer/vfork.c
2d5ffa60a4e03056631ca117392288b9c7d94261 09-Nov-2009 yaberauneya <yaberauneya> vfork.c:
- Fix autoconf test result name for PTRACE_O_TRACEVFORK*.
vfork_freeze.sh:
- Implement proper TMPDIR logic.
- Remove forced make in place of optional (if needed) make operation.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
reezer/vfork.c
reezer/vfork_freeze.sh
90804501412c6dc0d15084fcb5fec2942aee291c 09-Nov-2009 yaberauneya <yaberauneya> Return non-void return code when PTRACE junk is missing.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
reezer/vfork.c
44226453e647bf90f8de0372c94f8fcd2f2bbe02 06-Nov-2009 vapier <vapier> drop adding of -O/-W type flags that are already handled in common .mk files

for the few makefiles that arent yet converted to the .mk infrastructure:
Lately gcc developers introduced -Wextra flag that does the same as -W but is
more descriptive. According to this using -W flag should be safe (as gcc is
backward compatlible) but using -Wextra is limited to newer gcc releases.

Attached patch replaces all -Wextra occurences with -W and thus fixes
compliation failures with older gcc (mine was gcc-3.3.3 on sles).

patch by Cyril Hrubis
group_fj/Makefile
puacct/Makefile
puctl_fj/Makefile
05774b0997efdc66f749bd495f9d6f505a127a3b 05-Nov-2009 yaberauneya <yaberauneya> Fix an unitialized variable and usage corner case where if argc > 1, it would always accept the arguments as-is.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
puset/cpuset_memory_pressure_test/cpuset_memory_pressure.c
0e76817e5be3d4a26b06d129f0a3705d9a1203fa 04-Nov-2009 yaberauneya <yaberauneya> 1. Use linux_syscall_numbers.h.
2. Fix a format string (use inttypes.h).
3. Remove an unused var.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
puset/cpuset_syscall_test/cpuset_syscall_test.c
f6d7f09ea8353429d488f586ff9cd9525699e31c 03-Nov-2009 vapier <vapier> define and use common clone helpers

From: Serge E. Hallyn <serue@us.ibm.com>

Define ltp_clone() and related helpers in libltp, and convert all existing
clone usages to them. This way we no longer have arch-specific cruft
cluttering up random source files all over the place.
group/clone_platform.h
group/test_6_2.c
919dca828c701bce109db8e9ed694292e88db3fc 03-Nov-2009 vapier <vapier> extend autoconf ptrace tests
reezer/vfork.c
9433aa54691a36be07a7c3e0e8207432a472450f 02-Nov-2009 subrata_modak <subrata_modak> Use a saner variant for computing the number of groups in cpuctl tests: this patch changes the calculation of numer of groups in cpuctl test. The new code doesn't need bc, and is more comprehensible IMHO. Signed-off-by: Jiri Palecek <jpalecek@web.de>.
puctl/parameters.sh
296ffa5c9b708d077ef4820332b881cc72fac041 26-Oct-2009 subrata_modak <subrata_modak> Fix some bashisms: this is another patch fixing bashisms in LTP tests (the fixes are more or less the same as in the previous patches, except for a few exceptions). Note that the patch is not complete, in the sense that there may remain further bashisms in the source even after applying the patch (like use of arrays, which is visible even from this patch). Signed-off-by: Jiri Palecek <jpalecek@web.de>.
group_fj/cgroup_fj_utility.sh
group_fj/run_cgroup_test_fj.sh
puctl_fj/run_cpuctl_test_fj.sh
emcg/functional/memcg_function_test.sh
emcg/stress/memcg_stress_test.sh
77772ef57f3c92243d1df2064fdb2b321e40227d 17-Oct-2009 yaberauneya <yaberauneya> 1. Fix taskstats.m4 so it no longer punts out warnings.
2. Add ltp-swaponoff.m4 to properly detect when we're running an older kernel and need linux/swap.h (issue found by compiler team at Cisco).
3. Apply fixes according to 2. to testcases/kernel/syscalls/swap*/*.c.
4. Apply Cyril Hrubis's libcpu_set fix to the .in files and cpuset_lib Makefile and .c file.
5. Block off functionality in getdelays.c with proper preprocessor defines, as per issues after encountered after ltp-taskstats.m4 was fixed.
group/getdelays.c
puset/cpuset_lib/Makefile
puset/cpuset_lib/libcpuset.c
ec277472d91f9af89fea0598676c42d3f074993a 13-Oct-2009 subrata_modak <subrata_modak> fix memcg_function_test's bug: testcase_25() uses a wrong "$?" value , Now use "ret" to record the real "$?" value for test. Signed-off-by: Liu Bo <liubo-fnst@cn.fujitsu.com>.
emcg/functional/memcg_function_test.sh
bf995b22b50a0c6ee2a86d587b514dd938814262 11-Oct-2009 yaberauneya <yaberauneya> 1. I screwed up and broke install by accident when I was monkeying around with env_post.mk.
2. Make in-build-tree testing a little more conducive as per Mike F's convincing argument:

requiring install-related variables to be sane in order to do `make install`
is fine (i.e. prefix/etc...). but that is the only time install related
variables should be needed/consulted.

when you compile a package (i.e. run `make`) regardless of this being done at
the toplevel or a subdir only, the build process should never need anything
ltp related outside of the source tree (so i'm not talking about libcap or
whatever, just libltp). this is the expected behavior for all packages out
there, not just ltp.

one reason for why this is a bad idea is that it is then impossible to
compile/test a new version of a package locally before installing it into the
live filesystem. you would have to first uninstall the old version (rm -rf
/opt/ltp), then compile/install the new version, and then hope that (1) the
build is successful as well as (2) the package working as expected (bug free).
-mike

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
group/Makefile
puctl/Makefile
puset/Makefile
o-throttle/Makefile
e6edac620d408e6b12d3e701db853ad3bfd8d19d 11-Oct-2009 yaberauneya <yaberauneya> Fix build/installation so we don't install the libraries directly to $(libdir) anymore, and thus can do testing out of a build tree (ish).
akefile.inc
puset/Makefile.inc
ef77253961f909f87e82e6d2b620e87af33e9665 09-Oct-2009 yaberauneya <yaberauneya> 1. Please see README.mk-devel for a full description of the changes
from a Make perspective.
2. Several files were changed to accomodate correct installation
practices, most notably ones in testcases/network/{ipv6,tcp_cmds},
testcases/kernel/sched/hyperthreading/ht_enabled/..., and some items
in tools/..., and also to avoid collisions as far as installed
testcases (scripts, compiled C apps) were concerned.
3. Several apps weren't autoconf safe and some autoconf tests and
conditional statements have been placed in sourcecode and in Makefiles
to either a) prevent the tests from being built / installed or b) turn
the tests into dummy apps which print out TCONF messages due to
lack-of-build support.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
akefile
akefile.inc
group/Makefile
group/getdelays.c
group_fj/Makefile
puacct/Makefile
puctl/Makefile
puctl_fj/Makefile
puset/Makefile
puset/Makefile.inc
puset/cpuset_base_ops_test/Makefile
puset/cpuset_exclusive_test/Makefile
puset/cpuset_funcs.sh
puset/cpuset_hierarchy_test/Makefile
puset/cpuset_hotplug_test/Makefile
puset/cpuset_inherit_test/Makefile
puset/cpuset_lib/Makefile
puset/cpuset_load_balance_test/Makefile
puset/cpuset_memory_pressure_test/Makefile
puset/cpuset_memory_spread_test/Makefile
puset/cpuset_memory_test/Makefile
puset/cpuset_syscall_test/Makefile
puset/cpuset_syscall_test/cpuset_syscall_test.c
reezer/Makefile
reezer/run.sh
reezer/run_freezer.sh
reezer/vfork.c
o-throttle/Makefile
ibcontrollers/Makefile
emcg/Makefile
emcg/functional/Makefile
emcg/regression/Makefile
emcg/stress/Makefile
emctl/Makefile
est_controllers.sh
6e21942390adecf9fc0da5d240b9a7019543fecd 28-Sep-2009 subrata_modak <subrata_modak> memcg : fix various test failures: In memcg testcases,
1. use /dev/memcg consistently,
2. for testcase_25, since 2.6.31, writing -1 to memory.limit_in_bytes will reset to unlimit,
3. for testcase_35, writing to memory.force_empty for non-empty cgroup should return failure,
Signed-off-by: Liu Bo <liubo-fnst@cn.fujitsu.com>,
emcg/functional/memcg_function_test.sh
emcg/stress/memcg_stress_test.sh
a95f4149e99ab4ddffd8a6093b49e669a2b249a9 15-Sep-2009 subrata_modak <subrata_modak> fix the bug of macro in getdelays.c: When running cgroup test, I found a bug of macro in getdelays.c, which refers to the spelling mistake. And this leads to testcase_eight's abnormal delay. Relative macro:
HAVE_LINUX_CGROUPSTATS_H
Change macro HAVE_LINUX_CGROUPSTAT_H to HAVE_LINUX_CGROUPSTATS_H to fix the bug. Signed-off-by:Liu Bo <liubo-fnst@cn.fujitsu.com>,
group/getdelays.c
10b933548ef208cfd1042bfe54871ed04849c059 14-Sep-2009 subrata_modak <subrata_modak> Add new testcases for memcgroup: My workmate Li Zefan (lizf@cn.fujitsu.com) has created some testcases for cgroup's subsystem "memory" in the last year. And, He catched some kernel bugs through these testcases. So we think you glad to push them into LTP. There are total 40 testcases that have been added. These testcases contain the basis operation test, part functionality test and stress test of memcgroup. How to run this test: # runltp -f controllers.
Result:
memcgroup_function_test 1 TPASS : rss=4096/4096, cache=0/0
memcgroup_function_test 2 TPASS : rss=0/0, cache=4096/4096
memcgroup_function_test 3 TPASS : rss=0/0, cache=4096/4096
memcgroup_function_test 4 TPASS : rss=4096/4096, cache=8192/8192
memcgroup_function_test 5 TPASS : rss=4096/4096, cache=0/0
memcgroup_function_test 6 TPASS : rss=4096/4096, cache=0/0
memcgroup_function_test 6 TPASS : rss=0/0, cache=0/0
memcgroup_function_test 7 TPASS : rss=0/0, cache=4096/4096
memcgroup_function_test 7 TPASS : rss=0/0, cache=0/0
memcgroup_function_test 8 TPASS : rss=0/0, cache=4096/4096
memcgroup_function_test 8 TPASS : rss=0/0, cache=0/0
memcgroup_function_test 9 TPASS : rss=4096/4096, cache=8192/8192
memcgroup_function_test 9 TPASS : rss=0/0, cache=0/0
memcgroup_function_test 10 TPASS : rss=4096/4096, cache=0/0
memcgroup_function_test 10 TPASS : rss=0/0, cache=0/0
memcgroup_function_test 11 TPASS : failcnt=6
memcgroup_function_test 12 TPASS : failcnt=6
memcgroup_function_test 13 TPASS : failcnt=6
memcgroup_function_test 14 TPASS : process 5793 is killed
memcgroup_function_test 15 TPASS : process 5803 is killed
memcgroup_function_test 16 TPASS : process 5813 is killed
memcgroup_function_test 17 TPASS : process 5824 is killed
memcgroup_function_test 18 TPASS : process 5835 is killed
memcgroup_function_test 19 TPASS : process 5845 is killed
memcgroup_function_test 20 TPASS : process 5854 is killed
memcgroup_function_test 21 TPASS : process 5863 is killed
memcgroup_function_test 22 TPASS : input=4095, limit_in_bytes=4096
memcgroup_function_test 23 TPASS : input=4097, limit_in_bytes=8192
memcgroup_function_test 24 TPASS : input=1, limit_in_bytes=4096
memcgroup_function_test 25 TPASS : return value is 0
memcgroup_function_test 26 TPASS : return value is 1
memcgroup_function_test 27 TPASS : return value is 1
memcgroup_function_test 28 TPASS : return value is 1
memcgroup_function_test 29 TPASS : force memory succeeded
memcgroup_function_test 30 TPASS : force memory failed as expected
memcgroup_function_test 31 TPASS : return value is 0
memcgroup_function_test 32 TPASS : return value is 0
memcgroup_function_test 33 TPASS : return value is 0
memcgroup_function_test 34 TPASS : return value is 0
memcgroup_function_test 35 TPASS : return value is 1
memcgroup_function_test 36 TPASS : rss=4096/4096, cache=0/0
memcgroup_function_test 36 TPASS : rss=0/0, cache=0/0
memcgroup_function_test 37 TPASS : rss=4096/4096, cache=0/0
memcgroup_function_test 37 TPASS : rss=0/0, cache=0/0
memcgroup_function_test 38 TPASS : rss=4096/4096, cache=0/0
memcgroup_function_test 38 TPASS : rss=0/0, cache=0/0
memcgroup_stress_test 1 TPASS : stress test 1 passed
memcgroup_stress_test 2 TPASS : stress test 2 passed
INFO: ltp-pan reported all tests PASS,
Signed-off-by: Shi Weihua <shiwh@cn.fujitsu.com>,
emcg/Makefile
emcg/README
emcg/functional/Makefile
emcg/functional/memcg_function_test.sh
emcg/functional/memcg_getpagesize.c
emcg/functional/memcg_process.c
emcg/memcg_regression_test.sh
emcg/memcg_test_1.c
emcg/memcg_test_2.c
emcg/memcg_test_4.c
emcg/memcg_test_4.sh
emcg/regression/Makefile
emcg/regression/memcg_regression_test.sh
emcg/regression/memcg_test_1.c
emcg/regression/memcg_test_2.c
emcg/regression/memcg_test_4.c
emcg/regression/memcg_test_4.sh
emcg/stress/Makefile
emcg/stress/memcg_process_stress.c
emcg/stress/memcg_stress_test.sh
575839ea989d07d4efa8816256469da86c2dab5c 09-Sep-2009 subrata_modak <subrata_modak> cpuctl of controllers: fix the bug of while loop: When running the ltp tool by "./runltp -f controllers", I found "while" loop cannot stop in following files of cpuctl test. File list:
cpuctl_def_task01.c
cpuctl_def_task02.c
cpuctl_def_task03.c
cpuctl_def_task04.c
cpuctl_test01.c
cpuctl_test02.c
cpuctl_test03.c
cpuctl_test04.c

Key code:
timer_expired=0;
while(!timer_expired)
f=sqrt(f*f);

Reason:
During the compilation of these files, gcc's O2 mechanism causes the change of variable "timer_expired" to be omitted, hence the loop, "while(!timer_expired) f=sqrt(f*f);" cannot get out from itself. Change the type of "timer_expired" from "int" to "volatile int" to fix this bug. By the way, it is necessary to modify the file, ltp-full-xxxxxxxx/testcases/kernel/controllers/libcontrollers/ libcontrollers.h for compilation.
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>,
Signed-off-by: Liu Bo <liubo-fnst@cn.fujitsu.com>,
puctl/cpuctl_def_task01.c
puctl/cpuctl_def_task02.c
puctl/cpuctl_def_task03.c
puctl/cpuctl_def_task04.c
puctl/cpuctl_test01.c
puctl/cpuctl_test02.c
puctl/cpuctl_test03.c
puctl/cpuctl_test04.c
ibcontrollers/libcontrollers.h
7514c35d7f6922710431372a837771aeea1b258f 07-Sep-2009 subrata_modak <subrata_modak> Add autoconf tests for taskstats members not present on older kernels: this is cleaned version of previously posted patch. Signed-off-by: Cyril Hrubis <chrubis@suse.cz>.
group/getdelays.c
5b26306b55e3e43b46b9dee521a56184e3564c3e 30-Aug-2009 subrata_modak <subrata_modak> Add autoconf tests for taskstats members not present on older kernels: The autoconf part is okay, but getdelays.c needs some more #ifdef HAVE_LINUX_CGROUPSTAT_H to build correctly on all I have here. Patch attached, however it may need minor cleanups. Signed-off-by: Cyril Hrubis <chrubis@suse.cz>.
group/getdelays.c
21565a64865539e6354a8eec59b85348e8aa5aab 27-Aug-2009 subrata_modak <subrata_modak> Matt Helsley <matthltc@us.ibm.com> reported: Looks like this should be 12. Why not just use the subsystem names both to iterate over and to print out? Then it will be a little clearer what test has[n't] passed. e.g.:
SUBSYSTEMS=( debug cpuset ns cpu cpuacct memory debug,debug freezer \
devices nonexistent none all )
Then when you're running the test cases or printing usage you could do:
for SUBSYS in "${SUBSYSTEMS[@]}" ; do
...
done
Sadly I didn't have a close enough look at all of the code to tell if this is do-able. Is it? If you could similarly map the other numbers it may be easier to read the output and the code.
Shi Weihua <shiwh@cn.fujitsu.com> replied: Yes, here should be 12. Sorry for it. The following small patch fixed it. Signed-off-by: Shi Weihua <shiwh@cn.fujitsu.com>. Thanks for your advice. Basically, I agree. But using strings to instead of number will need one or more weeks, I will do this improvement work base on August Release.
group_fj/cgroup_fj_function.sh
598d867ad8f0242f5e9d6383ae999bc82b8366ad 26-Aug-2009 subrata_modak <subrata_modak> CPU Accounting Controller test case for LTP: I have developed a testcase for CPU Accounting Controller which is used to group tasks using cgroups and account the CPU usage of these groups of tasks. here is the update cpuaccounting controller patch, in which I have modified it as per the earlier coments, please review this patch and let me know if it needs any more changes. I am pasting the LOG also here for reveiwing it. Signed-off-by: Duddu Rajasekhar<rajduddu@in.ibm.com>.
akefile
EADME
puacct/Makefile
puacct/README
puacct/cpuacct_setup.sh
puacct/cpuacct_task01.c
puacct/cpuacct_testplan.txt
puacct/run_cpuacct_test.sh
est_controllers.sh
ff2a7e73ea7cc3f69df7a768574251dad1f7cfc6 26-Aug-2009 subrata_modak <subrata_modak> Add new testcases for cgroup: We has created some testcases for cgroup in the last year. There are total 194 testcases that have been added. These testcases contain the basis operation test, part functionality test and stress test of cgroup. How to run this test: # runltp -f controllers. Signed-off-by: Shi Weihua <shiwh@cn.fujitsu.com>.
akefile
group_fj/Makefile
group_fj/README
group_fj/cgroup_fj_function.sh
group_fj/cgroup_fj_function2.sh
group_fj/cgroup_fj_proc.c
group_fj/cgroup_fj_release_agent
group_fj/cgroup_fj_stress.sh
group_fj/cgroup_fj_testcases
group_fj/cgroup_fj_utility.sh
group_fj/run_cgroup_test_fj.sh
1f53b7c3327c76e7d138a0037d1d9cee4986b1b8 25-Aug-2009 subrata_modak <subrata_modak> Bug in memory controller test - memctl test #4: When running the Memory Controller test # 4, I'm seeing this behavior below.
TEST 4: MEMORY CONTROLLER TESTING
RUNNING SETUP.....
TEST STARTED: Please avoid using system while this test executes /mnt/tests/kernel/distribution/ltp/20090731/ltp-full-20090731/testcases/bin/run_memctl_test.sh:
line 327: [: 62955520: unary operator expected
TINFO Memory Resource Controller: stat check test fails in first run /mnt/tests/kernel/distribution/ltp/20090731/ltp-full-20090731/testcases/bin/run_memctl_test.sh:
line 364: [: 78704640: unary operator expected
TFAIL Memory Resource Controller: stat check test FAILED *** infinite loop here, script exists memctl_test01 remains running ***
^Cincrementing stop
The bash error is due to the 'grep -w "active"' not matching anything so one of the variables isn't getting set like it is supposed to. I believe the test was written with an old version of the memory controller what put a field called memory.stat.active in the file memory.stat. The current memory controller I am testing appears to have replaced this field with "rss". There are fields showing anonymous and file backed pages in memory.stat, but I don't think they are ever going to match the memory.usage.in.bytes the test is looking for. Rss always matches and I believe that is what we should update the check in the test to look for. The attached patch fixes test #4 to compare memory.usage.in.bytes with rss. Signed-off-by: Mike Gahagan <mgahagan@redhat.com>.
emctl/run_memctl_test.sh
da35073c509e4ad592b41372cba0c56d532cb91d 30-Jul-2009 subrata_modak <subrata_modak> Add new testcases for cpu controller: My workmate Miao Xie (miaox@cn.fujitsu.com) has created some testcases for cgroup's subsystem "cpu" in the last year. And, He catched some kernel bugs through these testcases. So we think you glad to push them into LTP. There are total 22 testcases that have been added. These testcases contain the basis operation test and part functionality test of cpu controller. Signed-off-by: Shi Weihua <shiwh@cn.fujitsu.com>.
akefile
puctl_fj/Makefile
puctl_fj/README
puctl_fj/cpuctl_fj_cpu-hog.c
puctl_fj/cpuctl_fj_simple_echo.c
puctl_fj/run_cpuctl_test_fj.sh
est_controllers.sh
1cede00ac24a77ff4df5f9b1f5c0c215bcda60c3 14-Jul-2009 yaberauneya <yaberauneya> Previous `fix' wasn't correct. Fix similar to way noted by Shi Weihua <shiwh@cn.fujitsu.com>.
puset/cpuset_syscall_test/Makefile
10b951764fe6e95bee5fb80e3953efca779a2570 13-Jul-2009 yaberauneya <yaberauneya> Original message from Shi Weihua <shiwh@cn.fujitsu.com>:

In case cpuset, the file cpuset_syscall_test.o was not deleted after
"make clean".

This change is a modified version of the original patch submitted.
puset/cpuset_syscall_test/Makefile
09aba8f67313fe84b1aaf14a16cd71d4575d8d78 07-Jul-2009 subrata_modak <subrata_modak> Add autoconf tests for taskstats members not present on older kernels: This patch adds autoconf checks for some build failures reported by Cyril Hrubis. Please note I have not tested this on an old kernel. Also, it corrects the names of the preprocessor macros defined by autoconf. The remaining issue (the cgroupstats.h file) should be solved using the autoconf test that was committed recently. Signed-off-by: Jiri Palecek <jpalecek@web.de>.
group/getdelays.c
252bc2abc83bca77b1cefd52a636ad95c88f8f4e 23-Jun-2009 subrata_modak <subrata_modak> Adapt the cgroup/test_6_2 test to the various ways clone is called on different architectures: Code shamelessly taken from clone01 test. Signed-off-by: Jiri Palecek <jpalecek@web.de>.
group/clone_platform.h
group/test_6_2.c
e78935efee37535e43e309d8abfbed0e2e719539 23-Jun-2009 subrata_modak <subrata_modak> Some makefiles ignore errors from commads ran in shell loops. This patch fixes that. Signed-off-by: Jiri Palecek <jpalecek@web.de>.
puset/Makefile
puset/cpuset_base_ops_test/Makefile
puset/cpuset_exclusive_test/Makefile
puset/cpuset_hierarchy_test/Makefile
puset/cpuset_hotplug_test/Makefile
puset/cpuset_inherit_test/Makefile
puset/cpuset_lib/Makefile
puset/cpuset_load_balance_test/Makefile
puset/cpuset_syscall_test/Makefile
ba55569c870b92ae8616a5a796059f02e1ba1b3e 23-Jun-2009 subrata_modak <subrata_modak> Fix some bashisms, mainly in the controllers tests: Signed-off-by: Jiri Palecek <jpalecek@web.de>.
puset/cpuset_base_ops_test/cpuset_base_ops_testset.sh
puset/cpuset_exclusive_test/cpuset_exclusive_test.sh
puset/cpuset_hierarchy_test/cpuset_hierarchy_test.sh
puset/cpuset_hotplug_test/cpuset_hotplug_test.sh
puset/cpuset_inherit_test/cpuset_inherit_testset.sh
puset/cpuset_lib/cpuset_funcs.sh
puset/cpuset_load_balance_test/cpuset_load_balance_test.sh
puset/cpuset_load_balance_test/cpuset_sched_domains_test.sh
puset/cpuset_memory_pressure_test/cpuset_memory_pressure_testset.sh
puset/cpuset_memory_spread_test/cpuset_memory_spread_testset.sh
puset/cpuset_memory_test/cpuset_memory_testset.sh
puset/cpuset_syscall_test/cpuset_syscall_testset.sh
emcg/memcg_regression_test.sh
572a8ad1fa772b8b939e2dccb85fff21e016a4c7 15-Jun-2009 subrata_modak <subrata_modak> kernel/controllers/ testcase and CGROUPS support. please, replace on the LTP main the previous patch with ones attached. The attached patch add the right labels of ifdef. This patch allows the cross-build of kernel/controllers (cgroups tests) testcase changing the policy to check the cgroups capability at build-time. Signed-off-by: Francesco Rundo <francesco.rundo@st.com>.
akefile
f0c3650d4daae11d30228c50f347e1104324f8a1 04-Jun-2009 subrata_modak <subrata_modak> I'd like to submit a request to change the method to check if CGROUPS support is enabled and available or not. I'm referring to the kernel/controllers/xxx testcase. I'm using the LTP-full-20090430 cross-compiled for SH based arch with a kernel 2.6.23. The used/released method placed inside kernel/controllers/Makefile, tries to understand if the cgroups (and others related...) support has been enabled in the current kernel, performing a check in the root filesystem under "/proc". It makes something like that:
CHECK_CGROUP := $(shell test -f /proc/cgroups && echo 'cgroup')
Now, in the context of LTP built for i386, the above check works fine. But what happen if LTP is cross-built ? Unfortunately, the "/proc" entry checked by the above Makefile rule, is the ones placed in the host and not the "/proc" of the target root filesysetm (in my case SH based target). This is wrong! Moreover, "/proc" is an entry which makes sense at runtime while it is useless at built time so the above check is "always" not applicable in case of LTP is built for other arch different from i386. In order to cover the scenario in which LTP is cross-built, I've patched the Makefile , replacing the above rule with the following ones: The above checked header file "cgroupstats.h" is placed in the target rootfs. If the cgroups support is available (and enabled...likely ;-) the above header is placed in the target rootfs. In that way, in case of cross-compilation (the env CROSS_COMPILE was defined) the check will be done in the header file instead of /proc. The env TARGET_DIR works like a "--prefix" fixing the path of the cross-target rootfs. Of course, If you have another checks/methods which can be done to understand -at build time- if cgroups support is available and/or enabled -for target platform-, please feel free to post a comment to LTP. Anyway, I'll attach the patch I've applied in our system. Advices and feedbacks are welcome!. Signed-off-by: Francesco Rundo <francesco.rundo@st.com>.
akefile
1c31098d55095e6a3c73e2f78598866ca68ddbb0 25-May-2009 subrata_modak <subrata_modak> I've found that ltp didn't compile on Debian because of old kernel headers, which contain taskstats struct without some of the needed fields. This autoconf test detects it and disables the code that would otherwise break. Signed-off-by: Jiri Palecek <jpalecek@web.de>.
group/getdelays.c
7a1d01cbc460bdc4a06666fb80d1f9382d603604 18-May-2009 subrata_modak <subrata_modak> Add Memory Cgroup regression tests to LTP: Those testcases can reproduce bugs we found in memcg, and is useful to track future regressions. Note: this test may crash the system with older kernels, so it is disabled for kernels older than 2.6.30. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>.
akefile
emcg/Makefile
emcg/README
emcg/memcg_regression_test.sh
emcg/memcg_test_1.c
emcg/memcg_test_2.c
emcg/memcg_test_4.c
emcg/memcg_test_4.sh
70259d6e7ec2569972fb663ea85f959c4f2b4f81 11-May-2009 subrata_modak <subrata_modak> Add new testcases for cpuset: This is the patch of new testcases for the functionality test of cpuset. It contains cpu hotplug vs cpuset test, load balance vs cpuset test, schedule domains partition test, memory pressure measurement function test, page caches spread test and memory allocation test. Note: page caches spread test(test of cpuset11) may fail because there is something wrong with the kernel. I have made a patch to fix it. Now the patch was adding into -mm tree. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>.
EADME
puset/Makefile
puset/README
puset/cpuset_hotplug_test/Makefile
puset/cpuset_hotplug_test/cpuset_hotplug_test.sh
puset/cpuset_hotplug_test/cpuset_list_compute.c
puset/cpuset_lib/cpuinfo.c
puset/cpuset_lib/cpuinfo.h
puset/cpuset_lib/cpuset_funcs.sh
puset/cpuset_lib/meminfo.c
puset/cpuset_lib/meminfo.h
puset/cpuset_load_balance_test/Makefile
puset/cpuset_load_balance_test/cpuset_cpu_hog.c
puset/cpuset_load_balance_test/cpuset_load_balance_test.sh
puset/cpuset_load_balance_test/cpuset_sched_domains_check.c
puset/cpuset_load_balance_test/cpuset_sched_domains_test.sh
puset/cpuset_memory_pressure_test/Makefile
puset/cpuset_memory_pressure_test/cpuset_memory_pressure.c
puset/cpuset_memory_pressure_test/cpuset_memory_pressure_testset.sh
puset/cpuset_memory_spread_test/Makefile
puset/cpuset_memory_spread_test/cpuset_mem_hog.c
puset/cpuset_memory_spread_test/cpuset_memory_spread_testset.sh
puset/cpuset_memory_test/Makefile
puset/cpuset_memory_test/cpuset_memory_test.c
puset/cpuset_memory_test/cpuset_memory_testset.sh
puset/cpuset_syscall_test/cpuset_syscall_testset.sh
puset/run_cpuset_test.sh
est_controllers.sh
71b936e93aa6de6fa10bd4b5d93a266604409072 25-Apr-2009 subrata_modak <subrata_modak> The attached patch fixes this bug. This is the bug of the kernel. The following patch has fixed the bug.
commit af76aba00fdcfb21535c9f9872245d14097a4561
Author: Rusty Russell <rusty@rustcorp.com.au>
Date: Mon Mar 30 22:05:11 2009 -0600
cpumask: fix seq_bitmap_*() functions.
1) seq_bitmap_list() should take a const.
2) All the seq_bitmap should use cpumask_bits().
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
But after applying this patch, Case 5 and 6 still failed. It is because the max size of CPUSET in the glibc is 1024, but the max size of your kernel is 4096, when we invoke the sched_getaffinity, the kernel will check whether the size of mask passed into the function is >= the size of the mask in the kernel. If not, the function returns -1. So it is not the bug of the tesecase. This patch contains two lib files written by Paul Jackson who is ex-maintainer of cpuset. These two lib files are used for both this bug fix and the testcases that will be added in future. Signed-Off-By: Miao Xie <miaox@cn.fujitsu.com>.
puset/cpuset_lib/bitmask.h
puset/cpuset_lib/common.h
puset/cpuset_lib/cpuset.h
puset/cpuset_lib/cpuset_funcs.sh
puset/cpuset_lib/libbitmask.c
puset/cpuset_lib/libcpuset.c
puset/cpuset_syscall_test/Makefile
puset/cpuset_syscall_test/cpuset_syscall_test.c
puset/cpuset_syscall_test/cpuset_syscall_testset.sh
5e975a533d50134143d704e8dddeecc79ea558d2 22-Apr-2009 subrata_modak <subrata_modak> Test suite for cpuset: This is the test suite for the basis operation test and part functionality test of cpuset. It contains adding/removing cpus/mems test, setting flags test, exclusive function test, hierarchy relation test, inherit relation test and cpuset VS syscall test. More testcases will be added in future. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>.
akefile
EADME
puset/Makefile
puset/README
puset/cpuset_base_ops_test/Makefile
puset/cpuset_base_ops_test/cpuset_base_ops_testset.sh
puset/cpuset_exclusive_test/Makefile
puset/cpuset_exclusive_test/cpuset_exclusive_test.sh
puset/cpuset_hierarchy_test/Makefile
puset/cpuset_hierarchy_test/cpuset_hierarchy_test.sh
puset/cpuset_inherit_test/Makefile
puset/cpuset_inherit_test/cpuset_inherit_testset.sh
puset/cpuset_lib/Makefile
puset/cpuset_lib/cpuset_funcs.sh
puset/cpuset_syscall_test/Makefile
puset/cpuset_syscall_test/cpuset_syscall_test.c
puset/cpuset_syscall_test/cpuset_syscall_testset.sh
puset/run_cpuset_test.sh
est_controllers.sh
estplan.txt
75df824f1f452ace419755b1136994e120d81dd5 22-Apr-2009 subrata_modak <subrata_modak> Add cgroup regression tests to LTP: Those testcases can reproduce bugs we found in cgroups, and is useful to track future regressions. Note: this test may crash the system with older kernels, so it is disabled for kernels older than 2.6.29. Another note: getdelays.c is linux-2.6/Documentation/accounting/getdelays.c. How to run this test: # runltp -f controllers
Result:
cgroup_regression_test 1 PASS : no kernel bug was found
cgroup_regression_test 2 PASS : notify_on_release is inherited
cgroup_regression_test 3 PASS : no kernel bug was found
cgroup_regression_test 4 PASS : no lockdep BUG was found
cgroup_regression_test 5 PASS : no kernel bug was found
cgroup_regression_test 6 PASS : no kernel bug was found
cgroup_regression_test 7 PASS : no kernel bug was found
cgroup_regression_test 8 PASS : no kernel bug was found
cgroup_regression_test 9 PASS : no kernel warning was found
cgroup_regression_test 10 PASS : no kernel warning was found
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>.
akefile
EADME
group/Makefile
group/README
group/cgroup_regression_test.sh
group/fork_processes.c
group/getdelays.c
group/test_10_1.sh
group/test_10_2.sh
group/test_3_1.sh
group/test_3_2.sh
group/test_6_1.sh
group/test_6_2.c
group/test_9_1.sh
group/test_9_2.sh
8856d3065c983e91f6ef6243e7e8cdef5a52fd60 09-Mar-2009 subrata_modak <subrata_modak> Calculate the allowed latency dynamicaly for cpu controller latency tests: This patch adds the proper logic for calculating the allowed value of latency that is being used as the PASS/FAIL criterion in cpuctl latency testcases. Signed-off-by Sudhir Kumar <skumar@linux.vnet.ibm.com>.
puctl/cpuctl_latency_check_task.c
puctl/cpuctl_testplan.txt
puctl/run_cpuctl_latency_test.sh
4bb656a129f7507823e9e6d6b98b1a02fd80ef89 26-Feb-2009 subrata_modak <subrata_modak> Clear Trailing Whitespace. Signed-off-by: Michal Simek <monstr@monstr.eu>.
puctl/cpuctl_test02.c
5d8dc705df73c6e4056d8a05f98caa58096a3fe0 26-Feb-2009 subrata_modak <subrata_modak> Add Freezer Controller Testcases: These testcases cover the basic functionality of the kernel cgroup freezer controller described in the kernel's Documentation/cgroups/freezer-subsystem.txt file. Briefly:
The freezer subsystem in the cgroup filesystem defines a file named freezer.state. Writing "FROZEN" to the state file will freeze all tasks in the cgroup or return with errno EBUSY if the group can't be frozen immediately (use /bin/echo if you wish to check exit codes). After a successful write of "FROZEN" writing "THAWED" will unfreeze the tasks in the cgroup. Reading will return the current state. Note that freezer.state doesn't exist in the root cgroup, which means the root cgroup is non-freezable.
* Sample usage:
$ mkdir /containers
$ mount -t cgroup -ofreezer freezer /containers
$ mkdir /containers/0
$ echo $some_pid > /containers/0/tasks
$ cat /containers/0/tasks/freezer.state
THAWED
$ echo FROZEN > /containers/0/tasks/freezer.state
<IO Error (busy)>
$ cat /containers/0/tasks/freezer.state
FREEZING
$ sleep 0.2
$ echo FROZEN > /containers/0/tasks/freezer.state
$ cat /containers/0/tasks/freezer.state
FROZEN
$ echo FROZEN > /containers/0/tasks/freezer.state
$ cat /containers/0/tasks/freezer.state
THAWED
The bulk of the code is in libcgroup_freezer. Early tests cover the initialization used for the bulk of the tests. Each testcase is a brief shell script composed of your typical three phases:
Initialization
sourcing libcgroup_freezer
mounting the cgroup filesystem
making a sample cgroup
making a sample process [optional]
Test body
Actions:
freeze, thaw, move to (new) cgroups
try to fork new processes
signal sequences
Assertions interleaved with the actions:
cgroup/task existence
cgroup/task state
cgroup membership
Cleanup
The patch runs these tests when the other cgroup controller tests run but is otherwise independent of the infrastructure offered by those controller tests. Also, these tests may be carefully run by hand or via the run.sh script provided. Signed-off-by: Matt Helsley <matthltc@us.ibm.com>.
akefile
reezer/00_description.txt
reezer/CHANGELOG
reezer/COPYING
reezer/Makefile
reezer/README
reezer/TODO
reezer/fork_exec_loop.c
reezer/fork_freeze.sh
reezer/freeze_cancel.sh
reezer/freeze_kill_thaw.sh
reezer/freeze_move_thaw.sh
reezer/freeze_self_thaw.sh
reezer/freeze_sleep_thaw.sh
reezer/freeze_thaw.sh
reezer/freeze_write_freezing.sh
reezer/libcgroup_freezer
reezer/libltp
reezer/run.sh
reezer/stop_freeze_sleep_thaw_cont.sh
reezer/stop_freeze_thaw_cont.sh
reezer/timed_forkbomb.c
reezer/vfork.c
reezer/vfork_freeze.sh
reezer/write_freezing.sh
est_controllers.sh
9c9856bbe776c5cdb6237cfbc279b70505c25259 15-Dec-2008 subrata_modak <subrata_modak> CPU controller latency testcases v-4: Add the test to be run with other cpu controller testcases. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>.
est_controllers.sh
a79599ac303ff1e35f2717b3e201dee3d1159fe4 15-Dec-2008 subrata_modak <subrata_modak> CPU controller latency testcases v-4: Edit the makefile. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>.
puctl/Makefile
497ac2c501359b0f83fc4c7d8e0d89a2cc94404c 15-Dec-2008 subrata_modak <subrata_modak> CPU controller latency testcases v-4: The patch adds a script which runs the load tasks and the latency check task. The script creates setup for both the tests(with and without cpu controller). Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>.
puctl/run_cpuctl_latency_test.sh
538bdad9c0cbcc0ef3a835c78cf54f537a4c5da5 15-Dec-2008 subrata_modak <subrata_modak> CPU controller latency testcases v-4: The patch adds a binary to be run as the latency check task. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>.
puctl/cpuctl_latency_check_task.c
c2013131466aa0a66053552453e01e4632f76983 15-Dec-2008 subrata_modak <subrata_modak> CPU controller latency testcases v-4: The patch adds a binary to be run as load on the machine. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>.
puctl/cpuctl_latency_test.c
d5364ab2f62785e581d1dcab9451e6bd3899fd03 15-Dec-2008 subrata_modak <subrata_modak> CPU controller latency testcases v-4: Add some documentation with respect to test. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>.
puctl/cpuctl_testplan.txt
fb2d67b0a839ab468934b0902336577b9ac0d366 25-Nov-2008 subrata_modak <subrata_modak> CONTROLLERS: modify script to run def task for test 10: This patch modifies the script to run the default task for test 10. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>.
puctl/run_cpuctl_stress_test.sh
77950251cbbb6b63c1d0bc488aa8bbb3b1e007ad 25-Nov-2008 subrata_modak <subrata_modak> CONTROLLERS: modify script to run def task for test 9: This patch modifies the script to run the default task for test 9. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>.
puctl/run_cpuctl_stress_test.sh
d638ebd61a9c485868ad0daa0eaf89daecda7a61 25-Nov-2008 subrata_modak <subrata_modak> CONTROLLERS: add binary to run def task for test 9,10: This patch adds a binary which will be running as a default task for testcases 9 and 10 to create an ideal scenario. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>.
puctl/cpuctl_def_task04.c
402fe7bdddfd10440b6290c2d7609ebcda03ffdb 25-Nov-2008 subrata_modak <subrata_modak> CONTROLLERS: change share values for the group: This patch changes the shares values for the groups in test num 9 to some practical values. (instead of 2,3,4,5...100,200,300,400.... ). Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>.
puctl/cpuctl_test04.c
7d35794b209d87e376589fa996a55f78c9ad1b27 25-Nov-2008 subrata_modak <subrata_modak> CONTROLLERS: modify the script to run def task for test 6,7,8: This patch modifiesadds a binary which will be running as a default task for testcases 6, 7 and 8 to create an ideal scenario. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>.
puctl/run_cpuctl_stress_test.sh
ca368e328247f00dfffbaa2611ed7d8eb6676a8d 25-Nov-2008 subrata_modak <subrata_modak> CONTROLLERS: add binary to run def task for test 6,7,8: This patch adds a binary which will be running as a default task for testcases 6, 7 and 8 to create an ideal scenario. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>.
puctl/cpuctl_def_task03.c
b5caeb7c66f132a80897d7b4e8358864c98717f1 25-Nov-2008 subrata_modak <subrata_modak> CONTROLLERS: modify the script to run def task for test 5: This patch modifies the script to run the default task for test 5. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>.
puctl/run_cpuctl_test.sh
647ec9738c2dc9e4be5230c9af52c9f4659ac124 25-Nov-2008 subrata_modak <subrata_modak> CONTROLLERS: modify the script to run def task for test 4: This patch modifies the script to run the default task for test 4. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>.
puctl/parameters.sh
puctl/run_cpuctl_test.sh
5bb280e865a04a9b746f9d04dbbd9a13a3cd78c9 25-Nov-2008 subrata_modak <subrata_modak> CONTROLLERS: binary for def task for test 4 & 5: This patch adds a binary which will be running as a default task for testcases 4 and 5 to create an ideal scenario. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>.
puctl/cpuctl_def_task02.c
f600923885d241656bc95feb772962c5596fef4a 25-Nov-2008 subrata_modak <subrata_modak> CONTROLLERS: modify def task binary for test 3: The patch modifies the default task binary to be run for test num 3 also. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>.
puctl/cpuctl_def_task01.c
bd1f58065370eddeea275a238b0a439451c8b70e 25-Nov-2008 subrata_modak <subrata_modak> CONTROLLERS: pass the argument to the function: The function scan_shares_files() modifies a global variable, which in the current way was confusing, so passing the variable as argument. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>.
puctl/cpuctl_test01.c
puctl/cpuctl_test02.c
puctl/cpuctl_test03.c
puctl/cpuctl_test04.c
ibcontrollers/libcontrollers.c
ibcontrollers/libcontrollers.h
c50bfa605c087cfe73911d33187dc424e4b3a2f4 25-Nov-2008 subrata_modak <subrata_modak> CONTROLLERS: Modify test to reflect kernel MAX_SHARES limit: The tests takes too long if we keep the time interval 60 seconds. Hence changing to 30 seconds. Also the kernel has now the max linit on shares values (1UL <<18). So taking readings upto 7th set will reach the max limit very soon(specialy on high end machines). Therefore we keep the multiplier to multiply at max 4 times. Hence we will reach till GROUP_NUM * 10^4. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>.
puctl/cpuctl_test01.c
puctl/cpuctl_test02.c
puctl/cpuctl_test03.c
puctl/cpuctl_test04.c
9073840d951e26db57af6a14a10ff0dc006642c9 25-Nov-2008 subrata_modak <subrata_modak> CONTROLLERS: modify script to run default task for test 1-2: This patch adds the code to trigger the default task for the tests 1-3. Also the code is added to clean this default task setup. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>.
puctl/parameters.sh
puctl/run_cpuctl_test.sh
71014ada3f9eca4e2ab266ce2fa1f77a279cac95 25-Nov-2008 subrata_modak <subrata_modak> CONTROLLERS: binary to be run as a default task for test 1-2: This patch adds a binary which will be running as a default task for testcases 1 to create an ideal scenario. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>.
puctl/cpuctl_def_task01.c
f50cdc36187b137f9420639b21927dfad922e802 25-Nov-2008 subrata_modak <subrata_modak> CONTROLLERS: set up for default group creation: This patch adds the code to do the setup for a default group which will be spinning a task to create an ideal scenario for group fairness. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>.
puctl/parameters.sh
d1174be3f26f933a5e1a892056b3678313032e7b 25-Nov-2008 subrata_modak <subrata_modak> CONTROLLERS: rename the setup function: In case the file defining functions fails to load, the function setup() will run the setup utility, so changing it to do_setup(). Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>.
puctl/parameters.sh
puctl/run_cpuctl_stress_test.sh
puctl/run_cpuctl_test.sh
2557afd4238c16f16876c8e789d9f2b584e0153e 25-Nov-2008 subrata_modak <subrata_modak> CONTROLLERS: do not redirect errors to /dev/null: Its no good to redirect the error messages from the binaries to /dev/null. One might not know what is the failure or what went wrong. This patch omits that redirection. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>.
puctl/run_cpuctl_stress_test.sh
puctl/run_cpuctl_test.sh
37aed20773b801a903517a7ef896176d0d93a4ef 25-Nov-2008 subrata_modak <subrata_modak> CONTROLLERS: replace numbers by FILENAME_MAX: 32 bytes are really unsufficient for hoding dir names, changing it to FILENAME_MAX. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>.
puctl/cpuctl_test01.c
puctl/cpuctl_test02.c
puctl/cpuctl_test03.c
puctl/cpuctl_test04.c
b15aafd4f07a07e790ac504343cf8d9bd77963af 20-Oct-2008 subrata_modak <subrata_modak> Hi,

This patch fixes most of warnings and badness including the following,

libnetns.c: In function ‘create_net_namespace’:
libnetns.c:65: warning: implicit declaration of function ‘tst_kvercmp’
shmnstest.c: In function ‘main’:
shmnstest.c:71: warning: unused variable ‘pid’
pidns03.c: In function ‘main’:
pidns03.c:83: warning: passing argument 4 of ‘do_clone_unshare_test’ makes pointer from integer
without a cast
cpuctl_test01.c: In function ‘main’:
cpuctl_test01.c:133: warning: implicit declaration of function ‘open’
cpuctl_test01.c:195: warning: unknown conversion type character ‘)’ in format
cpuctl_test01.c:195: warning: unknown conversion type character ‘)’ in format
cpuctl_test02.c: In function ‘main’:
cpuctl_test02.c:146: warning: implicit declaration of function ‘open’
cpuctl_test02.c:207: warning: unknown conversion type character ‘)’ in format
cpuctl_test02.c:207: warning: unknown conversion type character ‘)’ in format
cpuctl_test02.c:207: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 8 has
type ‘unsigned int’
cpuctl_test03.c: In function ‘main’:
cpuctl_test03.c:144: warning: implicit declaration of function ‘open’
cpuctl_test03.c:205: warning: unknown conversion type character ‘)’ in format
cpuctl_test03.c:205: warning: unknown conversion type character ‘)’ in format
cpuctl_test04.c: In function ‘main’:
cpuctl_test04.c:147: warning: implicit declaration of function ‘open’
cpuctl_test04.c:208: warning: unknown conversion type character ‘)’ in format
cpuctl_test04.c:208: warning: unknown conversion type character ‘)’ in format
cpuctl_test04.c:208: warning: format ‘%3lu’ expects type ‘long unsigned int’, but argument 8 has
type ‘unsigned int’
memctl_test01.c: In function ‘allocate_memory’:
memctl_test01.c:171: warning: assignment from incompatible pointer type
doio.c: In function ‘main’:
doio.c:477: warning: ‘sigblock’ is deprecated (declared at /usr/include/signal.h:181)
growfiles.c: In function ‘growfile’:
growfiles.c:2064: warning: pointer targets in passing argument 2 of ‘databingen’ differ in
signedness
growfiles.c:2066: warning: pointer targets in passing argument 2 of ‘databingen’ differ in
signedness
growfiles.c:2068: warning: pointer targets in passing argument 2 of ‘databingen’ differ in
signedness
growfiles.c:2070: warning: pointer targets in passing argument 2 of ‘databingen’ differ in
signedness
growfiles.c:2072: warning: pointer targets in passing argument 2 of ‘databingen’ differ in
signedness
growfiles.c:2074: warning: pointer targets in passing argument 2 of ‘databingen’ differ in
signedness
childmain.c: In function ‘ChildMain’:
childmain.c:551: warning: cast to pointer from integer of different size
childmain.c:559: warning: cast to pointer from integer of different size
childmain.c:569: warning: cast to pointer from integer of different size
childmain.c:838: warning: cast to pointer from integer of different size
dump.c: In function ‘format_str’:
dump.c:54: warning: pointer targets in passing argument 1 of ‘sprintf’ differ in signedness
dump.c:55: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
dump.c:55: warning: pointer targets in passing argument 1 of ‘__builtin_strncat’ differ in
signedness
dump.c:55: warning: pointer targets in passing argument 2 of ‘__builtin_strncat’ differ in
signedness
dump.c:57: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
dump.c:57: warning: pointer targets in passing argument 1 of ‘__builtin_strncat’ differ in
signedness
dump.c:58: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
dump.c:58: warning: pointer targets in passing argument 1 of ‘__builtin_strncat’ differ in
signedness
dump.c:59: warning: pointer targets in passing argument 1 of ‘sprintf’ differ in signedness
dump.c:60: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
dump.c:60: warning: pointer targets in passing argument 1 of ‘__builtin_strncat’ differ in
signedness
dump.c:60: warning: pointer targets in passing argument 2 of ‘__builtin_strncat’ differ in
signedness
dump.c:63: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
dump.c:63: warning: pointer targets in passing argument 1 of ‘__builtin_strncat’ differ in
signedness
dump.c:64: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
dump.c:64: warning: pointer targets in passing argument 1 of ‘__builtin_strncat’ differ in
signedness
dump.c:65: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
dump.c:65: warning: pointer targets in passing argument 1 of ‘__builtin_strncat’ differ in
signedness
dump.c:67: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
dump.c:67: warning: pointer targets in passing argument 1 of ‘__builtin_strncat’ differ in
signedness
dump.c:69: warning: pointer targets in passing argument 1 of ‘sprintf’ differ in signedness
dump.c:70: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
dump.c:70: warning: pointer targets in passing argument 1 of ‘__builtin_strncat’ differ in
signedness
dump.c:70: warning: pointer targets in passing argument 2 of ‘__builtin_strncat’ differ in
signedness
dump.c: In function ‘format_raw’:
dump.c:91: warning: pointer targets in passing argument 1 of ‘sprintf’ differ in signedness
dump.c:92: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
dump.c:92: warning: pointer targets in passing argument 1 of ‘__builtin_strncat’ differ in
signedness
dump.c:92: warning: pointer targets in passing argument 2 of ‘__builtin_strncat’ differ in
signedness
dump.c:94: warning: pointer targets in passing argument 1 of ‘sprintf’ differ in signedness
dump.c:95: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
dump.c:95: warning: pointer targets in passing argument 1 of ‘__builtin_strncat’ differ in
signedness
dump.c:95: warning: pointer targets in passing argument 2 of ‘__builtin_strncat’ differ in
signedness
main.c: In function ‘threadedMain’:
main.c:258: warning: cast to pointer from integer of different size
main.c:259: warning: cast to pointer from integer of different size
main.c:266: warning: cast to pointer from integer of different size
main.c:365: warning: cast to pointer from integer of different size
timer.c: In function ‘ChildTimer’:
timer.c:196: warning: cast to pointer from integer of different size
signal_test_01.c: In function ‘main’:
signal_test_01.c:195: warning: ‘sigsetmask’ is deprecated (declared at /usr/include/signal.h:184)
signal_test_01.c:232: warning: ‘sigblock’ is deprecated (declared at /usr/include/signal.h:181)
signal_test_03.c: In function ‘main’:
signal_test_03.c:119: warning: ‘sigblock’ is deprecated (declared at /usr/include/signal.h:181)
signal_test_03.c:144: warning: ‘sigsetmask’ is deprecated (declared at /usr/include/signal.h:184)
libipc.c: In function ‘init_buf’:
libipc.c:120: warning: cast from pointer to integer of different size
mallocstress.c: In function ‘alloc_mem’:
mallocstress.c:272: warning: cast from pointer to integer of different size
mallocstress.c:275: warning: cast from pointer to integer of different size
mallocstress.c:276: warning: cast to pointer from integer of different size
mallocstress.c: In function ‘main’:
mallocstress.c:316: warning: cast from pointer to integer of different size
mallocstress.c:327: warning: cast from pointer to integer of different size
mallocstress.c:368: warning: cast to pointer from integer of different size
shm_test.c: In function ‘shmat_rd_wr’:
shm_test.c:207: warning: cast to pointer from integer of different size
shm_test.c:221: warning: cast to pointer from integer of different size
shm_test.c:266: warning: cast to pointer from integer of different size
shm_test.c:270: warning: cast to pointer from integer of different size
shm_test.c: In function ‘main’:
shm_test.c:315: warning: cast from pointer to integer of different size
shm_test.c:326: warning: cast from pointer to integer of different size
pthserv.c: In function ‘main’:
pthserv.c:146: warning: pointer targets in passing argument 3 of ‘accept’ differ in signedness
pthserv.c:156: warning: cast to pointer from integer of different size
trace_sched.c: In function ‘get_proc_num’:
trace_sched.c:154: warning: cast from pointer to integer of different size
trace_sched.c: In function ‘main’:
trace_sched.c:348: warning: cast from pointer to integer of different size
trace_sched.c:381: warning: cast from pointer to integer of different size
check_simple_capset.c:23:28: error: sys/capability.h: No such file or directory
check_simple_capset.c: In function ‘main’:
check_simple_capset.c:27: error: ‘cap_t’ undeclared (first use in this function)
check_simple_capset.c:27: error: (Each undeclared identifier is reported only once
check_simple_capset.c:27: error: for each function it appears in.)
check_simple_capset.c:27: error: expected ‘;’ before ‘caps’
check_simple_capset.c:30: error: ‘caps’ undeclared (first use in this function)
check_simple_capset.c:31: error: ‘caps2’ undeclared (first use in this function)
clone03.c: In function ‘main’:
clone03.c:138: warning: cast from pointer to integer of different size
clone04.c: In function ‘main’:
clone04.c:147: warning: cast from pointer to integer of different size
clone06.c: In function ‘main’:
clone06.c:143: warning: cast from pointer to integer of different size
fmtmsg01.c: In function ‘clearbuf’:
fmtmsg01.c:82: warning: cast from pointer to integer of different size
libipc.c: In function ‘init_buf’:
libipc.c:116: warning: cast from pointer to integer of different size
msgget01.c: In function ‘check_functionality’:
msgget01.c:144: warning: cast from pointer to integer of different size
lib.c: In function ‘test_ENAMETOOLONG_path’:
lib.c:224: warning: cast from pointer to integer of different size
lib64.c: In function ‘test_ENAMETOOLONG_path’:
lib64.c:224: warning: cast from pointer to integer of different size
endian_switch01.c:64: warning: ‘setup’ defined but not used
crash01.c: In function ‘badboy_loop’:
crash01.c:344: warning: pointer targets in passing argument 1 of ‘castaway’ differ in signedness
crash01.c: In function ‘compute_badboy’:
crash01.c:529: warning: pointer targets in passing argument 1 of ‘castaway’ differ in signedness
crash01.c:537: warning: pointer targets in passing argument 1 of ‘castaway’ differ in signedness
crash01.c:543: warning: pointer targets in passing argument 1 of ‘castaway’ differ in signedness
netsync.c: In function ‘setupConnectionServeur’:
netsync.c:80: warning: pointer targets in passing argument 3 of ‘accept’ differ in signedness
test_1_to_1_threads.c: In function ‘main’:
test_1_to_1_threads.c:177: warning: cast to pointer from integer of different size
test_sctp_sendrecvmsg.c: In function ‘main’:
test_sctp_sendrecvmsg.c:150: warning: pointer targets in passing argument 5 of ‘getsockopt’ differ
in signedness
test_sctp_sendrecvmsg.c:224: warning: pointer targets in passing argument 5 of ‘getsockopt’ differ
in signedness
test_timetolive.c: In function ‘main’:
test_timetolive.c:152: warning: pointer targets in passing argument 5 of ‘getsockopt’ differ in
signedness
test_timetolive.c:260: warning: pointer targets in passing argument 5 of ‘getsockopt’ differ in
signedness
test_sctp_sendrecvmsg.c: In function ‘main’:
test_sctp_sendrecvmsg.c:150: warning: pointer targets in passing argument 5 of ‘getsockopt’ differ
in signedness
test_sctp_sendrecvmsg.c:224: warning: pointer targets in passing argument 5 of ‘getsockopt’ differ
in signedness
test_timetolive.c: In function ‘main’:
test_timetolive.c:152: warning: pointer targets in passing argument 5 of ‘getsockopt’ differ in
signedness
test_timetolive.c:260: warning: pointer targets in passing argument 5 of ‘getsockopt’ differ in
signedness
ltpClient.c: In function ‘network_listener’:
ltpClient.c:377: warning: pointer targets in passing argument 6 of ‘recvfrom’ differ in signedness
ltpClient.c: In function ‘ping_network’:
ltpClient.c:507: warning: pointer targets in passing argument 6 of ‘recvfrom’ differ in signedness
ltpClient.c: In function ‘ltp_traceroute’:
ltpClient.c:596: warning: pointer targets in passing argument 6 of ‘recvfrom’ differ in signedness
ltpServer.c: In function ‘ltp_udp_server_queue’:
ltpServer.c:235: warning: pointer targets in passing argument 6 of ‘recvfrom’ differ in signedness
ltpServer.c: In function ‘ltp_tcp_server_queue’:
ltpServer.c:268: warning: pointer targets in passing argument 3 of ‘accept’ differ in signedness
ltpServer.c: In function ‘tcp_receive_buffer’:
ltpServer.c:318: warning: pointer targets in passing argument 6 of ‘recvfrom’ differ in signedness
ltpServer.c: In function ‘ltp_multi_server_queue’:
ltpServer.c:383: warning: pointer targets in passing argument 6 of ‘recvfrom’ differ in signedness
Compiled successfully on Fedora 10 Beta x86_64.
Signed-off-by: CAI Qian <caiqian@cclom.cn>.
puctl/cpuctl_test01.c
puctl/cpuctl_test02.c
puctl/cpuctl_test03.c
puctl/cpuctl_test04.c
emctl/memctl_test01.c
91d5f18a5cde0b650ff017d4d1da867f5dcf744c 15-Oct-2008 subrata_modak <subrata_modak> This patch fixes build failures seen on RHEL 4 (2.6.9 based Kernel), and several warnings. The build failures are caused by pec_listener.c and then ptrace06.c, It because the Kernel version checking code is incorrect from it, as you can see from the error message above, "/bin/sh: ../../bin/tst_kvercmp: No such file or directory". I solve it by querying an entry in proc file system instead. For ptrace06.c case, PTRACE_GETSIGINFO and PTRACE_SETSIGINFO are unavailable in this version of Kernel, Given that this test also fails to compile for IA-64 entirely (please see more details on one of my previous emails sent not long ago), I disable this test temperately until those problems have been fixed. In addition, it fixed the following unnecessary compiling warnings. Finally, check_for_unshare.c:21: warning: implicit declaration of function `tst_kvercmp'. Signed-off-by: CAI Qian <caiqian@cclom.cn>.
akefile
d54d6d8ea66ad1aa4d28add161a524b8c3777f65 05-Oct-2008 subrata_modak <subrata_modak> Hi Andrea, As you are using myfunctions.sh in your script, it will simply replace the installed myfunctions.sh in $LTP_ROOT/testcase/bin which is written by Sudhir. And if you will run this testcase from `./runltp` sudhir's memory controller tetscase will refer your myfuncitons.sh script. So i am just renaming this script to some other name and correspondingly changing the Makefile & run_io_throttle_test.sh . Attached is the patch. I might require your acknowledgement for this. Signed-Off-By: "Rishikesh K. Rajak" <risrajak@linux.vnet.ibm.com>, Acked-by: Andrea Righi <righi.andrea@gmail.com>.
o-throttle/Makefile
o-throttle/myfunctions-io.sh
o-throttle/myfunctions.sh
o-throttle/run_io_throttle_test.sh
4ffa9a89d5c00b3d25dfa36d2093af232b28161e 03-Oct-2008 subrata_modak <subrata_modak> Here is one fix for io-controller testcase. It might not have run when kernel supports io-controller. Description: Instead of block io testcases, memory controller testcase will run. Signed-off By: Rishikesh K Rajak <risrajak@linux.vnet.ibm.com>.
est_controllers.sh
024988b73a0817c44be2a5a0675261c4425a3dea 24-Sep-2008 subrata_modak <subrata_modak> Daniel Gollub <dgollub@suse.de> wrote: With 2.6.27-rc* linux/dirent.h got removed Kbuild headers_install targe and dirent struct got removed. Instead use #include <dirent.h> instead of #include <linux/dirent.h>. Garrett Cooper <yanegomi@gmail.com> wrote: It appears that asm/page.h isn't packaged with kernel.org sources anymore as of 2.6.25, according to some folks on #fedora-devel. I was just wondering a) if that's the case, b) whether or not those affected test compiles have been identified and removed / modified? If both questions are true and no one has pointed out this issue before now, I've found all of the items which don't follow this behavior: According to the folks in #fedora-devel (airlied, jwb), we shouldn't be using asm/page.h directly, but instead should be accessing everything in page.h via sysconf(2), like so:
PAGE_SIZE => sysconf(_SC_PAGE_SIZE)
This method is POSIX compatible as per: http://www.opengroup.org/onlinepubs/009695399/functions/sysconf.html.
Yes, it is. There are numerous test cases in LTP which use:
struct dirent,
by including /usr/include/dirent.h. The interesting part is, this guy (/usr/include/dirent.h) in turn includes /usr/include/bits/dirent.h, where the definition of struct resides. Following is the patch which solves this issue along with page.h header file removal from 2.6.25 onwards, reported by Garret earlier. Signed-of-by: Subrata Modak <subrata@linux.vnet.ibm.com>.
o-throttle/iobw.c
896d02567433bda9fd68d2e3b13f59349081709c 04-Aug-2008 subrata_modak <subrata_modak> It is surely better to support the old blockio.bandwidth and the new blockio.bandwidth-max interface for now. So, just ignore the previous patch. Support both blockio.bandwidth and the new interface blockio.bandwidth-max, to set i/o limiting rules according to the new userspace->kernel interface (io-throttle v8). In perspective we would like to have also blockio.bandwidth-min and implement a mechanism to guarantee minimum performance levels as well. Signed-off-by: Andrea Righi <righi.andrea@gmail.com>.
o-throttle/run_io_throttle_test.sh
39c3be5e2dd99a42bf079d88cf514edcd2e85cae 04-Aug-2008 subrata_modak <subrata_modak> As reported by Li Zefan, normally upper-case macros means constants, but the above macros are not constants: Use lower-case names instead. Signed-off-by: Andrea Righi <righi.andrea@gmail.com>. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>.
o-throttle/iobw.c
60aa78315174e5bf9d98f66db582ad381e013817 01-Aug-2008 subrata_modak <subrata_modak> Compile error message occured on ia64 box. You should get a gcc warning on x86: "PAGE_SIZE" redefined. We can avoid the warning:
#ifndef PAGE_SIZE
#define PAGE_SIZE getpagesize()
#endif
But normally upper-case macros means constants, but the above macro is not a constant. Shi Weihua <shiwh@cn.fujitsu.com> & Li Zefan <lizf@cn.fujitsu.com>.
o-throttle/iobw.c
1b90e1a9fc911014f57c5090a2ff6e4b6c1f438d 14-Jul-2008 subrata_modak <subrata_modak> Add the block device I/O bandwidth controller (io-throttle) testcase. See testcase documentation for design and implementation details. See also: http://lkml.org/lkml/2008/7/4/143. Signed-off-by: Andrea Righi <righi.andrea@gmail.com>.
akefile
o-throttle/Makefile
o-throttle/README
o-throttle/io_throttle_testplan.txt
o-throttle/iobw.c
o-throttle/myfunctions.sh
o-throttle/run_io_throttle_test.sh
est_controllers.sh
3deda4b94416e0b9f17b8324432b28391aae80e6 28-May-2008 subrata_modak <subrata_modak> This patch addresses the review comments for recently accepted memory controller testcases (failcnt test and stat_check test). Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>.
emctl/README
091b5e0eb927e16ccde936a0d2e0f766ef759bcb 26-May-2008 subrata_modak <subrata_modak> This patch adds the documentation for memory controller. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>.
EADME
emctl/README
emctl/memctl_testplan.txt
estplan.txt
9e65c8b9165627be613cc550f4ff73434c27116d 26-May-2008 subrata_modak <subrata_modak> This patch adds the stat check test case for memory controller. In this test a task runs in a group with some memory limit and does some memory allocation. The script checks the memory usage field from two files under the controller, the memory.usage_in_bytes and memory.stat. It reports pass if the two values are same and fail if the two values differ. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>. Acked-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>.
emctl/memctl_test01.c
emctl/run_memctl_test.sh
est_controllers.sh
5c7971b313b9f002e9459d350b630ba88b6dd936 26-May-2008 subrata_modak <subrata_modak> This patch adds the failcnt check test for memory controller. In this test a task runs in a group with some memory limit and does total memory allocation greater than the limit of the group. The script checks the failcnt from memory.failcnt file under the controller. It reports pass if failcnt increases otherwise reports fail. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>. Acked-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>.
emctl/memctl_test01.c
emctl/run_memctl_test.sh
est_controllers.sh
708907185a6cde381ae6a36fb37ce84809270872 30-Apr-2008 subrata_modak <subrata_modak> Initial Set of MEMORY CONTROLLER Test Cases Added to LTP by Sudhir Kumar. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>, Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>.
akefile
emctl/Makefile
emctl/memctl_test01.c
emctl/myfunctions.sh
emctl/run_memctl_test.sh
est_controllers.sh
d3ba25b3d046e18320734e03dbcfe42b089115f8 30-Apr-2008 subrata_modak <subrata_modak> Some Cleanups for CPU Controller Test Cases by Sudhir Kumar. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>, Acked-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>.
puctl/cpuctl_test01.c
puctl/cpuctl_test02.c
puctl/cpuctl_test03.c
puctl/cpuctl_test04.c
puctl/cpuctl_testplan.txt
puctl/parameters.sh
puctl/run_cpuctl_stress_test.sh
puctl/run_cpuctl_test.sh
ibcontrollers/libcontrollers.c
ibcontrollers/libcontrollers.h
est_controllers.sh
estplan.txt
8e9b4f058c817422054c01c28b92a412036eb6f4 28-Feb-2008 subrata_modak <subrata_modak> Initial Set of CPU CONTROLLERS Test Cases. This patch adds the documentation for cpu controller test cases. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
EADME
puctl/README
puctl/cpuctl_testplan.txt
estplan.txt
8e843c6a701cc4de95ca6cc501ba5ee901be3a5a 28-Feb-2008 subrata_modak <subrata_modak> Initial Set of CPU CONTROLLERS Test Cases. This patch does some cleanup. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
puctl/cpuctl_test01.c
puctl/cpuctl_test02.c
puctl/cpuctl_test03.c
puctl/cpuctl_test04.c
puctl/parameters.sh
puctl/run_cpuctl_stress_test.sh
puctl/run_cpuctl_test.sh
est_controllers.sh
287d18bf1010633ce7ce49daabb14f90bc7d997a 28-Feb-2008 subrata_modak <subrata_modak> Initial Set of CPU CONTROLLERS Test Cases. This patch adds the library routines in cpu controller stress test cases 4 & 5. It also does minor cleanup. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
puctl/cpuctl_test04.c
c0816caeb19ba7d09bd04e2bfbf7b6a672be9971 28-Feb-2008 subrata_modak <subrata_modak> Initial Set of CPU CONTROLLERS Test Cases. This patch adds the library routines in cpu controller stress test cases 1,2 &3. It also does minor cleanup. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
puctl/cpuctl_test03.c
edac899ad67ae1c32494b65859fdceca310a43d7 28-Feb-2008 subrata_modak <subrata_modak> Initial Set of CPU CONTROLLERS Test Cases. This patch adds the library routines in cpu controller test case 4th and 5th. It also does minor cleanup. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
puctl/cpuctl_test02.c
691aa80deb094870127710b7dbe67c80a2e15ece 28-Feb-2008 subrata_modak <subrata_modak> Initial Set of CPU CONTROLLERS Test Cases. This patch adds the library routines in cpu controller test case 3. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
puctl/cpuctl_test01.c
66b667aa0263893ea4fe26467dbce35881440b12 28-Feb-2008 subrata_modak <subrata_modak> Initial Set of CPU CONTROLLERS Test Cases. This patch adds a library for cpu controller testing. The library contains the common functions used by all test cases. These functions will be further used in testcases for memory controller also. In addition to the library code this patch also contains the changes required to call and use library functions in testcase 1(2). Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
akefile
puctl/Makefile
puctl/cpuctl_test01.c
ibcontrollers/Makefile
ibcontrollers/libcontrollers.c
ibcontrollers/libcontrollers.h
72d13509bbe99a677e7b764d4f2f39e2b03b2f81 28-Feb-2008 subrata_modak <subrata_modak> Initial Set of CPU CONTROLLERS Test Cases. This patch adds the tenth testcase(stress) for cpu controller. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
puctl/cpuctl_test04.c
puctl/run_cpuctl_stress_test.sh
est_controllers.sh
3c744274b453bf857361a94a6950422215c529a9 28-Feb-2008 subrata_modak <subrata_modak> Initial Set of CPU CONTROLLERS Test Cases. This patch adds the ninth testcase (stress) for cpu controller. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
puctl/cpuctl_test04.c
puctl/parameters.sh
puctl/run_cpuctl_stress_test.sh
est_controllers.sh
c1e0a57ac3e9b2c016ec5c21c47ab2ea531e9b1c 28-Feb-2008 subrata_modak <subrata_modak> Initial Set of CPU CONTROLLERS Test Cases. This patch adds the sixth to eigth testcase for cpu controller. These are the stress test cases. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
puctl/Makefile
puctl/cpuctl_test03.c
puctl/run_cpuctl_stress_test.sh
est_controllers.sh
0485d3d69c54bbedcca900176023e8d3d2525e85 28-Feb-2008 subrata_modak <subrata_modak> Initial Set of CPU CONTROLLERS Test Cases. This test removes the common shell functions from run scripts and puts them into a separate file parameters.sh. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
puctl/Makefile
puctl/parameters.sh
puctl/run_cpuctl_test.sh
09d26b603798522db151ba51647de0fbbb4d139c 28-Feb-2008 subrata_modak <subrata_modak> This patch adds the fourth and fifth testcases for cpu controller (ie Nice value test and task migration test). Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
puctl/cpuctl_test02.c
puctl/run_cpuctl_test.sh
est_controllers.sh
6c12c3a509ce62b5f6a5c863e416df6716523dc5 28-Feb-2008 subrata_modak <subrata_modak> Initial Set of CPU CONTROLLERS Test Cases. This patch changes the way parameters are passed from script to c file. Also does some cleanup. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
puctl/cpuctl_test02.c
puctl/run_cpuctl_test.sh
50531e457418c6cb26597b5a4cb48d31161f8f16 28-Feb-2008 subrata_modak <subrata_modak> Initial Set of CPU CONTROLLERS Test Cases. This patch adds the fourth testcase for cpu controller. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
puctl/cpuctl_test02.c
puctl/run_cpuctl_test.sh
est_controllers.sh
4ce2b0b0b78e5988bdb6662d246ed8fc4de5f29a 28-Feb-2008 subrata_modak <subrata_modak> Initial Set of CPU CONTROLLERS Test Cases. This patch adds the third testcase for cpu controller. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
puctl/cpuctl_test01.c
puctl/run_cpuctl_test.sh
est_controllers.sh
6b78bd97ae956c84863ab786cb34f5ce592d2300 28-Feb-2008 subrata_modak <subrata_modak> Initial set of CPU CONTROLLER Test Cases. This patch creates the framework for controllers testcases in LTP. This also creates the first and second testcase for cpu controller and adds some documentation. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
akefile
EADME
puctl/Makefile
puctl/README
puctl/cpuctl_test01.c
puctl/cpuctl_testplan.txt
puctl/run_cpuctl_test.sh
est_controllers.sh
estplan.txt