summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/kms_psr_sink_crc.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/kms_psr_sink_crc.c b/tests/kms_psr_sink_crc.c
index 35c7b845..af63e689 100644
--- a/tests/kms_psr_sink_crc.c
+++ b/tests/kms_psr_sink_crc.c
@@ -230,14 +230,13 @@ static void get_sink_crc(data_t *data, char *crc)
if (igt_interactive_debug)
return;
- igt_require_f(igt_sysfs_scanf(data->debugfs_fd, "i915_sink_crc_eDP1",
- "%s\n", crc),
+ igt_require_f(igt_sysfs_read(data->debugfs_fd, "i915_sink_crc_eDP1",
+ crc, CRC_LEN) == CRC_LEN,
"Sink CRC is unreliable on this machine. Try manual debug with --interactive-debug=no-crc\n");
-
- igt_debug("%s\n", crc);
+ igt_debug("sink CRC: %.*s\n", CRC_LEN, crc);
/* Black screen is always invalid */
- igt_assert(strncmp(crc, CRC_BLACK, CRC_LEN) != 0);
+ igt_assert(strncmp(crc, CRC_BLACK, CRC_LEN));
}
static bool is_green(char *crc)