Commit Graph

7 Commits

Author SHA1 Message Date
Avi Kivity
35f29dcdb4 fstream: add read-until-end tests without knowning the file size beforehand 2015-07-12 16:52:24 +03:00
Avi Kivity
439b9c848a tests: fix fstream_test misuse of shared_ptr
'static shared_ptr' causes the shared_ptr to be destroyed on a cpu other
than the one it was constructed on, which is illegal.
2015-06-20 12:02:00 +03:00
Avi Kivity
535928c643 tests: fix fstream_test use-after-free 2015-06-20 11:43:14 +03:00
Raphael S. Carvalho
d864da71fc core: avoid fsyncing output stream twice
For some reason, I added a fsync call when the file underlying the
stream gets truncated. That happens when flushing a file, which
size isn't aligned to the requested DMA buffer.
Instead, fsync should only be called when closing the stream, so this
patch changes the code to do that.

Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
2015-06-08 11:59:22 +03:00
Raphael S. Carvalho
6e049a4a98 tests: add test_fstream_unaligned testcase to fstream test
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
2015-03-18 13:10:00 +02:00
Shlomi Livne
83998a8934 tests: Boostify the fstream_test
Signed-off-by: Shlomi Livne <shlomi@cloudius-systems.com>
2015-03-12 15:56:25 +02:00
Raphael S. Carvalho
10a71dadac tests: add fstream testcase 2015-03-10 18:44:40 -03:00