Skip to content

Commit

Permalink
tools: assignments: 1-tracer: Fix open device file test assertion fai…
Browse files Browse the repository at this point in the history
…lure
  • Loading branch information
alexandrasandulescu committed Mar 28, 2018
1 parent 46f271f commit cd6a81e
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,10 @@ int max_points = 100;

static void init_test(void)
{
system("insmod " MODULE_FILENAME);
int rc;

rc = system("insmod " MODULE_FILENAME);
DIE(rc != 0, "init_test");
}

static void init_test2(int *fd)
Expand Down Expand Up @@ -284,7 +287,7 @@ static void test_open_dev_tracer(void)
snprintf(dev_name, 63, "/dev/%s", TRACER_DEV_NAME);

rc = open(dev_name, O_RDONLY);
test(__func__, rc > 0, 1);
test(__func__, rc >= 0, 1);
close(rc);

cleanup_test();
Expand Down

0 comments on commit cd6a81e

Please sign in to comment.