diff options
author | Bruce Momjian <bruce@momjian.us> | 2011-01-24 19:42:32 -0500 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2011-01-24 19:42:32 -0500 |
commit | 9fc01922831aba350a61844882c229026ca8bf0b (patch) | |
tree | db3e17caa9eae23c39416e5b17d89a687da1d0dc /contrib/pg_test_fsync/pg_test_fsync.c | |
parent | 77ff840835bc40693f36281ab394de881cb327eb (diff) |
In test_open_sync(), writes kilobytes as intended, not by bytes.
Diffstat (limited to 'contrib/pg_test_fsync/pg_test_fsync.c')
-rw-r--r-- | contrib/pg_test_fsync/pg_test_fsync.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/pg_test_fsync/pg_test_fsync.c b/contrib/pg_test_fsync/pg_test_fsync.c index 7ece9b9a981..d8099a5cd4d 100644 --- a/contrib/pg_test_fsync/pg_test_fsync.c +++ b/contrib/pg_test_fsync/pg_test_fsync.c @@ -421,7 +421,8 @@ test_open_sync(const char *msg, int writes_size) for (ops = 0; ops < ops_per_test; ops++) { for (writes = 0; writes < 16 / writes_size; writes++) - if (write(tmpfile, buf, writes_size) != writes_size) + if (write(tmpfile, buf, writes_size * 1024) != + writes_size * 1024) die("write failed"); if (lseek(tmpfile, 0, SEEK_SET) == -1) die("seek failed"); |