From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 1E0686EC56; Tue, 16 Mar 2021 16:52:21 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 1E0686EC56 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1615902741; bh=PHgykVJ2UZM77EfL48AV5KjlWRQEXpwQoKBTqrA6zkk=; h=Date:In-Reply-To:To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=nMuVkvrOdM3GlaiIohMcnTsH+P/3N1quoXUn2o2e1FyHqyY9W/VkWinXlZgNzI4cJ 9oBfjM5l0sNPDAIAcQtmAkUQu0vQznwlveYI43umAGUtAvTFtt3vnUJnHsbJihVxrj zbeuw7546ztlYqfOLqP/uZ+tb8z7TBGO21yTy5+k= Received: from smtp3.mail.ru (smtp3.mail.ru [94.100.179.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 123A46EC56 for ; Tue, 16 Mar 2021 16:52:20 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 123A46EC56 Received: by smtp3.mail.ru with esmtpa (envelope-from ) id 1lMA7P-0005Dk-5z; Tue, 16 Mar 2021 16:52:19 +0300 Message-Id: <545E6B8A-6451-4E5C-8E53-D59781CA9D13@tarantool.org> Content-Type: multipart/alternative; boundary="Apple-Mail=_03EDD7A0-7AA7-4103-9989-BAFA2FAF7813" Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Date: Tue, 16 Mar 2021 16:50:20 +0300 In-Reply-To: <20210316120233.GB1155@root> To: Sergey Kaplun References: <20210315173730.GE9042@tarantool.org> <20210315181028.GB16737@root> <20210315210619.GI9042@tarantool.org> <20210316093821.GA1155@root> <20210316110837.GL9042@tarantool.org> <20210316120233.GB1155@root> X-Mailer: Apple Mail (2.3654.60.0.2.21) X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD96485A7A9FC131893DA79D6515A0F039B4831FD7FB0219397182A05F53808504046568F94CED64A71FB2E471BB19EA9BFE9C5D4FEDCD73DDCAC0B2832D38B0EA1 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE79FF7180C05A1FF7CEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637FD169B9D7A3022168638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95CF89CA98302ED496FF302908F8D493317EB7BD88022520207A471835C12D1D9774AD6D5ED66289B5278DA827A17800CE767883B903EA3BAEA9FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C3CF36E64A7E3F8E58117882F4460429728AD0CFFFB425014E868A13BD56FB6657A7F4EDE966BC389F9E8FC8737B5C224982BBBAF5DF00056E089D37D7C0E48F6CCF19DD082D7633A0E7DDDDC251EA7DABAAAE862A0553A39223F8577A6DFFEA7CE52E467C461EF0E943847C11F186F3C5E7DDDDC251EA7DABCC89B49CDF41148FDCD13837A2BCF0203C9F3DD0FB1AF5EB4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A54592E0564D6F81C4314A2B0673E1BEF7D202AAEB18CEDF2ED59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75F04B387B5D7535DE410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D340EEB18E4918315717659AFD0E68C11BE434591A2462B5CBF6B60843646585C276189F61D9AD608D91D7E09C32AA3244C98D80F500D4A9C49C66BB33A4AE60BCD8580396430872480FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojwV/GgY7Z4vWWwGhmQ7ULeA== X-Mailru-Sender: 3B9A0136629DC912F4AABCEFC589C81E85C36BB51A318E1F49FACC5AD17D77D1A28ACF1BD233CA82AD07DD1419AC565FA614486B47F28B67C5E079CCF3B0523AED31B7EB2E253A9E112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 luajit 1/5] test: add lua-Harness test suite X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Ostanevich via Tarantool-patches Reply-To: Sergey Ostanevich Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" --Apple-Mail=_03EDD7A0-7AA7-4103-9989-BAFA2FAF7813 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi! Thanks for the patch! LGTM. Sergos > On 16 Mar 2021, at 15:02, Sergey Kaplun wrote: >=20 > Igor, >=20 > Thanks for the feedback! >=20 > On 16.03.21, Igor Munkin wrote: >> Sergey, >>=20 >> Thanks for the fixes! >>=20 >> On 16.03.21, Sergey Kaplun wrote: >>> Igor, >>>=20 >>> On 16.03.21, Igor Munkin wrote: >>>> Sergey, >>>>=20 >>=20 >> >>=20 >>>>=20 >>>>>>> diff --git a/test/lua-Harness-tests/CMakeLists.txt = b/test/lua-Harness-tests/CMakeLists.txt >>>>>>> new file mode 100644 >>>>>>> index 0000000..9b35e5a >>>>>>> --- /dev/null >>>>>>> +++ b/test/lua-Harness-tests/CMakeLists.txt >>>>>>> @@ -0,0 +1,49 @@ >>>>>>> +# Test suite that has been added from lua-Harness test suite >>>>>>> +# in scope of = https://github.com/tarantool/tarantool/issues/4473. >>>>>>> + >>>>>>> +# See the rationale in the root CMakeLists.txt >>>>>>> +cmake_minimum_required(VERSION 3.1 FATAL_ERROR) >>>>>>> + >>>>>>> +find_program(PROVE prove) >>>>>>> +if(NOT PROVE) >>>>>>> + message(WARNING "`prove' is not found, so lua-Harness-tests = target is not generated") >>>>>>> + return() >>>>>>> +endif() >>>>>>> + >>>>>>> +set(LUA_TEST_FLAGS --failures --shuffle) >>>>>>=20 >>>>>> Why did you drop TEST_DEPS variable containing the dependencies? >>>>>=20 >>>>> Sorry, don't get it. What do you mean? >>>>=20 >>>> If you look onto my iterative patch in the first review iteration, >>>> you'll find TEST_DEPS variable similar to the one in = tarantool-tests >>>> CMakeLists.txt. I forgot to add it into CMakeLists.txt for = LuaJIT-tests >>>> and remembered about it in this patch. >>>=20 >>> Sorry, I missed it while looks through your patch -- I supposed that >>> it does two things: >>> * removes tap renaming >>> * removes list of test usage, as far as 5040 is resolved >>=20 >> Yeah, that's my fault. >>=20 >>>=20 >>> For now I don't understand, why do we need this TEST_DEPS? >>> What is its mission? >>=20 >> To control the target dependencies: the binary and test chunks. = However, >> it was required when *-tests targets were not .PHONY, and now it's = more >> for self-check that nothing global is broken. >=20 > OK, looks like we came to agreement offline so I just repeate this = here: >=20 > * All test chunks are `.PHONY`, so all tests will rerun always, > even without test sources changing. That's why we need only build > dependencies here. > * We are planing to make all test suites more consistent, > so TEST_DEPS will be removed from Tarantool's suite too later. >=20 >>=20 >>>=20 >>>>=20 >>>>>=20 >>>>>>=20 >>>>>>> +if(CMAKE_VERBOSE_MAKEFILE) >>>>>>> + list(APPEND LUA_TEST_FLAGS --verbose) >>>>>>> +endif() >>>>>>> + >>>>>>> +string(CONCAT LUA_PATH >>>>>>> + "./?.lua\;" >>>>>>> + "${CMAKE_CURRENT_SOURCE_DIR}/?.lua\;" >>>>>>> + "${LUAJIT_SOURCE_DIR}/?.lua\;" >>>>>>> +) >>>>>>=20 >>>>>> There is not a word regarding such complex LUA_PATH = configuration. >>>>>=20 >>>>> Ok, it can be the one long string, but, in my opinion, this format = is >>>>> more readable, plus, as a bonus, with it line length is less than = 120 >>>>> characters. I'll join these lines into one if you insist. >>>>=20 >>>> This is not the issue (and might be much better that my approach in >>>> tarantool-tests and I will patch the test runners to make it = conform to >>>> one style later). I'm talking about the purpose for each entry. = E.g. why >>>> do you need both "./?.lua" and "${CMAKE_CURRENT_SOURCE_DIR}/?.lua"? = If >>>> you need "${LUAJIT_SOURCE_DIR}/?.lua" for jit.* modules, then why = it's >>>> not required for other suites? Mention this explicitly, please. >>>=20 >>> Got it now, thanks! >>> Looks like it really is not necessary. See the iterative patch = below: >>> Checked result in CI -- it is green, except known freebsd issue. >>>=20 >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> diff --git a/test/lua-Harness-tests/CMakeLists.txt = b/test/lua-Harness-tests/CMakeLists.txt >>> index b844788..fd5c8ce 100644 >>> --- a/test/lua-Harness-tests/CMakeLists.txt >>> +++ b/test/lua-Harness-tests/CMakeLists.txt >>> @@ -15,16 +15,7 @@ if(CMAKE_VERBOSE_MAKEFILE) >>> list(APPEND LUA_TEST_FLAGS --verbose) >>> endif() >>>=20 >>> -string(CONCAT LUA_PATH >>> - "./?.lua\;" >>> - "${CMAKE_CURRENT_SOURCE_DIR}/?.lua\;" >>> - "${LUAJIT_SOURCE_DIR}/?.lua\;" >>> -) >>> - >>> -string(CONCAT LUA_CPATH >>> - "./?${CMAKE_SHARED_LIBRARY_SUFFIX}\;" >>> - "${LUAJIT_SOURCE_DIR}/?${CMAKE_SHARED_LIBRARY_SUFFIX}\;" >>> -) >>> +set(LUA_PATH "./?.lua\;${CMAKE_CURRENT_SOURCE_DIR}/?.lua\;") >>=20 >> Still not a word, why do you need both "./?.lua" and >> "${CMAKE_CURRENT_SOURCE_DIR}/?.lua". >=20 > Sorry, add corresponding comment: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > diff --git a/test/lua-Harness-tests/CMakeLists.txt = b/test/lua-Harness-tests/CMakeLists.txt > index a639553..336dc03 100644 > --- a/test/lua-Harness-tests/CMakeLists.txt > +++ b/test/lua-Harness-tests/CMakeLists.txt > @@ -15,6 +15,9 @@ if(CMAKE_VERBOSE_MAKEFILE) > list(APPEND LUA_TEST_FLAGS --verbose) > endif() >=20 > +# Tests create temporary files (see 303-package.t for example) > +# to require. Also, they require some files from original > +# test source directory. > set(LUA_PATH "./?.lua\;${CMAKE_CURRENT_SOURCE_DIR}/?.lua\;") >=20 > add_custom_target(lua-Harness-tests DEPENDS ${LUAJIT_TEST_BINARY}) > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 >>=20 >>>=20 >>> add_custom_target(lua-Harness-tests DEPENDS ${LUAJIT_TEST_BINARY}) >>>=20 >>> @@ -33,7 +24,6 @@ add_custom_command(TARGET lua-Harness-tests >>> COMMAND >>> env >>> LUA_PATH=3D"${LUA_PATH}\;" >>> - LUA_CPATH=3D"${LUA_CPATH}\;" >>> # XXX: 309-os.t checks os.getenv() function by examining of >>> # USERNAME or LOGNAME environment variable. >>> # These variables might not be set in the environment, so >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>=20 >>=20 >> >>=20 >>>=20 >>> --=20 >>> Best regards, >>> Sergey Kaplun >>=20 >> --=20 >> Best regards, >> IM >=20 > --=20 > Best regards, > Sergey Kaplun --Apple-Mail=_03EDD7A0-7AA7-4103-9989-BAFA2FAF7813 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Hi!

Thanks = for the patch!

LGTM.

Sergos

On 16 Mar 2021, at 15:02, = Sergey Kaplun <skaplun@tarantool.org> wrote:

Igor,

Thanks for the feedback!

On 16.03.21, Igor Munkin wrote:
Sergey,

Thanks for the fixes!

On = 16.03.21, Sergey Kaplun wrote:
Igor,

On 16.03.21, Igor Munkin = wrote:
Sergey,


<snipped>


diff --git = a/test/lua-Harness-tests/CMakeLists.txt = b/test/lua-Harness-tests/CMakeLists.txt
new file mode = 100644
index 0000000..9b35e5a
--- = /dev/null
+++ b/test/lua-Harness-tests/CMakeLists.txt
@@ -0,0 +1,49 @@
+# Test suite that has been = added from lua-Harness test suite
+# in scope of https://github.com/tarantool/tarantool/issues/4473.
+
+# See the rationale in the root = CMakeLists.txt
+cmake_minimum_required(VERSION 3.1 = FATAL_ERROR)
+
+find_program(PROVE prove)
+if(NOT PROVE)
+  message(WARNING "`prove' = is not found, so lua-Harness-tests target is not generated")
+  return()
+endif()
+
+set(LUA_TEST_FLAGS --failures --shuffle)

Why did you drop TEST_DEPS = variable containing the dependencies?

Sorry, don't get it. What do you mean?

If you look onto my iterative = patch in the first review iteration,
you'll find TEST_DEPS = variable similar to the one in tarantool-tests
CMakeLists.txt. I forgot to add it into CMakeLists.txt for = LuaJIT-tests
and remembered about it in this patch.

Sorry, I missed it while looks = through your patch -- I supposed that
it does two = things:
* removes tap renaming
* removes = list of test usage, as far as 5040 is resolved

Yeah, that's my fault.


For now I don't understand, why do we need this TEST_DEPS?
What is its mission?

To control the target dependencies: the binary and test = chunks. However,
it was required when *-tests targets were = not .PHONY, and now it's more
for self-check that nothing = global is broken.

OK, looks like we came to agreement offline so I just repeate = this here:

* All test = chunks are `.PHONY`, so all tests will rerun always,
 even = without test sources changing. That's why we need only build
 dependencies here.
* We are planing to make all test suites more = consistent,
 so = TEST_DEPS will be removed from Tarantool's suite too later.






+if(CMAKE_VERBOSE_MAKEFILE)
+  list(APPEND = LUA_TEST_FLAGS --verbose)
+endif()
+
+string(CONCAT LUA_PATH
+  "./?.lua\;"
+  "${CMAKE_CURRENT_SOURCE_DIR}/?.lua\;"
+ =  "${LUAJIT_SOURCE_DIR}/?.lua\;"
+)

There is not a word regarding = such complex LUA_PATH configuration.

Ok, it can be the one long string, but, in my opinion, this = format is
more readable, plus, as a bonus, with it line = length is less than 120
characters. I'll join these lines = into one if you insist.

This = is not the issue (and might be much better that my approach in
tarantool-tests and I will patch the test runners to make it = conform to
one style later). I'm talking about the purpose = for each entry. E.g. why
do you need both "./?.lua" and = "${CMAKE_CURRENT_SOURCE_DIR}/?.lua"?  If
you need = "${LUAJIT_SOURCE_DIR}/?.lua" for jit.* modules, then why it's
not required for other suites? Mention this explicitly, = please.

Got it now, thanks!
Looks like it really is not necessary. See the iterative = patch below:
Checked result in CI -- it is green, except = known freebsd issue.

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
diff --git a/test/lua-Harness-tests/CMakeLists.txt = b/test/lua-Harness-tests/CMakeLists.txt
index = b844788..fd5c8ce 100644
--- = a/test/lua-Harness-tests/CMakeLists.txt
+++ = b/test/lua-Harness-tests/CMakeLists.txt
@@ -15,16 +15,7 @@ = if(CMAKE_VERBOSE_MAKEFILE)
  list(APPEND = LUA_TEST_FLAGS --verbose)
endif()

-string(CONCAT LUA_PATH
-  "./?.lua\;"
-  "${CMAKE_CURRENT_SOURCE_DIR}/?.lua\;"
- =  "${LUAJIT_SOURCE_DIR}/?.lua\;"
-)
-
-string(CONCAT LUA_CPATH
- =  "./?${CMAKE_SHARED_LIBRARY_SUFFIX}\;"
- =  "${LUAJIT_SOURCE_DIR}/?${CMAKE_SHARED_LIBRARY_SUFFIX}\;"
-)
+set(LUA_PATH = "./?.lua\;${CMAKE_CURRENT_SOURCE_DIR}/?.lua\;")

Still not a word, why do you need = both "./?.lua" and
"${CMAKE_CURRENT_SOURCE_DIR}/?.lua".

Sorry, add corresponding comment:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
diff --git = a/test/lua-Harness-tests/CMakeLists.txt = b/test/lua-Harness-tests/CMakeLists.txt
index a639553..336dc03 100644
--- a/test/lua-Harness-tests/CMakeLists.txt
+++ = b/test/lua-Harness-tests/CMakeLists.txt
@@ -15,6 +15,9 @@ if(CMAKE_VERBOSE_MAKEFILE)
  list(APPEND LUA_TEST_FLAGS --verbose)
endif()

+# Tests create temporary files (see 303-package.t for = example)
+# to = require. Also, they require some files from original
+# test = source directory.
set(LUA_PATH = "./?.lua\;${CMAKE_CURRENT_SOURCE_DIR}/?.lua\;")

add_custom_target(lua-Harness-tests DEPENDS = ${LUAJIT_TEST_BINARY})
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D



add_custom_target(lua-Harness-tests DEPENDS = ${LUAJIT_TEST_BINARY})

@@ -33,7 +24,6 @@ = add_custom_command(TARGET lua-Harness-tests
  COMMAND
  env
    LUA_PATH=3D"${LUA_PATH}\;"
-    LUA_CPATH=3D"${LUA_CPATH}\;"
    # XXX: 309-os.t checks os.getenv() = function by examining of
    # = USERNAME or LOGNAME environment variable.
    # These variables might not be set in = the environment, so
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D


<snipped>


-- 
Best regards,
Sergey Kaplun

-- 
Best = regards,
IM

-- 
Best = regards,
Sergey = Kaplun

= --Apple-Mail=_03EDD7A0-7AA7-4103-9989-BAFA2FAF7813--