diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2020-04-10 11:13:12 +0300 |
---|---|---|
committer | Xavi Hernandez <xhernandez@redhat.com> | 2020-04-15 07:58:33 +0000 |
commit | 0407d10f147862eb1c7854aed3adfbc3e1503c5d (patch) | |
tree | 89d72208f435b0777c238adf53443981b77675ee /tests/bugs/shard/bug-1696136.c | |
parent | 0abdd69636c42ec410a0615763f5c2ca4dca8f75 (diff) |
tests: do not truncate file offsets and sizes to 32-bit
Do not truncate file offsets and sizes to 32-bit to
prevent tests from spurious failures on >2Gb files.
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Change-Id: I2a77ea5f9f415249b23035eecf07129f19194ac2
Fixes: #1161
Diffstat (limited to 'tests/bugs/shard/bug-1696136.c')
-rw-r--r-- | tests/bugs/shard/bug-1696136.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/bugs/shard/bug-1696136.c b/tests/bugs/shard/bug-1696136.c index b9e8d1375e5..cb650535b09 100644 --- a/tests/bugs/shard/bug-1696136.c +++ b/tests/bugs/shard/bug-1696136.c @@ -87,8 +87,9 @@ main(int argc, char *argv[]) goto out; } - offset = atoi(argv[4]); - len = atoi(argv[5]); + /* Note that off_t is signed but size_t isn't. */ + offset = strtol(argv[4], NULL, 10); + len = strtoul(argv[5], NULL, 10); fd = glfs_open(fs, argv[6], O_RDWR); if (fd == NULL) { |