Skip to content

Commit

Permalink
Fail if an expected signal isn't raised
Browse files Browse the repository at this point in the history
We need to check for expected_sig when a test completes.

Signed-off-by: Jeremy Kerr <[email protected]>
  • Loading branch information
jk-ozlabs committed Mar 4, 2009
1 parent 3c09607 commit 08c8e31
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bin/run-tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,11 @@ static int run_test(struct test *test, int dir_fd, int enable_timeout)
test->expected_rc);
rc = -1;

} else if (test->expected_sig) {
test_fail(test, "expected sig %d",
test->expected_sig);
rc = -1;

} else if (dmesg_check()) {
test_fail(test, "dmesg");
rc = -1;
Expand Down
1 change: 1 addition & 0 deletions bin/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ struct test *test_create(void *ctx, char *path, int type)

/* set defaults */
test->expected_rc = 0;
test->expected_sig = 0;
test->disabled = 0;
test->ignored = 0;
test->caps_required = NULL;
Expand Down

0 comments on commit 08c8e31

Please sign in to comment.