From: "Maíra Canal" <mcanal@igalia.com>
To: igt-dev@lists.freedesktop.org
Cc: petri.latvala@intel.com, Emma Anholt <emma@anholt.net>
Subject: [igt-dev] [PATCH i-g-t v3 4/7] tests/v3d: Add igt_describe() to all V3D subtests
Date: Tue, 29 Nov 2022 15:40:35 -0300 [thread overview]
Message-ID: <20221129184038.72946-5-mcanal@igalia.com> (raw)
In-Reply-To: <20221129184038.72946-1-mcanal@igalia.com>
igt_describe() helps improve the documentation of the tests by
explaining the general idea behind the test. So, add test descriptions
to all V3D subtests using igt_describe().
Reviewed-by: Melissa Wen <mwen@igalia.com>
Signed-off-by: Maíra Canal <mcanal@igalia.com>
---
tests/v3d/v3d_get_bo_offset.c | 5 +++++
tests/v3d/v3d_get_param.c | 5 +++++
tests/v3d/v3d_mmap.c | 3 +++
3 files changed, 13 insertions(+)
diff --git a/tests/v3d/v3d_get_bo_offset.c b/tests/v3d/v3d_get_bo_offset.c
index 976a28b8..f0318016 100644
--- a/tests/v3d/v3d_get_bo_offset.c
+++ b/tests/v3d/v3d_get_bo_offset.c
@@ -24,6 +24,8 @@
#include "igt.h"
#include "igt_v3d.h"
+IGT_TEST_DESCRIPTION("Tests for the V3D's get BO offset IOCTL");
+
igt_main
{
int fd;
@@ -31,6 +33,8 @@ igt_main
igt_fixture
fd = drm_open_driver(DRIVER_V3D);
+ igt_describe("Make sure the offset returned by the creation of the BO is "
+ "the same as the offset returned by the IOCTL");
igt_subtest("create-get-offsets") {
struct v3d_bo *bos[2] = {
igt_v3d_create_bo(fd, 4096),
@@ -54,6 +58,7 @@ igt_main
igt_v3d_free_bo(fd, bos[1]);
}
+ igt_describe("Make sure an offset cannot be returned for an invalid BO handle.");
igt_subtest("get-bad-handle") {
struct drm_v3d_get_bo_offset get = {
.handle = 0xd0d0d0d0,
diff --git a/tests/v3d/v3d_get_param.c b/tests/v3d/v3d_get_param.c
index 816a3c7d..0ca330eb 100644
--- a/tests/v3d/v3d_get_param.c
+++ b/tests/v3d/v3d_get_param.c
@@ -24,6 +24,8 @@
#include "igt.h"
#include "igt_v3d.h"
+IGT_TEST_DESCRIPTION("Tests for the V3D's get params IOCTL");
+
igt_main
{
int fd;
@@ -31,6 +33,7 @@ igt_main
igt_fixture
fd = drm_open_driver(DRIVER_V3D);
+ igt_describe("Sanity check for getting existent params.");
igt_subtest("base-params") {
enum drm_v3d_param last_base_param =
DRM_V3D_PARAM_V3D_CORE0_IDENT2;
@@ -48,6 +51,7 @@ igt_main
0x443356 /* "V3D" */);
}
+ igt_describe("Make sure that getting params fails for non-existent params identifiers.");
igt_subtest("get-bad-param") {
struct drm_v3d_get_param get = {
.param = 0xd0d0d0d0,
@@ -55,6 +59,7 @@ igt_main
do_ioctl_err(fd, DRM_IOCTL_V3D_GET_PARAM, &get, EINVAL);
}
+ igt_describe("Make sure that getting params fails for non-zero pad.");
igt_subtest("get-bad-flags") {
struct drm_v3d_get_param get = {
.param = DRM_V3D_PARAM_V3D_HUB_IDENT1,
diff --git a/tests/v3d/v3d_mmap.c b/tests/v3d/v3d_mmap.c
index ad441607..5e2385bd 100644
--- a/tests/v3d/v3d_mmap.c
+++ b/tests/v3d/v3d_mmap.c
@@ -24,6 +24,8 @@
#include "igt.h"
#include "igt_v3d.h"
+IGT_TEST_DESCRIPTION("Tests for the V3D's mmap IOCTL");
+
igt_main
{
int fd;
@@ -31,6 +33,7 @@ igt_main
igt_fixture
fd = drm_open_driver(DRIVER_V3D);
+ igt_describe("Make sure an invalid BO cannot be mapped.");
igt_subtest("mmap-bad-handle") {
struct drm_v3d_mmap_bo get = {
.handle = 0xd0d0d0d0,
--
2.38.1
next prev parent reply other threads:[~2022-11-29 18:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-29 18:40 [igt-dev] [PATCH i-g-t v3 0/7] V3D IGT Tests Updates Maíra Canal
2022-11-29 18:40 ` [igt-dev] [PATCH i-g-t v3 1/7] include/drm-uapi: Update to the latest v3d_drm.h Maíra Canal
2022-11-29 18:40 ` [igt-dev] [PATCH i-g-t v3 2/7] tests/v3d: Move V3D tests to their own folder Maíra Canal
2022-11-29 18:40 ` [igt-dev] [PATCH i-g-t v3 3/7] tests/v3d: Remove unused or redundant includes Maíra Canal
2022-11-29 18:40 ` Maíra Canal [this message]
2022-11-29 18:40 ` [igt-dev] [PATCH i-g-t v3 5/7] lib/igt_v3d: Add PAGE_SIZE macro to V3D Maíra Canal
2022-11-29 18:40 ` [igt-dev] [PATCH i-g-t v3 6/7] tests/v3d_create_bo: Create test for V3D's Create BO IOCTL Maíra Canal
2022-11-29 18:40 ` [igt-dev] [PATCH i-g-t v3 7/7] tests/v3d_perfmon: Create test for V3D's Perfmon IOCTLs Maíra Canal
2022-11-29 20:34 ` [igt-dev] ✓ Fi.CI.BAT: success for V3D IGT Tests Updates (rev3) Patchwork
2022-11-30 3:07 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221129184038.72946-5-mcanal@igalia.com \
--to=mcanal@igalia.com \
--cc=emma@anholt.net \
--cc=igt-dev@lists.freedesktop.org \
--cc=petri.latvala@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox