From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id AF0C02887F for ; Fri, 30 Aug 2019 17:48:16 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ul8pnpmI0RWI for ; Fri, 30 Aug 2019 17:48:16 -0400 (EDT) Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 5D2BB2887B for ; Fri, 30 Aug 2019 17:48:16 -0400 (EDT) Received: by mail-lj1-f195.google.com with SMTP id j16so1580962ljg.6 for ; Fri, 30 Aug 2019 14:48:16 -0700 (PDT) From: Cyrill Gorcunov Subject: [tarantool-patches] [PATCH v2 0/5] box/console: Improve lua mode for remote console Date: Sat, 31 Aug 2019 00:48:03 +0300 Message-Id: <20190830214808.17422-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tml Cc: Alexander Turenko , Konstantin Osipov , Kirill Yukhin , Cyrill Gorcunov This series address a problem where we can hang a connection setting up lua mode while server continue treating all data as having built-in yaml end of string terminator. We've a long discussion with @alexander.turenko about our test engine and console eos in general and at first concluded that by default we should not use ";" as lua terminator but continue using empty string instead. Actually after thinking more I fear it won't work -- a user might connect to remote console and this connection will hang because server will reply with empty eos while we're using read() from socket with terminator at the end of string. Moreover since our yaml serializer *always* yield eos terminator I think we should do the same for lua mode just to be consistent in architecture. Still for convenience I added ability to zap lua terminator via require('console').eos("") command. Thus users on local consoles can drop ';' eos if they want to. Next to test engine: 1) I think we should convert each test one by one, not the whole bunch of tests in a single pass 2) For this sake we need to send something like "\set output lua" to the server for a particular test 3) We need to describe somehow which mode a test uses. Sasha pointed that he has a string on top of "result" file where we could provide some kind of settings describing output mode. But I think maybe we could introduce .desc files in json format where we could add per-file settings instead (in addition to ini files). Putting test description in "result" file looks a bit inconvenient for me. Guys, what do you think? Regardless of the test engine issues which I have to address I think the series should be merged since it closes real bugs. --- The following changes since commit 51d8e4c35ca1da255b4ebea9850ec2a84365e0a3: box/memtx: strip_core -- Warn on linux only (2019-08-29 22:27:15 +0300) are available in the Git repository at: https://github.com/cyrillos/tarantool.git console-fix-1 for you to fetch changes up to 9236f677fcf1bde39f9eb004693865c40b449abc: box/console: Provide console.eos() api (2019-08-30 23:46:32 +0300) ---------------------------------------------------------------- Cyrill Gorcunov (5): box/console: Add mapping for direct symbols box/console: Add explicit output EOS mapping box/console: Refactor command handling box/console: Fix hang in remote console lua mode box/console: Provide console.eos() api src/box/lua/console.lua | 129 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 116 insertions(+), 13 deletions(-)