[igt-dev] [PATCH i-g-t] tests/i915/gem_basic: Added test description for test case
Katarzyna Dec
katarzyna.dec at intel.com
Thu Nov 12 13:59:09 UTC 2020
On Tue, Sep 01, 2020 at 09:26:14AM +0530, sai.gowtham.ch at intel.com wrote:
> From: sai gowtham <sai.gowtham.ch at intel.com>
>
> Added test description for test and to all the available subtests.
>
> Cc: Melkaveri, Arjun <Arjun.Melkaveri at intel.com>
> Signed-off-by: sai gowtham <sai.gowtham.ch at intel.com>
> ---
> tests/i915/gem_basic.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/tests/i915/gem_basic.c b/tests/i915/gem_basic.c
> index 9f7412f2..2f76ee26 100644
> --- a/tests/i915/gem_basic.c
> +++ b/tests/i915/gem_basic.c
> @@ -37,14 +37,13 @@
> #include <sys/ioctl.h>
> #include "drm.h"
>
> +IGT_TEST_DESCRIPTION("Tests basic gem_create and gem_close IOCTLs");
Let's have one empty line before function - decription is for whole test binary.
> static void
> test_bad_close(int fd)
> {
> struct drm_gem_close close_bo;
> int ret;
>
> - igt_info("Testing error return on bad close ioctl.\n");
I would leave igt_info here - it is giving info during running test.
> -
> close_bo.handle = 0x10101010;
> ret = ioctl(fd, DRM_IOCTL_GEM_CLOSE, &close_bo);
>
> @@ -56,8 +55,6 @@ test_create_close(int fd)
> {
> uint32_t handle;
>
> - igt_info("Testing creating and closing an object.\n");
> -
> handle = gem_create(fd, 16*1024);
>
> gem_close(fd, handle);
> @@ -66,7 +63,6 @@ test_create_close(int fd)
> static void
> test_create_fd_close(int fd)
> {
> - igt_info("Testing closing with an object allocated.\n");
>
> gem_create(fd, 16*1024);
> /* leak it */
> @@ -81,10 +77,13 @@ igt_main
> igt_fixture
> fd = drm_open_driver(DRIVER_INTEL);
>
> + igt_describe("Testing error return on bad close ioctl.\n");
In my opinon coping igt_info as igt_description is not helping here.
THis subtest is more about:
igt_describe("Check error on DRM_IOCTL_GEM_CLOSE, category=Gem, category=SW_only");
> igt_subtest("bad-close")
> test_bad_close(fd);
Let's divide subtests with empty line for better readability.
> + igt_describe("Testing creating and closing an object.\n");
Change descriptions in 2 other functions similarly.
Kasia :)
> igt_subtest("create-close")
> test_create_close(fd);
> + igt_describe("Testing closing with an object allocated.\n");
> igt_subtest("create-fd-close")
> test_create_fd_close(fd);
> }
> --
> 2.25.0
>
> _______________________________________________
> igt-dev mailing list
> igt-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
More information about the igt-dev
mailing list