GCC Code Coverage Report


Directory: cvmfs/
File: cvmfs/duplex_fuse.h
Date: 2026-08-30 02:40:36
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 67584 static int __attribute__((used)) fuse_lowlevel_notify_inval_inode(
32 struct fuse_session *, fuse_ino_t, off_t, off_t) // NOLINT
33 {
34 67584 fuse_lowlevel_notify_inval_inode_cnt++;
35 67584 return -1;
36 }
37 56320 static int __attribute__((used)) fuse_lowlevel_notify_inval_entry(
38 struct fuse_session *, fuse_ino_t, const char *, size_t) // NOLINT
39 {
40 56320 fuse_lowlevel_notify_inval_entry_cnt++;
41 56320 return -1;
42 }
43 }
44 #else // CVMFS_LIBCVMFS
45
46 #ifdef CVMFS_ENABLE_FUSE3_LOOP_CONFIG
47 #define FUSE_USE_VERSION 312
48 #else
49 #define FUSE_USE_VERSION 31
50 #endif
51 #include <fuse3/fuse.h>
52 #include <fuse3/fuse_lowlevel.h>
53 #include <fuse3/fuse_opt.h>
54 #endif // CVMFS_LIBCVMFS
55
56 #endif // CVMFS_DUPLEX_FUSE_H_
57