test.sh: add EXPECT_PASS, EXPECT_FAIL functions

Sometimes we need to execute a command and call tst_resm TPASS/TFAIL
based on the command's exit status.

The existing ROD() function can make 99% of the job, we just
need to let it know how the command's exit code should be
interpreted. This patch does it and introduces a couple of new
functions to help with the described situation.

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
2 files changed