mirror of
https://github.com/libfuse/libfuse.git
synced 2024-11-27 06:04:27 +08:00
50c74e6459
The io for FUSE requests and responses can now be further customized by allowing to write custom functions for reading/writing the responses. This includes overriding the splice io. The reason for this addition is that having a custom file descriptor is not sufficient to allow custom io. Different types of file descriptor require different mechanisms of io interaction. For example, some file descriptor communication has boundaries (SOCK_DGRAM, EOF, etc...), while other types of fd:s might be unbounded (SOCK_STREAMS, ...). For unbounded communication, you have to read the header of the FUSE request first, and then read the remaining packet data. Furthermore, the one read call does not necessarily return all the data expected, requiring further calls in a loop.
34 lines
1.3 KiB
Meson
34 lines
1.3 KiB
Meson
# Compile helper programs
|
|
td = []
|
|
foreach prog: [ 'test_write_cache', 'test_setattr' ]
|
|
td += executable(prog, prog + '.c',
|
|
include_directories: include_dirs,
|
|
link_with: [ libfuse ],
|
|
dependencies: thread_dep,
|
|
install: false)
|
|
endforeach
|
|
td += executable('test_syscalls', 'test_syscalls.c',
|
|
include_directories: include_dirs,
|
|
install: false)
|
|
td += executable('readdir_inode', 'readdir_inode.c',
|
|
include_directories: include_dirs,
|
|
install: false)
|
|
|
|
test_scripts = [ 'conftest.py', 'pytest.ini', 'test_examples.py',
|
|
'util.py', 'test_ctests.py', 'test_custom_io.py' ]
|
|
td += custom_target('test_scripts', input: test_scripts,
|
|
output: test_scripts, build_by_default: true,
|
|
command: ['cp', '-fPp',
|
|
'@INPUT@', meson.current_build_dir() ])
|
|
|
|
# Provide something helpful when running 'ninja test'
|
|
|
|
if meson.is_subproject()
|
|
test('libfuse is a subproject, skipping tests', executable('wrong_command',
|
|
'wrong_command.c', install: false,
|
|
c_args: [ '-DMESON_IS_SUBPROJECT' ]))
|
|
else
|
|
test('wrong_command', executable('wrong_command', 'wrong_command.c',
|
|
install: false))
|
|
endif
|