From: Cyrill Gorcunov <gorcunov@gmail.com> To: tml <tarantool-patches@freelists.org> Cc: Vladimir Davydov <vdavydov.dev@gmail.com>, Cyrill Gorcunov <gorcunov@gmail.com> Subject: [PATCH 3/3] test: app/fio -- Add ERRINJ_COIO_SENDFILE_CHUNK Date: Tue, 16 Apr 2019 23:08:58 +0300 [thread overview] Message-ID: <20190416200858.19473-4-gorcunov@gmail.com> (raw) In-Reply-To: <20190416200858.19473-1-gorcunov@gmail.com> To test sendfile work in a cycle -- force transferring 1024 bytes at once. --- test/app/fio.result | 18 ++++++++++++++++++ test/app/fio.test.lua | 5 +++++ 2 files changed, 23 insertions(+) diff --git a/test/app/fio.result b/test/app/fio.result index 486cb8043..d640ab596 100644 --- a/test/app/fio.result +++ b/test/app/fio.result @@ -718,6 +718,9 @@ file2 = fio.pathjoin(tmp2, 'file.2') file3 = fio.pathjoin(tree, 'file.3') --- ... +file4 = fio.pathjoin(tree, 'file.4') +--- +... fh1 = fio.open(file1, { 'O_RDWR', 'O_TRUNC', 'O_CREAT' }, 0777) --- ... @@ -752,6 +755,21 @@ fio.stat(fio.pathjoin(tmp2, "file.1")) ~= nil --- - true ... +errinj = box.error.injection +--- +... +errinj.set('ERRINJ_COIO_SENDFILE_CHUNK', 1024) +--- +- ok +... +fio.copyfile(file1, file4) +--- +- true +... +fio.stat(file1, file4) ~= nil +--- +- true +... res, err = fio.copyfile(fio.pathjoin(tmp1, 'not_exists.txt'), tmp1) --- ... diff --git a/test/app/fio.test.lua b/test/app/fio.test.lua index 9af37044d..87d578991 100644 --- a/test/app/fio.test.lua +++ b/test/app/fio.test.lua @@ -230,6 +230,7 @@ fio.mktree(tree2, 0777) file1 = fio.pathjoin(tmp1, 'file.1') file2 = fio.pathjoin(tmp2, 'file.2') file3 = fio.pathjoin(tree, 'file.3') +file4 = fio.pathjoin(tree, 'file.4') fh1 = fio.open(file1, { 'O_RDWR', 'O_TRUNC', 'O_CREAT' }, 0777) fh1:write("gogo") @@ -240,6 +241,10 @@ fh1:close() fio.symlink(file1, file3) fio.copyfile(file1, tmp2) fio.stat(fio.pathjoin(tmp2, "file.1")) ~= nil +errinj = box.error.injection +errinj.set('ERRINJ_COIO_SENDFILE_CHUNK', 1024) +fio.copyfile(file1, file4) +fio.stat(file1, file4) ~= nil res, err = fio.copyfile(fio.pathjoin(tmp1, 'not_exists.txt'), tmp1) res -- 2.20.1
next prev parent reply other threads:[~2019-04-16 20:08 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-04-16 20:08 [PATCH v3 0/3] core/coio_file: Use eio_sendfile_sync for file copying Cyrill Gorcunov 2019-04-16 20:08 ` [PATCH 1/3] core/coio_file: Use eio_sendfile_sync instead of a chunk mode Cyrill Gorcunov 2019-04-18 18:41 ` Vladimir Davydov 2019-04-18 18:50 ` Cyrill Gorcunov 2019-04-16 20:08 ` [PATCH 2/3] core/coio_file: Add ERRINJ_COIO_SENDFILE_CHUNK error injection Cyrill Gorcunov 2019-04-16 20:08 ` Cyrill Gorcunov [this message] 2019-04-16 21:40 ` [PATCH v4 3/3] test: app/fio -- Add ERRINJ_COIO_SENDFILE_CHUNK 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=20190416200858.19473-4-gorcunov@gmail.com \ --to=gorcunov@gmail.com \ --cc=tarantool-patches@freelists.org \ --cc=vdavydov.dev@gmail.com \ --subject='Re: [PATCH 3/3] test: app/fio -- Add ERRINJ_COIO_SENDFILE_CHUNK' \ /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