test.py: Stop test execution on error

Add error scanning to test.py based on known patterns in stdout and
stderr and stop test execution on error to make broken test cases stand
out.

Example output looks as follows:

  PASS: link returns ENOENT if source path does not exists
  PASS: create a file
  PASS: close the file
  PASS: create a hard link
  PASS: link returns EEXIST if destination path exists
  PASS: read content from another link
  PASS: stat the file
  PASS: hard link count is increased
  PASS: stat the hard link
  PASS: stat device IDs match
  PASS: stat inode numbers match
  PASS: remove the hard link
  PASS: stat the file
  FAIL: hard link count is decreased
  PASS: remove the file
  SUMMARY: 15 tests, 1 failures
  Powering off.

  Test '/tests/tst-fs-link.so' FAILED
  make: *** [check] Error 1

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>