Skip to content

Commit d9864c5

Browse files
committed
[wip] Restore example tests
1 parent 9f4e4d1 commit d9864c5

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,9 +303,9 @@ jobs:
303303
304304
# preserve pytest exit status, always show logs
305305
rc=0
306-
python3 -m pytest -s -v -rs tests/test_struct_layout.py
306+
#python3 -m pytest -s -v -rs tests/test_examples.py
307307
# for now, run the tests as root, too many PermissionErrors:
308-
sudo -E python3 -m pytest -s -v -rs tests || rc=$?
308+
sudo -E python3 -m pytest -s -v -rs tests/test_examples.py || rc=$?
309309
exit "$rc"
310310
;;
311311
esac

mfusepy.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ class c_flock_t(ctypes.Structure): # type: ignore
747747
_fuse_uint32 = ctypes.c_uint32 if (fuse_version_major, fuse_version_minor) >= (3, 17) else ctypes.c_uint
748748
_fuse_file_info_fields_: list[FieldsEntry] = []
749749
_fuse_file_info_fields_bitfield: list[BitFieldsEntry] = []
750-
if _system == 'NetBSD':
750+
if _system == 'NetBSD' and False:
751751
# NetBSD has its own FUSE library reimplementation with mismatching struct layouts!
752752
# writepage is a bitfield (as in libFUSE 3.x), but the fh_old member still exists and the reported version is 2.9!
753753
# https://www.netbsd.org/docs/puffs/
@@ -940,10 +940,10 @@ class fuse_bufvec(ctypes.Structure):
940940
# The correct version is important for the struct layout!
941941
# https://github.com/NetBSD/src/blob/netbsd-10/lib/librefuse/fuse.h#L58-L59
942942
# However, the fuse_operations layout probably fits the advertised version because I had segfaults from utimens!
943-
if fuse_version_major == 2 or _system == 'NetBSD': # No idea why NetBSD did not remove it -.-
943+
if fuse_version_major == 2 or _system == 'NetBSD2': # No idea why NetBSD did not remove it -.-
944944
_fuse_conn_info_fields += [('async_read', _fuse_uint32)]
945945
_fuse_conn_info_fields += [('max_write', _fuse_uint32)]
946-
if fuse_version_major == 3 or _system == 'NetBSD':
946+
if fuse_version_major == 3 or _system == 'NetBSD2':
947947
_fuse_conn_info_fields += [('max_read', _fuse_uint32)]
948948
_fuse_conn_info_fields += [
949949
('max_readahead', _fuse_uint32),
@@ -952,11 +952,11 @@ class fuse_bufvec(ctypes.Structure):
952952
('max_background', _fuse_uint32), # Added in 2.9
953953
('congestion_threshold', _fuse_uint32), # Added in 2.9
954954
]
955-
if fuse_version_major == 2 and _system != 'NetBSD':
955+
if fuse_version_major == 2 and _system != 'NetBSD2':
956956
_fuse_conn_info_fields += [('reserved', _fuse_uint32 * 23)]
957-
elif fuse_version_major == 3 or _system == 'NetBSD':
957+
elif fuse_version_major == 3 or _system == 'NetBSD2':
958958
_fuse_conn_info_fields += [('time_gran', _fuse_uint32)]
959-
if fuse_version_minor < 17 or _system == 'NetBSD':
959+
if fuse_version_minor < 17 or _system == 'NetBSD2':
960960
_fuse_conn_info_fields += [('reserved', _fuse_uint32 * 22)]
961961
else:
962962
_fuse_conn_info_fields += [

0 commit comments

Comments
 (0)