Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9fc0192

Browse files
committed
In test_open_sync(), writes kilobytes as intended, not by bytes.
1 parent 77ff840 commit 9fc0192

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contrib/pg_test_fsync/pg_test_fsync.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,8 @@ test_open_sync(const char *msg, int writes_size)
421421
for (ops = 0; ops < ops_per_test; ops++)
422422
{
423423
for (writes = 0; writes < 16 / writes_size; writes++)
424-
if (write(tmpfile, buf, writes_size) != writes_size)
424+
if (write(tmpfile, buf, writes_size * 1024) !=
425+
writes_size * 1024)
425426
die("write failed");
426427
if (lseek(tmpfile, 0, SEEK_SET) == -1)
427428
die("seek failed");

0 commit comments

Comments
 (0)