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>
9 files changed