Re: [PATCH v9 15/17] drm/vkms: Create KUnit tests for YUV conversions

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

 



On 8/2/24 09:10, Louis Chauvet wrote:
From: Arthur Grillo <arthurgrillo@xxxxxxxxxx>

Create KUnit tests to test the conversion between YUV and RGB. Test each
conversion and range combination with some common colors.

The code used to compute the expected result can be found in comment.

[Louis Chauvet:
- fix minor formating issues (whitespace, double line)
- change expected alpha from 0x0000 to 0xffff
- adapt to the new get_conversion_matrix usage
- apply the changes from Arthur
- move struct pixel_yuv_u8 to the test itself]

Signed-off-by: Arthur Grillo <arthurgrillo@xxxxxxxxxx>
Acked-by: Pekka Paalanen <pekka.paalanen@xxxxxxxxxxxxx>
Signed-off-by: Louis Chauvet <louis.chauvet@xxxxxxxxxxx>
---
  drivers/gpu/drm/vkms/Kconfig                  |  15 ++
  drivers/gpu/drm/vkms/Makefile                 |   1 +
  drivers/gpu/drm/vkms/tests/.kunitconfig       |   4 +
  drivers/gpu/drm/vkms/tests/Makefile           |   3 +
  drivers/gpu/drm/vkms/tests/vkms_format_test.c | 230 ++++++++++++++++++++++++++
  drivers/gpu/drm/vkms/vkms_formats.c           |   7 +-
  drivers/gpu/drm/vkms/vkms_formats.h           |   5 +
  7 files changed, 263 insertions(+), 2 deletions(-)
...
diff --git a/drivers/gpu/drm/vkms/tests/vkms_format_test.c b/drivers/gpu/drm/vkms/tests/vkms_format_test.c
new file mode 100644
index 000000000000..c7c556b4fd98
--- /dev/null
+++ b/drivers/gpu/drm/vkms/tests/vkms_format_test.c
@@ -0,0 +1,230 @@
+// SPDX-License-Identifier: GPL-2.0+
+
...
+kunit_test_suite(vkms_format_test_suite);
+
+MODULE_LICENSE("GPL");

Please add a MODULE_DESCRIPTION()

Since commit 1fffe7a34c89 ("script: modpost: emit a warning when the
description is missing"), a module without a MODULE_DESCRIPTION() will
result in a warning when built with make W=1. Recently, multiple developers have been eradicating these warnings treewide, so please don't introduce a new one.

/jeff




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux