History log of /external/ltp/testcases/kernel/controllers/cgroup_fj/cgroup_fj_function.sh
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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>
/external/ltp/testcases/kernel/controllers/cgroup_fj/cgroup_fj_function.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>
/external/ltp/testcases/kernel/controllers/cgroup_fj/cgroup_fj_function.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>
/external/ltp/testcases/kernel/controllers/cgroup_fj/cgroup_fj_function.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>
/external/ltp/testcases/kernel/controllers/cgroup_fj/cgroup_fj_function.sh
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>
/external/ltp/testcases/kernel/controllers/cgroup_fj/cgroup_fj_function.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>
/external/ltp/testcases/kernel/controllers/cgroup_fj/cgroup_fj_function.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>
/external/ltp/testcases/kernel/controllers/cgroup_fj/cgroup_fj_function.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>
/external/ltp/testcases/kernel/controllers/cgroup_fj/cgroup_fj_function.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>
/external/ltp/testcases/kernel/controllers/cgroup_fj/cgroup_fj_function.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>
/external/ltp/testcases/kernel/controllers/cgroup_fj/cgroup_fj_function.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>
/external/ltp/testcases/kernel/controllers/cgroup_fj/cgroup_fj_function.sh
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>
/external/ltp/testcases/kernel/controllers/cgroup_fj/cgroup_fj_function.sh
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>
/external/ltp/testcases/kernel/controllers/cgroup_fj/cgroup_fj_function.sh
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>
/external/ltp/testcases/kernel/controllers/cgroup_fj/cgroup_fj_function.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>
/external/ltp/testcases/kernel/controllers/cgroup_fj/cgroup_fj_function.sh
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.
/external/ltp/testcases/kernel/controllers/cgroup_fj/cgroup_fj_function.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>.
/external/ltp/testcases/kernel/controllers/cgroup_fj/cgroup_fj_function.sh