netatalk  4.6.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
faultinject.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2026 Andy Lemin (andylemin)
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13*/
14
15#ifndef FAULTINJECT_H
16#define FAULTINJECT_H
17
18#include <sys/types.h> /* off_t */
19
32
45 /* Observe the lock calls a probe issues, so a test can assert HOW it probed
46 * (count, range, type), not just the result. Updated on every F_GETLK/F_SETLK
47 * fcntl when fcntl_watch is set; reset by fault_inject_reset(). */
57};
58
59extern struct fault_inject fi;
60
61void fault_inject_reset(void);
62
63int faultinject_open_works(const char *scratch_path);
64
65#endif /* FAULTINJECT_H */
struct fault_inject fi
Definition faultinject.c:58
int faultinject_open_works(const char *scratch_path)
Is the LD_PRELOAD open() interposer active on this platform?
Definition faultinject.c:76
void fault_inject_reset(void)
Definition faultinject.c:60
Definition faultinject.h:33
int open_errno
Definition faultinject.h:36
int open_last_flags
Definition faultinject.h:38
int fcntl_fail_after
Definition faultinject.h:43
off_t lock_last_len
Definition faultinject.h:53
int fchdir_errno
Definition faultinject.h:56
int close_armed
Definition faultinject.h:39
int fcntl_armed
Definition faultinject.h:42
int fcntl_watch
Definition faultinject.h:48
off_t lock_last_start
Definition faultinject.h:52
int open_calls
Definition faultinject.h:37
int fchdir_armed
Definition faultinject.h:54
int fchdir_fail_after
Definition faultinject.h:55
int setlk_calls
Definition faultinject.h:50
int close_errno
Definition faultinject.h:41
int open_armed
Definition faultinject.h:34
int lock_last_type
Definition faultinject.h:51
int fcntl_errno
Definition faultinject.h:44
int close_fail_after
Definition faultinject.h:40
int open_fail_after
Definition faultinject.h:35
int getlk_calls
Definition faultinject.h:49