From: sai.gowtham.ch@intel.com
To: arjun.melkaveri@intel.com, sai.gowtham.ch@intel.com,
igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] i915/gem_readwrite: Added test description for test case
Date: Tue, 28 Jul 2020 10:33:35 +0530 [thread overview]
Message-ID: <20200728050335.32757-1-sai.gowtham.ch@intel.com> (raw)
From: sai gowtham <sai.gowtham.ch@intel.com>
Added test description for test and to all the available subtests.
Signed-off-by: sai gowtham <sai.gowtham.ch@intel.com>
---
tests/i915/gem_readwrite.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/tests/i915/gem_readwrite.c b/tests/i915/gem_readwrite.c
index 6b2977c1..7fce6abe 100644
--- a/tests/i915/gem_readwrite.c
+++ b/tests/i915/gem_readwrite.c
@@ -37,6 +37,9 @@
#include <sys/ioctl.h>
#include "drm.h"
+IGT_TEST_DESCRIPTION("Tests PREAD and PWRITE IOCTL. They contain normal usage scenarios,"
+ " and few negative usecases to test these ioctls.");
+
#define OBJECT_SIZE 16384
static int
@@ -87,20 +90,21 @@ igt_main
handle = gem_create(fd, OBJECT_SIZE);
}
+ igt_describe("Testing contents of newly created object.\n");
igt_subtest("new-obj") {
- igt_info("Testing contents of newly created object.\n");
ret = do_read(fd, handle, buf, 0, OBJECT_SIZE);
igt_assert(ret == 0);
memset(&expected, 0, sizeof(expected));
igt_assert(memcmp(expected, buf, sizeof(expected)) == 0);
}
+ igt_describe("Testing read beyond end of buffer.\n");
igt_subtest("beyond-EOB") {
- igt_info("Testing read beyond end of buffer.\n");
ret = do_read(fd, handle, buf, OBJECT_SIZE / 2, OBJECT_SIZE);
igt_assert(ret == -1 && errno == EINVAL);
}
+ igt_describe("Testing read & write operations of a buffer");
igt_subtest("read-write") {
igt_info("Testing full write of buffer\n");
memset(buf, 0, sizeof(buf));
@@ -127,14 +131,14 @@ igt_main
igt_assert(memcmp(buf, expected + 512, 1024) == 0);
}
+ igt_describe("Testing read of bad buffer handle\n");
igt_subtest("read-bad-handle") {
- igt_info("Testing read of bad buffer handle\n");
ret = do_read(fd, 1234, buf, 0, 1024);
igt_assert(ret == -1 && errno == ENOENT);
}
+ igt_describe("Testing write of bad buffer handle\n");
igt_subtest("write-bad-handle") {
- igt_info("Testing write of bad buffer handle\n");
ret = do_write(fd, 1234, buf, 0, 1024);
igt_assert(ret == -1 && errno == ENOENT);
}
--
2.25.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next reply other threads:[~2020-07-28 5:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-28 5:03 sai.gowtham.ch [this message]
2020-07-28 7:51 ` [igt-dev] ✓ Fi.CI.BAT: success for i915/gem_readwrite: Added test description for test case Patchwork
2020-07-28 10:31 ` [igt-dev] ✗ Fi.CI.IGT: failure " 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=20200728050335.32757-1-sai.gowtham.ch@intel.com \
--to=sai.gowtham.ch@intel.com \
--cc=arjun.melkaveri@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/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