Summary: | [Bisected]igt/pc8 fails | ||||||
---|---|---|---|---|---|---|---|
Product: | DRI | Reporter: | lu hua <huax.lu> | ||||
Component: | DRM/Intel | Assignee: | Paulo Zanoni <przanoni> | ||||
Status: | CLOSED FIXED | QA Contact: | Intel GFX Bugs mailing list <intel-gfx-bugs> | ||||
Severity: | major | ||||||
Priority: | high | CC: | intel-gfx-bugs, przanoni | ||||
Version: | unspecified | ||||||
Hardware: | All | ||||||
OS: | Linux (All) | ||||||
Whiteboard: | |||||||
i915 platform: | i915 features: | ||||||
Attachments: |
|
Description
lu hua
2013-11-15 06:18:11 UTC
When you get an error like this, please analyze the error message and try to discover why it happened. In our case, the error message is: "Can't open /sys/devices/pci0000:00/0000:00:02.0/power/autosuspend_delay_ms" - Do you have that file on your system? - Did you check its permissions? - Did you run the PC8 test as root? Thanks, Paulo
> - Do you have that file on your system?
file: /sys/devices/pci0000:00/0000:00:02.0/power/autosuspend_delay_ms doesn't exists.
diff --git a/tests/pm_pc8.c b/tests/pm_pc8.c index efeae21..15127d4 100644 --- a/tests/pm_pc8.c +++ b/tests/pm_pc8.c @@ -602,15 +602,14 @@ static void setup_runtime_pm(void) * suite goes faster and we have a higher probability of triggering race * conditions. */ fd = open(POWER_DIR "/autosuspend_delay_ms", O_WRONLY); - igt_assert_f(fd >= 0, - "Can't open " POWER_DIR "/autosuspend_delay_ms\n"); + if (fd != -1) { + /* If we fail to write to the file, it means this system doesn't support + * runtime PM. */ + size = write(fd, "0\n", 2); + has_runtime_pm = (size == 2); - /* If we fail to write to the file, it means this system doesn't support - * runtime PM. */ - size = write(fd, "0\n", 2); - has_runtime_pm = (size == 2); - - close(fd); + close(fd); + } if (!has_runtime_pm) return; should make it correctly skip the test (In reply to comment #3) > diff --git a/tests/pm_pc8.c b/tests/pm_pc8.c > index efeae21..15127d4 100644 > --- a/tests/pm_pc8.c > +++ b/tests/pm_pc8.c > @@ -602,15 +602,14 @@ static void setup_runtime_pm(void) > * suite goes faster and we have a higher probability of triggering > race > * conditions. */ > fd = open(POWER_DIR "/autosuspend_delay_ms", O_WRONLY); > - igt_assert_f(fd >= 0, > - "Can't open " POWER_DIR "/autosuspend_delay_ms\n"); > + if (fd != -1) { > + /* If we fail to write to the file, it means this system > doesn't support > + * runtime PM. */ > + size = write(fd, "0\n", 2); > + has_runtime_pm = (size == 2); > > - /* If we fail to write to the file, it means this system doesn't > support > - * runtime PM. */ > - size = write(fd, "0\n", 2); > - has_runtime_pm = (size == 2); > - > - close(fd); > + close(fd); > + } > > if (!has_runtime_pm) > return; > > should make it correctly skip the test Fixed by this patch. Imo the real bug here is that QA's kernel build doesn't have runtime pm enabled. If we just skip paulo's nice runtime pm tests that's not good. (In reply to comment #5) > Imo the real bug here is that QA's kernel build doesn't have runtime pm > enabled. If we just skip paulo's nice runtime pm tests that's not good. Yeah, that's my guess too. Even my SNB machine has that file, so I got surprised by QA's report. Still, our test should work on cases where there's just PC8 support without runtime D3 (i.e., current drm-intel-nightly), so just forcing igt_assert on everything is not a good idea. (In reply to comment #6) > (In reply to comment #5) > > Imo the real bug here is that QA's kernel build doesn't have runtime pm > > enabled. If we just skip paulo's nice runtime pm tests that's not good. > > Yeah, that's my guess too. Even my SNB machine has that file, so I got > surprised by QA's report. > > Still, our test should work on cases where there's just PC8 support without > runtime D3 (i.e., current drm-intel-nightly), so just forcing igt_assert on > everything is not a good idea. Our current options: 1 - Do *not* patch pm_pc8.c, so we'll still fail the test. This way we can make sure QA's Kernels will always have runtime PM enabled. Maybe we could change the commit message and say "please check if your Kernel has runtime PM support". Then we'd close the bug once QA has correctly configured their machines. 2 - Apply Chris's patch and SKIP the test in case the machine does not have runtime PM support on the Kernel. This will benefit people who only have PC8 support and don't want to bother with runtime PM support. I'd vote for option 1, especially since in the future PC8 and RPM will be a single feature, so we'll always require the autosuspend_delay_ms file to exist. enable the Kernel Runtime PM support(CONFIG_PM_RUNTIME=y) It still fails. file: /sys/devices/pci0000:00/0000:00:02.0/power/autosuspend_delay_ms doesn't exists. (In reply to comment #8) > enable the Kernel Runtime PM support(CONFIG_PM_RUNTIME=y) > It still fails. > file: /sys/devices/pci0000:00/0000:00:02.0/power/autosuspend_delay_ms > doesn't exists. Sorry, enable the kernel runtime PM support, It works well. Close it. Verified.Fixed. Closing old verified. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.