Skip to content
Snippets Groups Projects
Commit 08fdc87d authored by Mun Gwan-gyeong's avatar Mun Gwan-gyeong Committed by Petri Latvala
Browse files

tests/kms_psr2_su: Print errno while it fails to read debugfs


This tests is being sporadically skipped in CI as it is not due
"PSR sink not reliable: yes". This commit adds printing of debugfs
("tests/kms_psr2_su: Print debugfs when skipping test"), but it is not
enough to track error cases.
It adds printing of errorno while it fails to read debugfs.

Cc: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: default avatarGwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Reviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
parent 4e51438b
No related branches found
No related tags found
No related merge requests found
Pipeline #159882 passed
......@@ -40,9 +40,15 @@ static bool psr_active_check(int debugfs_fd, enum psr_mode mode)
{
char buf[PSR_STATUS_MAX_LEN];
const char *state = mode == PSR_MODE_1 ? "SRDENT" : "DEEP_SLEEP";
int ret;
igt_debugfs_simple_read(debugfs_fd, "i915_edp_psr_status", buf,
sizeof(buf));
ret = igt_debugfs_simple_read(debugfs_fd, "i915_edp_psr_status",
buf, sizeof(buf));
if (ret < 0) {
igt_debug("Could not read i915_edp_psr_status: %s\n",
strerror(-ret));
return false;
}
igt_skip_on(strstr(buf, "PSR sink not reliable: yes"));
......@@ -237,8 +243,11 @@ void psr_print_debugfs(int debugfs_fd)
ret = igt_debugfs_simple_read(debugfs_fd, "i915_edp_psr_status", buf,
sizeof(buf));
if (ret < 0)
if (ret < 0) {
igt_debug("Could not read i915_edp_psr_status: %s\n",
strerror(-ret));
return;
}
igt_debug("%s", buf);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment