GCC Code Coverage Report


Directory: cvmfs/
File: cvmfs/duplex_fuse.h
Date: 2026-10-25 02:40:14
Exec Total Coverage
Lines: 6 6 100.0%
Branches: 0 0 -%

Line Branch Exec Source
1 /**
2 * This file is part of the CernVM File System.
3 */
4
5 #ifndef CVMFS_DUPLEX_FUSE_H_
6 #define CVMFS_DUPLEX_FUSE_H_
7
8 #ifdef CVMFS_LIBCVMFS
9 // Unit tests
10 #include <sys/types.h>
11 #define FUSE_MAKE_VERSION(maj, min) ((maj) * 100 + (min))
12 #define FUSE_VERSION FUSE_MAKE_VERSION(3, 3)
13 #define FUSE_ROOT_ID 1
14 extern "C" {
15 typedef unsigned long fuse_ino_t; // NOLINT
16 // Empty structs have different sizes in C and C++, hence the dummy int
17 struct fuse_session {
18 int dummy;
19 };
20 struct fuse_lowlevel_ops {
21 int dummy;
22 }; // for loader.h
23 enum fuse_expire_flags {
24 FUSE_LL_EXPIRE_ONLY = (1 << 0),
25 };
26
27
28 // Defined in duplex_fuse.cc
29 extern unsigned fuse_lowlevel_notify_inval_inode_cnt;
30 extern unsigned fuse_lowlevel_notify_inval_entry_cnt;
31 13824 static int __attribute__((used)) fuse_lowlevel_notify_inval_inode(
32 struct fuse_session *, fuse_ino_t, off_t, off_t) // NOLINT
33 {
34 13824 fuse_lowlevel_notify_inval_inode_cnt++;
35 13824 return -1;
36 }
37 11520 static int __attribute__((used)) fuse_lowlevel_notify_inval_entry(
38 struct fuse_session *, fuse_ino_t, const char *, size_t) // NOLINT
39 {
40 11520 fuse_lowlevel_notify_inval_entry_cnt++;
41 11520 return -1;
42 }
43 }
44 #else // CVMFS_LIBCVMFS
45
46 #ifdef __APPLE__
47 // macFUSE >= 5.4 defaults to its Darwin ABI (extra position argument for
48 // get/setxattr, fuse_darwin_entry_param for fuse_reply_entry). Stick to the
49 // vanilla libfuse ABI; libfuse picks the ABI at runtime from this flag.
50 #define FUSE_DARWIN_ENABLE_EXTENSIONS 0
51 #endif
52
53 #ifdef CVMFS_ENABLE_FUSE3_LOOP_CONFIG
54 #define FUSE_USE_VERSION 312
55 #else
56 #define FUSE_USE_VERSION 31
57 #endif
58 #include <fuse3/fuse.h>
59 #include <fuse3/fuse_lowlevel.h>
60 #include <fuse3/fuse_opt.h>
61 #endif // CVMFS_LIBCVMFS
62
63 #endif // CVMFS_DUPLEX_FUSE_H_
64