Commit Graph

15 Commits

Author SHA1 Message Date
CismonX
09e6583b54 Use off_t instead of loff_t
Since we're already enforcing 64-bit off_t, using loff_t
makes no difference.

Also loff_t is Linux-only, which breaks compatibility for *BSD.
2024-06-25 07:16:49 +02:00
Bernd Schubert
a6ac2ec12d Fix undefined loff_t in test_write_cache.c on alpine
This fixes #899. Seems that Alpine (and maybe Fedora) need
_GNU_SOURCE to get loff_t.
2024-03-06 13:12:50 +01:00
Bernd Schubert
31bf17c744
Fix tests/test_write_cache in write back mode (#892)
This test could fail whenever a something (kernel, userspace) decides
to flush in between of two 2048B writes. These two writes are supposed
to be merged into a single 4906 byte write by the kernel writeback cache,
but _sometimes_ the test fails because 2048 byte writes get through.
Fixes #882

Solution here is a modification how the test works - instead
of requiring an exact aggregation of 2x2048B into 4096B,
it now writes 64x2048B and requires in write-back modes
the number of received writes requests is lower than 64 - we
can expect that at least some writes get aggregated, but we do
know how many.

Co-authored-by: Bernd Schubert <bschubert@ddn.com>
2024-02-26 19:09:00 +01:00
Nikolaus Rath
1cb6e17e0c Reduce default write size by half
Hopefully this will reduce test flakiness on CI.
2023-07-01 14:12:44 +01:00
Nikolaus Rath
b51f69f620 Add missing include. 2023-07-01 14:10:47 +01:00
Bernd Schubert
db35a37def Install a the configure_file (config.h) and use in headers
This addresses: https://github.com/libfuse/libfuse/issues/724

HAVE_LIBC_VERSIONED_SYMBOLS configures the library if to use
versioned symbols and is set at meson configuration time.
External filesystems (the main target, actually)
include fuse headers and the preprocessor
then acts on HAVE_LIBC_VERSIONED_SYMBOLS. Problem was now that
'config.h' was not distributed with libfuse and so
HAVE_LIBC_VERSIONED_SYMBOLS was never defined with external
tools and the preprocessor did the wrong decision.

This commit also increases the the minimal meson version,
as this depends on meson feature only available in 0.50

<quote 'meson' >
WARNING: Project specifies a minimum meson_
version '>= 0.42' but uses features which were added
 in newer versions:
 * 0.50.0: {'install arg in configure_file'}
</quote>

Additionally the config file has been renamed to "fuse_config.h"
to avoid clashes - 'config.h' is not very specific.
2023-01-28 09:35:34 +00:00
Amir Goldstein
435a14e029 Add test for FOPEN_NOFLUSH flag
Simulate write() delay and verify that close(rofd) does not
block waiting on pending writes.

The support for the flag was added in kernel v5.16-rc1.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
2022-01-05 08:43:43 +02:00
Dr. David Alan Gilbert
252e978c54
State GPL version in comment (#485)
IN a bunch of comments we say 'under the terms of the GNU GPL', make
it clear this is GPLv2 (as LICENSE says).

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2020-03-13 16:46:44 +00:00
Rostislav Skudnov
055fcec831 test_write_cache: Use fuse_session_exit() to stop filesystem thread
Using fuse_session_exit() followed by fuse_session_unmount() ensures
that a proper cleanup and shutdown is performed.
2018-07-23 11:02:57 +01:00
Rostislav Skudnov
c7ae066cb4 test_write_cache: Fix memory leaks 2018-07-23 11:02:57 +01:00
Nikolaus Rath
53de0adb1a Don't use -o auto_unmount under FreeBSD. 2017-08-24 20:50:44 +02:00
Brian Naylor
cc96e8d783 Make tests build on bsd 2017-05-24 09:58:45 -07:00
Nikolaus Rath
1fe4258932 Don't hardcode test file name. 2016-11-06 21:01:38 -08:00
Nikolaus Rath
d49f2e77b4 Unify handling of fuse_conn_info options
Instead of using command line options to modify struct fuse_conn_info
before and after calling the init() handler, we now give the file system
explicit control over this.
2016-10-15 16:49:23 -07:00
Nikolaus Rath
71064a41f8 Added write cache tests. 2016-10-10 11:07:38 -07:00