Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: tml <tarantool-patches@freelists.org>
Subject: Re: [PATCH] test: app/fio -- Fixup modes for open
Date: Mon, 6 May 2019 15:03:21 +0300	[thread overview]
Message-ID: <20190506120321.yxpezfjcmvsuy6uy@esperanza> (raw)
In-Reply-To: <20190506102221.3198-1-gorcunov@gmail.com>

On Mon, May 06, 2019 at 01:22:21PM +0300, Cyrill Gorcunov wrote:
> There were typos -- we should use octal base, othervise
> numbers are treated as decimals.
> ---
>  test/app/fio.result   | 16 ++++++++--------
>  test/app/fio.test.lua | 16 ++++++++--------
>  2 files changed, 16 insertions(+), 16 deletions(-)

You missed a couple of places - I amended the patch as follows and pushed it to
master:

diff --git a/test/app-tap/csv.test.lua b/test/app-tap/csv.test.lua
index 0a656aaa..a7f17b1e 100755
--- a/test/app-tap/csv.test.lua
+++ b/test/app-tap/csv.test.lua
@@ -58,7 +58,7 @@ file2 = fio.pathjoin(tmpdir, 'file.2')
 file3 = fio.pathjoin(tmpdir, 'file.3')
 file4 = fio.pathjoin(tmpdir, 'file.4')
 
-local f = fio.open(file1, { 'O_WRONLY', 'O_TRUNC', 'O_CREAT' }, 0777)
+local f = fio.open(file1, { 'O_WRONLY', 'O_TRUNC', 'O_CREAT' }, tonumber('0777', 8))
 f:write("123 , 5  ,       92    , 0, 0\n" ..
         "1, 12  34, 56, \"quote , \", 66\nok")
 f:close()
@@ -67,7 +67,7 @@ test:is(table2str(csv.load(f, {chunk_size = 10})), test4_ans, "fio test1")
 f:close()
 
 
-f = fio.open(file2, { 'O_WRONLY', 'O_TRUNC', 'O_CREAT' }, 0777)
+f = fio.open(file2, { 'O_WRONLY', 'O_TRUNC', 'O_CREAT' }, tonumber('0777', 8))
 f:write("1\n23,456,abcac,\'multiword field 4\'\n" ..
         "none,none,0\n" ..
         ",,\n" ..
diff --git a/test/app/fio.result b/test/app/fio.result
index 87618953..e9480503 100644
--- a/test/app/fio.result
+++ b/test/app/fio.result
@@ -704,7 +704,7 @@ fio.stat(tmp2) ~= nil
 ---
 - true
 ...
-fio.mktree(tree2, 0777)
+fio.mktree(tree2, tonumber('0777', 8))
 ---
 - true
 ...
@@ -1245,7 +1245,7 @@ fio.open(nil)
 ---
 - error: 'builtin/fio.lua: Usage: fio.open(path[, flags[, mode]])'
 ...
-fio.open(tmp1, {'A'}, 0777)
+fio.open(tmp1, {'A'}, tonumber('0777', 8))
 ---
 - error: 'builtin/fio.lua: fio.open(): unknown flag: A'
 ...
diff --git a/test/app/fio.test.lua b/test/app/fio.test.lua
index 4e5e020b..aa7f2bbb 100644
--- a/test/app/fio.test.lua
+++ b/test/app/fio.test.lua
@@ -224,7 +224,7 @@ err:match("mktree") ~= nil
 fio.mktree(tree)
 fio.stat(tree) ~= nil
 fio.stat(tmp2) ~= nil
-fio.mktree(tree2, 0777)
+fio.mktree(tree2, tonumber('0777', 8))
 
 -- copy and copytree
 file1 = fio.pathjoin(tmp1, 'file.1')
@@ -409,7 +409,7 @@ fio.rmdir(tmpdir)
 test_run:cmd("push filter '(.builtin/.*.lua):[0-9]+' to '\\1'")
 fh1:seek(nil, 'a')
 fio.open(nil)
-fio.open(tmp1, {'A'}, 0777)
+fio.open(tmp1, {'A'}, tonumber('0777', 8))
 fio.open(tmp1, { 'O_RDWR', 'O_TRUNC', 'O_CREAT' }, {'A'})
 fio.pathjoin(nil)
 fio.pathjoin('abc', nil)

  reply	other threads:[~2019-05-06 12:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-06 10:22 Cyrill Gorcunov
2019-05-06 12:03 ` Vladimir Davydov [this message]
2019-05-06 12:04   ` Cyrill Gorcunov

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=20190506120321.yxpezfjcmvsuy6uy@esperanza \
    --to=vdavydov.dev@gmail.com \
    --cc=gorcunov@gmail.com \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [PATCH] test: app/fio -- Fixup modes for open' \
    /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