Re: [PATCH v4 RESEND 8/9] drm/tests: Add test for drm_framebuffer_init()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 10 Sep 2024, Carlos Eduardo Gallo Filho <gcarlos@xxxxxxxxxxx> wrote:
> +/* Try to init a framebuffer without setting its format */
> +static void drm_test_framebuffer_init_bad_format(struct kunit *test)
> +{
> +	struct drm_framebuffer_test_priv *priv = test->priv;
> +	struct drm_device *dev = &priv->dev;
> +	struct drm_framebuffer fb1 = { .dev = dev, .format = NULL };
> +	struct drm_framebuffer_funcs funcs = { };
> +	int ret;
> +
> +	/* Fails if fb.format isn't set */
> +	ret = drm_framebuffer_init(dev, &fb1, &funcs);

Not only does this fail, it spits a WARN_ON_ONCE() in dmesg. Which in
turn gets flagged as a failure in the test in our CI.

What's the policy with kunit tests causing warnings? I think it's
reasonable for any CI to flag dmesg warnings. We shouldn't be hitting
those. Filtering the warnigs is a tricky business.

BR,
Jani.



> +	KUNIT_EXPECT_EQ(test, ret, -EINVAL);
> +}

-- 
Jani Nikula, Intel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux