xref: /aosp_15_r20/external/ltp/include/tst_fs.h (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
1*49cdfc7eSAndroid Build Coastguard Worker /* SPDX-License-Identifier: GPL-2.0-or-later
2*49cdfc7eSAndroid Build Coastguard Worker  * Copyright (c) 2015-2017 Cyril Hrubis <[email protected]>
3*49cdfc7eSAndroid Build Coastguard Worker  * Copyright (c) Linux Test Project, 2017-2022
4*49cdfc7eSAndroid Build Coastguard Worker  */
5*49cdfc7eSAndroid Build Coastguard Worker 
6*49cdfc7eSAndroid Build Coastguard Worker #ifndef TST_FS_H__
7*49cdfc7eSAndroid Build Coastguard Worker #define TST_FS_H__
8*49cdfc7eSAndroid Build Coastguard Worker 
9*49cdfc7eSAndroid Build Coastguard Worker /* man 2 statfs or kernel-source/include/uapi/linux/magic.h */
10*49cdfc7eSAndroid Build Coastguard Worker #define TST_BTRFS_MAGIC    0x9123683E
11*49cdfc7eSAndroid Build Coastguard Worker #define TST_NFS_MAGIC      0x6969
12*49cdfc7eSAndroid Build Coastguard Worker #define TST_RAMFS_MAGIC    0x858458f6
13*49cdfc7eSAndroid Build Coastguard Worker #define TST_TMPFS_MAGIC    0x01021994
14*49cdfc7eSAndroid Build Coastguard Worker #define TST_V9FS_MAGIC     0x01021997
15*49cdfc7eSAndroid Build Coastguard Worker #define TST_XFS_MAGIC      0x58465342
16*49cdfc7eSAndroid Build Coastguard Worker #define TST_EXT2_OLD_MAGIC 0xEF51
17*49cdfc7eSAndroid Build Coastguard Worker /* ext2, ext3, ext4 have the same magic number */
18*49cdfc7eSAndroid Build Coastguard Worker #define TST_EXT234_MAGIC   0xEF53
19*49cdfc7eSAndroid Build Coastguard Worker #define TST_MINIX_MAGIC    0x137F
20*49cdfc7eSAndroid Build Coastguard Worker #define TST_MINIX_MAGIC2   0x138F
21*49cdfc7eSAndroid Build Coastguard Worker #define TST_MINIX2_MAGIC   0x2468
22*49cdfc7eSAndroid Build Coastguard Worker #define TST_MINIX2_MAGIC2  0x2478
23*49cdfc7eSAndroid Build Coastguard Worker #define TST_MINIX3_MAGIC   0x4D5A
24*49cdfc7eSAndroid Build Coastguard Worker #define TST_UDF_MAGIC      0x15013346
25*49cdfc7eSAndroid Build Coastguard Worker #define TST_SYSV2_MAGIC    0x012FF7B6
26*49cdfc7eSAndroid Build Coastguard Worker #define TST_SYSV4_MAGIC    0x012FF7B5
27*49cdfc7eSAndroid Build Coastguard Worker #define TST_UFS_MAGIC      0x00011954
28*49cdfc7eSAndroid Build Coastguard Worker #define TST_UFS2_MAGIC     0x19540119
29*49cdfc7eSAndroid Build Coastguard Worker #define TST_F2FS_MAGIC     0xF2F52010
30*49cdfc7eSAndroid Build Coastguard Worker #define TST_NILFS_MAGIC    0x3434
31*49cdfc7eSAndroid Build Coastguard Worker #define TST_EXOFS_MAGIC    0x5DF5
32*49cdfc7eSAndroid Build Coastguard Worker #define TST_OVERLAYFS_MAGIC 0x794c7630
33*49cdfc7eSAndroid Build Coastguard Worker #define TST_FUSE_MAGIC     0x65735546
34*49cdfc7eSAndroid Build Coastguard Worker #define TST_VFAT_MAGIC     0x4d44 /* AKA MSDOS */
35*49cdfc7eSAndroid Build Coastguard Worker #define TST_EXFAT_MAGIC    0x2011BAB0UL
36*49cdfc7eSAndroid Build Coastguard Worker 
37*49cdfc7eSAndroid Build Coastguard Worker /* fs/bcachefs/bcachefs_format.h */
38*49cdfc7eSAndroid Build Coastguard Worker #define TST_BCACHE_MAGIC		0xca451a4e
39*49cdfc7eSAndroid Build Coastguard Worker 
40*49cdfc7eSAndroid Build Coastguard Worker #include <stdint.h>
41*49cdfc7eSAndroid Build Coastguard Worker 
42*49cdfc7eSAndroid Build Coastguard Worker enum tst_fill_access_pattern {
43*49cdfc7eSAndroid Build Coastguard Worker 	TST_FILL_BLOCKS,
44*49cdfc7eSAndroid Build Coastguard Worker 	TST_FILL_RANDOM
45*49cdfc7eSAndroid Build Coastguard Worker };
46*49cdfc7eSAndroid Build Coastguard Worker 
47*49cdfc7eSAndroid Build Coastguard Worker enum {
48*49cdfc7eSAndroid Build Coastguard Worker 	TST_BYTES = 1,
49*49cdfc7eSAndroid Build Coastguard Worker 	TST_KB = 1024,
50*49cdfc7eSAndroid Build Coastguard Worker 	TST_MB = 1048576,
51*49cdfc7eSAndroid Build Coastguard Worker 	TST_GB = 1073741824,
52*49cdfc7eSAndroid Build Coastguard Worker };
53*49cdfc7eSAndroid Build Coastguard Worker 
54*49cdfc7eSAndroid Build Coastguard Worker #define OVL_BASE_MNTPOINT        "mntpoint"
55*49cdfc7eSAndroid Build Coastguard Worker #define OVL_LOWER	OVL_BASE_MNTPOINT"/lower"
56*49cdfc7eSAndroid Build Coastguard Worker #define OVL_UPPER	OVL_BASE_MNTPOINT"/upper"
57*49cdfc7eSAndroid Build Coastguard Worker #define OVL_WORK	OVL_BASE_MNTPOINT"/work"
58*49cdfc7eSAndroid Build Coastguard Worker #define OVL_MNT		OVL_BASE_MNTPOINT"/ovl"
59*49cdfc7eSAndroid Build Coastguard Worker 
60*49cdfc7eSAndroid Build Coastguard Worker /*
61*49cdfc7eSAndroid Build Coastguard Worker  * @path: path is the pathname of any file within the mounted file system
62*49cdfc7eSAndroid Build Coastguard Worker  * @mult: mult should be TST_KB, TST_MB or TST_GB
63*49cdfc7eSAndroid Build Coastguard Worker  * the required free space is calculated by @size * @mult
64*49cdfc7eSAndroid Build Coastguard Worker  */
65*49cdfc7eSAndroid Build Coastguard Worker int tst_fs_has_free_(void (*cleanup)(void), const char *path, uint64_t size,
66*49cdfc7eSAndroid Build Coastguard Worker 		     unsigned int mult);
67*49cdfc7eSAndroid Build Coastguard Worker 
68*49cdfc7eSAndroid Build Coastguard Worker /*
69*49cdfc7eSAndroid Build Coastguard Worker  * Returns filesystem magick for a given path.
70*49cdfc7eSAndroid Build Coastguard Worker  *
71*49cdfc7eSAndroid Build Coastguard Worker  * The expected usage is:
72*49cdfc7eSAndroid Build Coastguard Worker  *
73*49cdfc7eSAndroid Build Coastguard Worker  *      if (tst_fs_type(cleanup, ".") == TST_NFS_MAGIC) {
74*49cdfc7eSAndroid Build Coastguard Worker  *		tst_brkm(TCONF, cleanup,
75*49cdfc7eSAndroid Build Coastguard Worker  *		         "Test not supported on NFS filesystem");
76*49cdfc7eSAndroid Build Coastguard Worker  *	}
77*49cdfc7eSAndroid Build Coastguard Worker  *
78*49cdfc7eSAndroid Build Coastguard Worker  * Or:
79*49cdfc7eSAndroid Build Coastguard Worker  *
80*49cdfc7eSAndroid Build Coastguard Worker  *	long type;
81*49cdfc7eSAndroid Build Coastguard Worker  *
82*49cdfc7eSAndroid Build Coastguard Worker  *	swtich ((type = tst_fs_type(cleanup, "."))) {
83*49cdfc7eSAndroid Build Coastguard Worker  *	case TST_NFS_MAGIC:
84*49cdfc7eSAndroid Build Coastguard Worker  *	case TST_TMPFS_MAGIC:
85*49cdfc7eSAndroid Build Coastguard Worker  *	case TST_RAMFS_MAGIC:
86*49cdfc7eSAndroid Build Coastguard Worker  *		tst_brkm(TCONF, cleanup, "Test not supported on %s filesystem",
87*49cdfc7eSAndroid Build Coastguard Worker  *		         tst_fs_type_name(type));
88*49cdfc7eSAndroid Build Coastguard Worker  *	break;
89*49cdfc7eSAndroid Build Coastguard Worker  *	}
90*49cdfc7eSAndroid Build Coastguard Worker  */
91*49cdfc7eSAndroid Build Coastguard Worker long tst_fs_type_(void (*cleanup)(void), const char *path);
92*49cdfc7eSAndroid Build Coastguard Worker 
93*49cdfc7eSAndroid Build Coastguard Worker /*
94*49cdfc7eSAndroid Build Coastguard Worker  * Returns filesystem name given magic.
95*49cdfc7eSAndroid Build Coastguard Worker  */
96*49cdfc7eSAndroid Build Coastguard Worker const char *tst_fs_type_name(long f_type);
97*49cdfc7eSAndroid Build Coastguard Worker 
98*49cdfc7eSAndroid Build Coastguard Worker /*
99*49cdfc7eSAndroid Build Coastguard Worker  * Try to get maximum number of hard links to a regular file inside the @dir.
100*49cdfc7eSAndroid Build Coastguard Worker  *
101*49cdfc7eSAndroid Build Coastguard Worker  * Note: This number depends on the filesystem @dir is on.
102*49cdfc7eSAndroid Build Coastguard Worker  *
103*49cdfc7eSAndroid Build Coastguard Worker  * The code uses link(2) to create hard links to a single file until it gets
104*49cdfc7eSAndroid Build Coastguard Worker  * EMLINK or creates 65535 links.
105*49cdfc7eSAndroid Build Coastguard Worker  *
106*49cdfc7eSAndroid Build Coastguard Worker  * If limit is hit maximal number of hardlinks is returned and the @dir is
107*49cdfc7eSAndroid Build Coastguard Worker  * filled with hardlinks in format "testfile%i" where i belongs to [0, limit)
108*49cdfc7eSAndroid Build Coastguard Worker  * interval.
109*49cdfc7eSAndroid Build Coastguard Worker  *
110*49cdfc7eSAndroid Build Coastguard Worker  * If no limit is hit (succed to create 65535 without error) or if link()
111*49cdfc7eSAndroid Build Coastguard Worker  * failed with ENOSPC or EDQUOT zero is returned previously created files are
112*49cdfc7eSAndroid Build Coastguard Worker  * removed.
113*49cdfc7eSAndroid Build Coastguard Worker  */
114*49cdfc7eSAndroid Build Coastguard Worker int tst_fs_fill_hardlinks_(void (*cleanup) (void), const char *dir);
115*49cdfc7eSAndroid Build Coastguard Worker 
116*49cdfc7eSAndroid Build Coastguard Worker /*
117*49cdfc7eSAndroid Build Coastguard Worker  * Try to get maximum number of subdirectories in directory.
118*49cdfc7eSAndroid Build Coastguard Worker  *
119*49cdfc7eSAndroid Build Coastguard Worker  * Note: This number depends on the filesystem @dir is on.
120*49cdfc7eSAndroid Build Coastguard Worker  *
121*49cdfc7eSAndroid Build Coastguard Worker  * The code uses mkdir(2) to create directories in @dir until it gets EMLINK
122*49cdfc7eSAndroid Build Coastguard Worker  * or creates 65535 directories.
123*49cdfc7eSAndroid Build Coastguard Worker  *
124*49cdfc7eSAndroid Build Coastguard Worker  * If limit is hit the maximal number of subdirectories is returned and the
125*49cdfc7eSAndroid Build Coastguard Worker  * @dir is filled with subdirectories in format "testdir%i" where i belongs to
126*49cdfc7eSAndroid Build Coastguard Worker  * [0, limit - 2) interval (because each newly created dir has two links
127*49cdfc7eSAndroid Build Coastguard Worker  * already the '.' and link from parent dir).
128*49cdfc7eSAndroid Build Coastguard Worker  *
129*49cdfc7eSAndroid Build Coastguard Worker  * If no limit is hit or mkdir() failed with ENOSPC or EDQUOT zero is returned
130*49cdfc7eSAndroid Build Coastguard Worker  * previously created directories are removed.
131*49cdfc7eSAndroid Build Coastguard Worker  *
132*49cdfc7eSAndroid Build Coastguard Worker  */
133*49cdfc7eSAndroid Build Coastguard Worker int tst_fs_fill_subdirs_(void (*cleanup) (void), const char *dir);
134*49cdfc7eSAndroid Build Coastguard Worker 
135*49cdfc7eSAndroid Build Coastguard Worker /*
136*49cdfc7eSAndroid Build Coastguard Worker  * Checks if a given directory contains any entities,
137*49cdfc7eSAndroid Build Coastguard Worker  * returns 1 if directory is empty, 0 otherwise
138*49cdfc7eSAndroid Build Coastguard Worker  */
139*49cdfc7eSAndroid Build Coastguard Worker int tst_dir_is_empty_(void (*cleanup)(void), const char *name, int verbose);
140*49cdfc7eSAndroid Build Coastguard Worker 
141*49cdfc7eSAndroid Build Coastguard Worker /*
142*49cdfc7eSAndroid Build Coastguard Worker  * Search $PATH for prog_name and fills buf with absolute path if found.
143*49cdfc7eSAndroid Build Coastguard Worker  *
144*49cdfc7eSAndroid Build Coastguard Worker  * Returns -1 on failure, either command was not found or buffer was too small.
145*49cdfc7eSAndroid Build Coastguard Worker  */
146*49cdfc7eSAndroid Build Coastguard Worker int tst_get_path(const char *prog_name, char *buf, size_t buf_len);
147*49cdfc7eSAndroid Build Coastguard Worker 
148*49cdfc7eSAndroid Build Coastguard Worker /*
149*49cdfc7eSAndroid Build Coastguard Worker  * Fill a file with specified pattern
150*49cdfc7eSAndroid Build Coastguard Worker  * @fd: file descriptor
151*49cdfc7eSAndroid Build Coastguard Worker  * @pattern: pattern
152*49cdfc7eSAndroid Build Coastguard Worker  * @bs: block size
153*49cdfc7eSAndroid Build Coastguard Worker  * @bcount: blocks count
154*49cdfc7eSAndroid Build Coastguard Worker  */
155*49cdfc7eSAndroid Build Coastguard Worker int tst_fill_fd(int fd, char pattern, size_t bs, size_t bcount);
156*49cdfc7eSAndroid Build Coastguard Worker 
157*49cdfc7eSAndroid Build Coastguard Worker /*
158*49cdfc7eSAndroid Build Coastguard Worker  * Preallocate space in open file. If fallocate() fails, falls back to
159*49cdfc7eSAndroid Build Coastguard Worker  * using tst_fill_fd().
160*49cdfc7eSAndroid Build Coastguard Worker  * @fd: file descriptor
161*49cdfc7eSAndroid Build Coastguard Worker  * @bs: block size
162*49cdfc7eSAndroid Build Coastguard Worker  * @bcount: blocks count
163*49cdfc7eSAndroid Build Coastguard Worker  */
164*49cdfc7eSAndroid Build Coastguard Worker int tst_prealloc_size_fd(int fd, size_t bs, size_t bcount);
165*49cdfc7eSAndroid Build Coastguard Worker 
166*49cdfc7eSAndroid Build Coastguard Worker /*
167*49cdfc7eSAndroid Build Coastguard Worker  * Creates/ovewrites a file with specified pattern
168*49cdfc7eSAndroid Build Coastguard Worker  * @path: path to file
169*49cdfc7eSAndroid Build Coastguard Worker  * @pattern: pattern
170*49cdfc7eSAndroid Build Coastguard Worker  * @bs: block size
171*49cdfc7eSAndroid Build Coastguard Worker  * @bcount: blocks amount
172*49cdfc7eSAndroid Build Coastguard Worker  */
173*49cdfc7eSAndroid Build Coastguard Worker int tst_fill_file(const char *path, char pattern, size_t bs, size_t bcount);
174*49cdfc7eSAndroid Build Coastguard Worker 
175*49cdfc7eSAndroid Build Coastguard Worker /*
176*49cdfc7eSAndroid Build Coastguard Worker  * Creates file of specified size. Space will be only preallocated if possible.
177*49cdfc7eSAndroid Build Coastguard Worker  * @path: path to file
178*49cdfc7eSAndroid Build Coastguard Worker  * @bs: block size
179*49cdfc7eSAndroid Build Coastguard Worker  * @bcount: blocks amount
180*49cdfc7eSAndroid Build Coastguard Worker  */
181*49cdfc7eSAndroid Build Coastguard Worker int tst_prealloc_file(const char *path, size_t bs, size_t bcount);
182*49cdfc7eSAndroid Build Coastguard Worker 
183*49cdfc7eSAndroid Build Coastguard Worker enum tst_fs_impl {
184*49cdfc7eSAndroid Build Coastguard Worker 	TST_FS_UNSUPPORTED = 0,
185*49cdfc7eSAndroid Build Coastguard Worker 	TST_FS_KERNEL = 1,
186*49cdfc7eSAndroid Build Coastguard Worker 	TST_FS_FUSE = 2,
187*49cdfc7eSAndroid Build Coastguard Worker };
188*49cdfc7eSAndroid Build Coastguard Worker 
189*49cdfc7eSAndroid Build Coastguard Worker /*
190*49cdfc7eSAndroid Build Coastguard Worker  * Returns if filesystem is supported and if driver is in kernel or FUSE.
191*49cdfc7eSAndroid Build Coastguard Worker  *
192*49cdfc7eSAndroid Build Coastguard Worker  * @fs_type A filesystem name to check the support for.
193*49cdfc7eSAndroid Build Coastguard Worker  */
194*49cdfc7eSAndroid Build Coastguard Worker enum tst_fs_impl tst_fs_is_supported(const char *fs_type);
195*49cdfc7eSAndroid Build Coastguard Worker 
196*49cdfc7eSAndroid Build Coastguard Worker /*
197*49cdfc7eSAndroid Build Coastguard Worker  * Returns NULL-terminated array of kernel-supported filesystems.
198*49cdfc7eSAndroid Build Coastguard Worker  *
199*49cdfc7eSAndroid Build Coastguard Worker  * @skiplist A NULL terminated array of filesystems to skip.
200*49cdfc7eSAndroid Build Coastguard Worker  */
201*49cdfc7eSAndroid Build Coastguard Worker const char **tst_get_supported_fs_types(const char *const *skiplist);
202*49cdfc7eSAndroid Build Coastguard Worker 
203*49cdfc7eSAndroid Build Coastguard Worker /*
204*49cdfc7eSAndroid Build Coastguard Worker  * Returns 1 if filesystem is in skiplist 0 otherwise.
205*49cdfc7eSAndroid Build Coastguard Worker  *
206*49cdfc7eSAndroid Build Coastguard Worker  * @fs_type A filesystem type to lookup.
207*49cdfc7eSAndroid Build Coastguard Worker  * @skiplist A NULL terminated array of filesystems to skip.
208*49cdfc7eSAndroid Build Coastguard Worker  */
209*49cdfc7eSAndroid Build Coastguard Worker int tst_fs_in_skiplist(const char *fs_type, const char *const *skiplist);
210*49cdfc7eSAndroid Build Coastguard Worker 
211*49cdfc7eSAndroid Build Coastguard Worker /*
212*49cdfc7eSAndroid Build Coastguard Worker  * Creates and writes to files on given path until write fails with ENOSPC
213*49cdfc7eSAndroid Build Coastguard Worker  */
214*49cdfc7eSAndroid Build Coastguard Worker void tst_fill_fs(const char *path, int verbose, enum tst_fill_access_pattern pattern);
215*49cdfc7eSAndroid Build Coastguard Worker 
216*49cdfc7eSAndroid Build Coastguard Worker /*
217*49cdfc7eSAndroid Build Coastguard Worker  * Check if FIBMAP ioctl is supported.
218*49cdfc7eSAndroid Build Coastguard Worker  * Tests needs to set .needs_root = 1 in order to avoid EPERM.
219*49cdfc7eSAndroid Build Coastguard Worker  *
220*49cdfc7eSAndroid Build Coastguard Worker  * @return 0: FIBMAP is supported, 1: FIBMAP is *not* supported.
221*49cdfc7eSAndroid Build Coastguard Worker  */
222*49cdfc7eSAndroid Build Coastguard Worker int tst_fibmap(const char *filename);
223*49cdfc7eSAndroid Build Coastguard Worker 
224*49cdfc7eSAndroid Build Coastguard Worker #ifdef TST_TEST_H__
tst_fs_type(const char * path)225*49cdfc7eSAndroid Build Coastguard Worker static inline long tst_fs_type(const char *path)
226*49cdfc7eSAndroid Build Coastguard Worker {
227*49cdfc7eSAndroid Build Coastguard Worker 	return tst_fs_type_(NULL, path);
228*49cdfc7eSAndroid Build Coastguard Worker }
229*49cdfc7eSAndroid Build Coastguard Worker 
tst_fs_has_free(const char * path,uint64_t size,unsigned int mult)230*49cdfc7eSAndroid Build Coastguard Worker static inline int tst_fs_has_free(const char *path, uint64_t size,
231*49cdfc7eSAndroid Build Coastguard Worker 				  unsigned int mult)
232*49cdfc7eSAndroid Build Coastguard Worker {
233*49cdfc7eSAndroid Build Coastguard Worker 	return tst_fs_has_free_(NULL, path, size, mult);
234*49cdfc7eSAndroid Build Coastguard Worker }
235*49cdfc7eSAndroid Build Coastguard Worker 
tst_fs_fill_hardlinks(const char * dir)236*49cdfc7eSAndroid Build Coastguard Worker static inline int tst_fs_fill_hardlinks(const char *dir)
237*49cdfc7eSAndroid Build Coastguard Worker {
238*49cdfc7eSAndroid Build Coastguard Worker 	return tst_fs_fill_hardlinks_(NULL, dir);
239*49cdfc7eSAndroid Build Coastguard Worker }
240*49cdfc7eSAndroid Build Coastguard Worker 
tst_fs_fill_subdirs(const char * dir)241*49cdfc7eSAndroid Build Coastguard Worker static inline int tst_fs_fill_subdirs(const char *dir)
242*49cdfc7eSAndroid Build Coastguard Worker {
243*49cdfc7eSAndroid Build Coastguard Worker 	return tst_fs_fill_subdirs_(NULL, dir);
244*49cdfc7eSAndroid Build Coastguard Worker }
245*49cdfc7eSAndroid Build Coastguard Worker 
tst_dir_is_empty(const char * name,int verbose)246*49cdfc7eSAndroid Build Coastguard Worker static inline int tst_dir_is_empty(const char *name, int verbose)
247*49cdfc7eSAndroid Build Coastguard Worker {
248*49cdfc7eSAndroid Build Coastguard Worker 	return tst_dir_is_empty_(NULL, name, verbose);
249*49cdfc7eSAndroid Build Coastguard Worker }
250*49cdfc7eSAndroid Build Coastguard Worker #else
tst_fs_type(void (* cleanup)(void),const char * path)251*49cdfc7eSAndroid Build Coastguard Worker static inline long tst_fs_type(void (*cleanup)(void), const char *path)
252*49cdfc7eSAndroid Build Coastguard Worker {
253*49cdfc7eSAndroid Build Coastguard Worker 	return tst_fs_type_(cleanup, path);
254*49cdfc7eSAndroid Build Coastguard Worker }
255*49cdfc7eSAndroid Build Coastguard Worker 
tst_fs_has_free(void (* cleanup)(void),const char * path,uint64_t size,unsigned int mult)256*49cdfc7eSAndroid Build Coastguard Worker static inline int tst_fs_has_free(void (*cleanup)(void), const char *path,
257*49cdfc7eSAndroid Build Coastguard Worker 				  uint64_t size, unsigned int mult)
258*49cdfc7eSAndroid Build Coastguard Worker {
259*49cdfc7eSAndroid Build Coastguard Worker 	return tst_fs_has_free_(cleanup, path, size, mult);
260*49cdfc7eSAndroid Build Coastguard Worker }
261*49cdfc7eSAndroid Build Coastguard Worker 
tst_fs_fill_hardlinks(void (* cleanup)(void),const char * dir)262*49cdfc7eSAndroid Build Coastguard Worker static inline int tst_fs_fill_hardlinks(void (*cleanup)(void), const char *dir)
263*49cdfc7eSAndroid Build Coastguard Worker {
264*49cdfc7eSAndroid Build Coastguard Worker 	return tst_fs_fill_hardlinks_(cleanup, dir);
265*49cdfc7eSAndroid Build Coastguard Worker }
266*49cdfc7eSAndroid Build Coastguard Worker 
tst_fs_fill_subdirs(void (* cleanup)(void),const char * dir)267*49cdfc7eSAndroid Build Coastguard Worker static inline int tst_fs_fill_subdirs(void (*cleanup)(void), const char *dir)
268*49cdfc7eSAndroid Build Coastguard Worker {
269*49cdfc7eSAndroid Build Coastguard Worker 	return tst_fs_fill_subdirs_(cleanup, dir);
270*49cdfc7eSAndroid Build Coastguard Worker }
271*49cdfc7eSAndroid Build Coastguard Worker 
tst_dir_is_empty(void (* cleanup)(void),const char * name,int verbose)272*49cdfc7eSAndroid Build Coastguard Worker static inline int tst_dir_is_empty(void (*cleanup)(void), const char *name, int verbose)
273*49cdfc7eSAndroid Build Coastguard Worker {
274*49cdfc7eSAndroid Build Coastguard Worker 	return tst_dir_is_empty_(cleanup, name, verbose);
275*49cdfc7eSAndroid Build Coastguard Worker }
276*49cdfc7eSAndroid Build Coastguard Worker #endif
277*49cdfc7eSAndroid Build Coastguard Worker 
278*49cdfc7eSAndroid Build Coastguard Worker #endif	/* TST_FS_H__ */
279