diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-07-09 10:30:23 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-07-09 10:34:09 +0100 |
commit | 2038b2470d83fc13e238dd884ee1b5676dd04385 (patch) | |
tree | fa88a7f3e89d6a7a5910109c8f93c215f6cbb909 /tests | |
parent | 97fa5c87cf610137b85178634868358d87cbd388 (diff) |
igt/pm_rpm: Fix requirement for external modules
Don't just fail, skip gracefully if an external module is unavailable.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/pm_rpm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c index 03ef2eba..82972076 100644 --- a/tests/pm_rpm.c +++ b/tests/pm_rpm.c @@ -647,7 +647,7 @@ static void setup_pc8(void) return; /* Make sure our Kernel supports MSR and the module is loaded. */ - igt_assert(system("modprobe -q msr > /dev/null 2>&1") != -1); + igt_require(system("modprobe -s msr") == 0); msr_fd = open("/dev/cpu/0/msr", O_RDONLY); igt_assert_f(msr_fd >= 0, @@ -793,7 +793,7 @@ static void i2c_subtest_check_environment(void) struct dirent *dirent; /* Make sure the /dev/i2c-* files exist. */ - igt_assert(system("modprobe -q i2c-dev > /dev/null 2>&1") != -1); + igt_require(system("modprobe -s i2c-dev") == 0); dev_dir = opendir("/dev"); igt_assert(dev_dir); |