[igt-dev] [PATCH i-g-t] tests/kms_content_protection: Skip if not able to create display_hdcp_srm.bin
Mark Yacoub
markyacoub at chromium.org
Tue Jun 8 15:28:50 UTC 2021
On Mon, Jun 7, 2021 at 8:32 PM Khaled Almahallawy
<khaled.almahallawy at intel.com> wrote:
>
> On Chrome devices, SRM subtest fails to create display_hdcp_srm.bin file because
> Chrome OS rootfs is mounted read-only by default
> (https://chromium.googlesource.com/chromiumos/docs/+/HEAD/developer_mode.md#disable-verity).
> The error below is observed in Chrome:
>
> (kms_content_protection:9022) DEBUG: Test requirement passed: data.display.is_atomic
> (kms_content_protection:9022) CRITICAL: Test assertion failure function __real_main720, file ../igt-gpu-tools-1.25/tests/kms_content_protection.c:807:
> (kms_content_protection:9022) CRITICAL: Failed assertion: ret
> (kms_content_protection:9022) CRITICAL: Last errno: 9, Bad file descriptor
> (kms_content_protection:9022) CRITICAL: SRM update failedStack trace:
>
> This patch fixes that by checking if the file descriptor returned from the
> open call is valid and skip if it is not.
>
Tested on TGL (Delbin) and Zork with rootfs verification enabled.
> Tested-by: Mark Yacoub <markyacoub at chromium.org>
> Reported-by: Shawn Lee <shawn.c.lee at intel.com>
> Signed-off-by: Khaled Almahallawy <khaled.almahallawy at intel.com>
> ---
> tests/kms_content_protection.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
> index 1d1a439a98fb..3cd279fe5704 100644
> --- a/tests/kms_content_protection.c
> +++ b/tests/kms_content_protection.c
> @@ -296,6 +296,8 @@ static bool write_srm_as_fw(const __u8 *srm, int len)
>
> fd = open("/lib/firmware/display_hdcp_srm.bin",
> O_WRONLY | O_CREAT, S_IRWXU);
> + igt_require(fd >= 0);
> +
> do {
> ret = write(fd, srm + total, len - total);
> if (ret < 0)
> --
> 2.25.1
>
More information about the igt-dev
mailing list