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