lib: Show the command that fails when suspending

Include the system("") in the debug output for the assertion failure.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2016-03-02 13:57:35 +00:00
parent a3de0bc9df
commit 5533f22c35

View File

@ -364,8 +364,6 @@ void igt_cleanup_aperture_trashers(void)
*/
void igt_system_suspend_autoresume(void)
{
int ret;
/* FIXME: Simulation doesn't like suspend/resume, and not even a lighter
* approach using /sys/power/pm_test to just test our driver's callbacks
* seems to fare better. We need to investigate what's going on. */
@ -374,8 +372,7 @@ void igt_system_suspend_autoresume(void)
/* skip if system doesn't support suspend-to-mem */
igt_skip_on(system("rtcwake -n -s 30 -m mem") != 0);
ret = system("rtcwake -s 30 -m mem");
igt_assert_f(ret == 0,
igt_assert_f(system("rtcwake -s 30 -m mem") == 0,
"This failure means that something is wrong with the "
"rtcwake tool or how your distro is set up. This is not "
"a i915.ko or i-g-t bug.\n");