On Tue, 10 Sep 2024, Carlos Eduardo Gallo Filho <gcar...@disroot.org> 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

Reply via email to