Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergey Kaplun via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Sergey Bronnikov <sergeyb@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v2 luajit 2/6] test: introduce module for C tests
Date: Mon, 29 May 2023 13:03:14 +0300	[thread overview]
Message-ID: <ZHR4YsW8SUAOVK1x@root> (raw)
In-Reply-To: <1be152d0-9c74-0751-2473-2211ed32d625@tarantool.org>

Hi, Sergey!
Thanks for the review!

Fixed your comments and force-pushed the branch.

On 25.05.23, Sergey Bronnikov wrote:
> Hi, Sergey! Thanks for fixes, see comments below.
> 
> On 5/24/23 09:41, Sergey Kaplun wrote:
> > Hi, Sergey!
> > Thanks for the review!
> >
> > Fixed some of your comments, branch is force-pushed.
> >
> <snipped>
> > The <test.c> module serves to achieve these goals without too fancy
> > features.
> >
> > It's functionality inspired by cmoka API [1], but only TAP14 [2]
> >> typo: cmocka
> > Fixed, thanks!
> 
> 
> Nit: probably it is better "CMocka", because it is a proper name ("имя 
> собственное") and should be with capital letters.
> 
> Feel free to ignore.

Fixed! Thanks!

> 
> >
> >>> protocol is supported (Version of TAP set to 13 to be compatible with
> >>> old TAP13 harnesses).
> >> Please add tests for TAP13/TAP14 conformance testing.
> >>
> >> It would be unpleasant if proposed library will produce TAP-incompatible
> >> output and it will break parsing in 'prove'.
> >>
> >> At least single test for passed testcase "ok", single testcase for
> >> failed "not ok" testcase, one testcase for every directive.
> > I've added the tests for ok|skip|todo. "not ok" is skipped, because it
> > rather tricky to test it behaviour via prove without test failure.
> >
> > The content of <test/tarantool-c-tests/unit-tap.test.c> is the
> > following:
> > ===================================================================

<snipped>

> > ===================================================================
> 
> This test checks that macroses/functions in test.h could be called and 
> nothing more.
> 
> We need checking TAP output that binary will emit for different test 
> statuses, plan, testcase counters ("1..10").

As discussed offline: its not the main goal of this suite introducing,
also, TAP13 protocol is tested by `prove` itself, and fully compatible
with TAP14 protocol. Also, added the following check of parsing to be
sure in the emmited format correctness.

===================================================================
diff --git a/test/tarantool-c-tests/CMakeLists.txt b/test/tarantool-c-tests/CMakeLists.txt
index bf98856f..1aade851 100644
--- a/test/tarantool-c-tests/CMakeLists.txt
+++ b/test/tarantool-c-tests/CMakeLists.txt
@@ -36,6 +36,9 @@ add_custom_command(TARGET tarantool-c-tests
     ${CMAKE_CURRENT_BINARY_DIR}
     --ext ${C_TEST_SUFFIX}
     --jobs ${CMAKE_BUILD_PARALLEL_LEVEL}
+    # Reportt any TAP parse errors, if any, since test module is
+    # maintained by us.
+    --parse
     ${C_TEST_FLAGS}
   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
===================================================================

Also, mentioned this in the commit message:

| The library itself is tested via some primitive tests for `ok` case,
| `skip` and `todo` directives. The TAP13 format is tested via prove, that
| we are using for running our tests. TAP14 format is compatible with
| TAP13, so there are no other tests required.


<snipped>

-- 
Best regards,
Sergey Kaplun

  reply	other threads:[~2023-05-29 10:07 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-18 20:44 [Tarantool-patches] [PATCH v2 luajit 0/6] Revorking " Sergey Kaplun via Tarantool-patches
2023-05-18 20:44 ` [Tarantool-patches] [PATCH v2 luajit 1/6] test: fix setting of {DY}LD_LIBRARY_PATH variables Sergey Kaplun via Tarantool-patches
2023-05-19 11:23   ` Maxim Kokryashkin via Tarantool-patches
2023-05-22 11:03   ` Sergey Bronnikov via Tarantool-patches
2023-05-23  6:47     ` Sergey Kaplun via Tarantool-patches
2023-05-29 14:37       ` Sergey Bronnikov via Tarantool-patches
2023-05-18 20:44 ` [Tarantool-patches] [PATCH v2 luajit 2/6] test: introduce module for C tests Sergey Kaplun via Tarantool-patches
2023-05-19 11:46   ` Maxim Kokryashkin via Tarantool-patches
2023-05-22 12:33   ` Sergey Bronnikov via Tarantool-patches
2023-05-24  6:41     ` Sergey Kaplun via Tarantool-patches
2023-05-25 17:33       ` Sergey Bronnikov via Tarantool-patches
2023-05-29 10:03         ` Sergey Kaplun via Tarantool-patches [this message]
2023-05-29 14:38           ` Sergey Bronnikov via Tarantool-patches
2023-05-31 13:32             ` Sergey Kaplun via Tarantool-patches
2023-05-18 20:44 ` [Tarantool-patches] [PATCH v2 luajit 3/6] test: introduce utils.h helper " Sergey Kaplun via Tarantool-patches
2023-05-19 11:58   ` Maxim Kokryashkin via Tarantool-patches
2023-05-20  7:52     ` Sergey Kaplun via Tarantool-patches
2023-05-29 15:26   ` Sergey Bronnikov via Tarantool-patches
2023-05-18 20:44 ` [Tarantool-patches] [PATCH v2 luajit 4/6] test: rewrite misclib-getmetrics-capi test in C Sergey Kaplun via Tarantool-patches
2023-05-19 12:17   ` Maxim Kokryashkin via Tarantool-patches
2023-05-20  8:08     ` Sergey Kaplun via Tarantool-patches
2023-05-29 16:15   ` Sergey Bronnikov via Tarantool-patches
2023-05-18 20:44 ` [Tarantool-patches] [PATCH v2 luajit 5/6] test: rewrite misclib-sysprof-capi " Sergey Kaplun via Tarantool-patches
2023-05-19 13:00   ` Maxim Kokryashkin via Tarantool-patches
2023-05-20  7:28     ` Sergey Kaplun via Tarantool-patches
2023-05-18 20:44 ` [Tarantool-patches] [PATCH v2 luajit 6/6] test: rewrite lj-49-bad-lightuserdata " Sergey Kaplun via Tarantool-patches
2023-05-19 12:40   ` Maxim Kokryashkin via Tarantool-patches
2023-05-19 14:29 ` [Tarantool-patches] [PATCH v2 luajit 0/6] Revorking C tests Maxim Kokryashkin via Tarantool-patches
2023-05-20  8:38   ` Sergey Kaplun via Tarantool-patches

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=ZHR4YsW8SUAOVK1x@root \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=sergeyb@tarantool.org \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v2 luajit 2/6] test: introduce module for C tests' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox