Home
last modified time | relevance | path

Searched refs:cleanup_fn (Results 1 – 25 of 40) sorted by relevance

12

/external/ltp/include/old/
Dsafe_macros.h23 #define SAFE_BASENAME(cleanup_fn, path) \ argument
24 safe_basename(__FILE__, __LINE__, (cleanup_fn), (path))
26 #define SAFE_CHDIR(cleanup_fn, path) \ argument
27 safe_chdir(__FILE__, __LINE__, (cleanup_fn), (path))
29 #define SAFE_CLOSE(cleanup_fn, fd) ({ \ argument
30 int ret = safe_close(__FILE__, __LINE__, (cleanup_fn), (fd)); \
35 #define SAFE_CREAT(cleanup_fn, pathname, mode) \ argument
36 safe_creat(__FILE__, __LINE__, cleanup_fn, (pathname), (mode))
38 #define SAFE_DIRNAME(cleanup_fn, path) \ argument
39 safe_dirname(__FILE__, __LINE__, (cleanup_fn), (path))
[all …]
Dold_checkpoint.h40 #define TST_CHECKPOINT_INIT(cleanup_fn) \ argument
41 tst_checkpoint_init(__FILE__, __LINE__, cleanup_fn)
43 #define TST_SAFE_CHECKPOINT_WAIT(cleanup_fn, id) \ argument
44 tst_safe_checkpoint_wait(__FILE__, __LINE__, cleanup_fn, id, 0);
46 #define TST_SAFE_CHECKPOINT_WAIT2(cleanup_fn, id, msec_timeout) \ argument
47 tst_safe_checkpoint_wait(__FILE__, __LINE__, cleanup_fn, id, msec_timeout);
49 #define TST_SAFE_CHECKPOINT_WAKE(cleanup_fn, id) \ argument
50 tst_safe_checkpoint_wake(__FILE__, __LINE__, cleanup_fn, id, 1);
52 #define TST_SAFE_CHECKPOINT_WAKE2(cleanup_fn, id, nr_wake) \ argument
53 tst_safe_checkpoint_wake(__FILE__, __LINE__, cleanup_fn, id, nr_wake);
[all …]
Dold_safe_file_ops.h37 #define SAFE_FILE_SCANF(cleanup_fn, path, fmt, ...) \ argument
38 safe_file_scanf(__FILE__, __LINE__, (cleanup_fn), \
41 #define FILE_LINES_SCANF(cleanup_fn, path, fmt, ...) \ argument
42 file_lines_scanf(__FILE__, __LINE__, (cleanup_fn), 0, \
45 #define SAFE_FILE_LINES_SCANF(cleanup_fn, path, fmt, ...) \ argument
46 file_lines_scanf(__FILE__, __LINE__, (cleanup_fn), 1, \
53 #define SAFE_FILE_PRINTF(cleanup_fn, path, fmt, ...) \ argument
54 safe_file_printf(__FILE__, __LINE__, (cleanup_fn), \
57 #define SAFE_CP(cleanup_fn, src, dst) \ argument
58 safe_cp(__FILE__, __LINE__, (cleanup_fn), (src), (dst))
[all …]
Dold_safe_net.h30 #define SAFE_SOCKET(cleanup_fn, domain, type, protocol) \ argument
31 safe_socket(__FILE__, __LINE__, (cleanup_fn), domain, type, protocol)
33 #define SAFE_BIND(cleanup_fn, socket, address, address_len) \ argument
34 safe_bind(__FILE__, __LINE__, (cleanup_fn), socket, address, \
37 #define SAFE_LISTEN(cleanup_fn, socket, backlog) \ argument
38 safe_listen(__FILE__, __LINE__, (cleanup_fn), socket, backlog)
40 #define SAFE_CONNECT(cleanup_fn, sockfd, addr, addrlen) \ argument
41 safe_connect(__FILE__, __LINE__, (cleanup_fn), sockfd, addr, addrlen)
43 #define SAFE_GETSOCKNAME(cleanup_fn, sockfd, addr, addrlen) \ argument
44 safe_getsockname(__FILE__, __LINE__, (cleanup_fn), sockfd, addr, \
Dold_safe_stdio.h25 #define SAFE_FOPEN(cleanup_fn, path, mode) \ argument
26 safe_fopen(__FILE__, __LINE__, cleanup_fn, path, mode)
28 #define SAFE_FCLOSE(cleanup_fn, f) \ argument
29 safe_fclose(__FILE__, __LINE__, cleanup_fn, f)
31 #define SAFE_ASPRINTF(cleanup_fn, strp, fmt, ...) \ argument
32 safe_asprintf(__FILE__, __LINE__, cleanup_fn, strp, fmt, __VA_ARGS__)
34 #define SAFE_POPEN(cleanup_fn, command, type) \ argument
35 safe_popen(__FILE__, __LINE__, cleanup_fn, command, type)
Dold_module.h47 void tst_module_exist(void (cleanup_fn)(void), const char *mod_name,
61 void tst_module_load(void (cleanup_fn)(void),
70 void tst_module_unload(void (cleanup_fn)(void), const char *mod_name);
/external/ltp/include/
Dsafe_macros_fn.h28 void (*cleanup_fn)(void), char *path);
31 void (*cleanup_fn)(void), const char *path);
34 void (*cleanup_fn)(void), int fildes);
37 void (*cleanup_fn)(void), const char *pathname, mode_t mode);
40 void (*cleanup_fn)(void), char *path);
43 void (*cleanup_fn)(void), char *buf, size_t size);
46 void (*cleanup_fn)(void), const char *name);
49 void (*cleanup_fn)(void), int who, struct rusage *usage);
52 void (*cleanup_fn)(void), size_t size);
55 void (*cleanup_fn)(void), const char *pathname, mode_t mode);
[all …]
Dtst_pid.h26 pid_t tst_get_unused_pid_(void (*cleanup_fn)(void));
32 int tst_get_free_pids_(void (*cleanup_fn)(void));
45 static inline pid_t tst_get_unused_pid(void (*cleanup_fn)(void)) in tst_get_unused_pid()
47 return tst_get_unused_pid_(cleanup_fn); in tst_get_unused_pid()
50 static inline int tst_get_free_pids(void (*cleanup_fn)(void)) in tst_get_free_pids()
52 return tst_get_free_pids_(cleanup_fn); in tst_get_free_pids()
Dtst_cmd.h34 int tst_run_cmd_fds_(void (cleanup_fn)(void),
49 int tst_run_cmd_(void (cleanup_fn)(void),
74 static inline int tst_run_cmd_fds(void (cleanup_fn)(void), in tst_run_cmd_fds()
80 return tst_run_cmd_fds_(cleanup_fn, argv, in tst_run_cmd_fds()
84 static inline int tst_run_cmd(void (cleanup_fn)(void), in tst_run_cmd()
90 return tst_run_cmd_(cleanup_fn, argv, in tst_run_cmd()
Dsafe_file_ops_fn.h34 void (*cleanup_fn)(void),
39 void (*cleanup_fn)(void), int strict,
51 void (*cleanup_fn)(void),
59 void (*cleanup_fn)(void),
75 void (*cleanup_fn)(void),
Dsafe_net_fn.h31 int safe_socket(const char *file, const int lineno, void (cleanup_fn)(void),
44 int safe_bind(const char *file, const int lineno, void (cleanup_fn)(void),
48 int safe_listen(const char *file, const int lineno, void (cleanup_fn)(void),
51 int safe_connect(const char *file, const int lineno, void (cleanup_fn)(void),
55 void (cleanup_fn)(void), int sockfd, struct sockaddr *addr,
Dsafe_stdio_fn.h23 FILE *safe_fopen(const char *file, const int lineno, void (cleanup_fn)(void),
26 int safe_fclose(const char *file, const int lineno, void (cleanup_fn)(void),
29 int safe_asprintf(const char *file, const int lineno, void (cleanup_fn)(void),
32 FILE *safe_popen(const char *file, const int lineno, void (cleanup_fn)(void),
/external/ltp/lib/
Dsafe_macros.c22 void (*cleanup_fn) (void), char *path) in safe_basename()
28 tst_brkm(TBROK | TERRNO, cleanup_fn, in safe_basename()
37 safe_chdir(const char *file, const int lineno, void (*cleanup_fn) (void), in safe_chdir()
44 tst_brkm(TBROK | TERRNO, cleanup_fn, in safe_chdir()
53 safe_close(const char *file, const int lineno, void (*cleanup_fn) (void), in safe_close()
60 tst_brkm(TBROK | TERRNO, cleanup_fn, in safe_close()
69 safe_creat(const char *file, const int lineno, void (*cleanup_fn) (void), in safe_creat()
76 tst_brkm(TBROK | TERRNO, cleanup_fn, in safe_creat()
85 void (*cleanup_fn) (void), char *path) in safe_dirname()
91 tst_brkm(TBROK | TERRNO, cleanup_fn, in safe_dirname()
[all …]
Dtst_checkpoint.c40 void (*cleanup_fn)(void)) in tst_checkpoint_init()
46 tst_brkm(TBROK, cleanup_fn, in tst_checkpoint_init()
63 if (cleanup_fn && !tst_tmpdir_created()) { in tst_checkpoint_init()
64 tst_brkm(TBROK, cleanup_fn, in tst_checkpoint_init()
72 fd = SAFE_OPEN(cleanup_fn, "checkpoint_futex_base_file", in tst_checkpoint_init()
75 SAFE_FTRUNCATE(cleanup_fn, fd, page_size); in tst_checkpoint_init()
77 tst_futexes = SAFE_MMAP(cleanup_fn, NULL, page_size, in tst_checkpoint_init()
82 SAFE_CLOSE(cleanup_fn, fd); in tst_checkpoint_init()
131 void (*cleanup_fn)(void), unsigned int id, in tst_safe_checkpoint_wait()
142 tst_brkm(TBROK | TERRNO, cleanup_fn, in tst_safe_checkpoint_wait()
[all …]
Dsafe_file_ops.c132 void (*cleanup_fn) (void), in safe_file_scanf()
142 tst_brkm(TBROK | TERRNO, cleanup_fn, in safe_file_scanf()
155 tst_brkm(TBROK, cleanup_fn, in safe_file_scanf()
162 tst_brkm(TBROK, cleanup_fn, in safe_file_scanf()
169 tst_brkm(TBROK | TERRNO, cleanup_fn, in safe_file_scanf()
183 void (*cleanup_fn)(void), int strict, in file_lines_scanf()
193 tst_brkm(TBROK, cleanup_fn, "pattern is NULL, %s:%d", in file_lines_scanf()
200 tst_brkm(TBROK | TERRNO, cleanup_fn, in file_lines_scanf()
219 tst_brkm(TBROK, cleanup_fn, "Expected %i conversions got %i" in file_lines_scanf()
272 void (*cleanup_fn) (void), in safe_file_printf()
[all …]
Dsafe_stdio.c26 FILE *safe_fopen(const char *file, const int lineno, void (cleanup_fn)(void), in safe_fopen()
32 tst_brkm(TBROK | TERRNO, cleanup_fn, in safe_fopen()
40 int safe_fclose(const char *file, const int lineno, void (cleanup_fn)(void), in safe_fclose()
48 tst_brkm(TBROK | TERRNO, cleanup_fn, in safe_fclose()
55 int safe_asprintf(const char *file, const int lineno, void (cleanup_fn)(void), in safe_asprintf()
66 tst_brkm(TBROK | TERRNO, cleanup_fn, in safe_asprintf()
73 FILE *safe_popen(const char *file, const int lineno, void (cleanup_fn)(void), in safe_popen()
84 tst_brkm(TBROK | TERRNO, cleanup_fn, in safe_popen()
88 tst_brkm(TBROK, cleanup_fn, in safe_popen()
Dtst_module.c31 void tst_module_exists(void (cleanup_fn)(void), in tst_module_exists()
47 tst_brkm(TBROK | TERRNO, cleanup_fn, in tst_module_exists()
59 tst_brkm(TBROK | TERRNO, cleanup_fn, in tst_module_exists()
69 tst_brkm(TCONF, cleanup_fn, "Failed to find module '%s'", in tst_module_exists()
80 void tst_module_load(void (cleanup_fn)(void), in tst_module_load()
84 tst_module_exists(cleanup_fn, mod_name, &mod_path); in tst_module_load()
100 tst_run_cmd(cleanup_fn, mod_argv, NULL, NULL, 0); in tst_module_load()
104 void tst_module_unload(void (cleanup_fn)(void), const char *mod_name) in tst_module_unload()
120 tst_brkm(TBROK, cleanup_fn, in tst_module_unload()
Dtst_mkfs.c24 void tst_mkfs_(const char *file, const int lineno, void (cleanup_fn)(void), in tst_mkfs_()
34 tst_brkm(TBROK, cleanup_fn, in tst_mkfs_()
40 tst_brkm(TBROK, cleanup_fn, in tst_mkfs_()
52 tst_brkm(TBROK, cleanup_fn, in tst_mkfs_()
70 tst_brkm(TBROK, cleanup_fn, in tst_mkfs_()
80 ret = tst_run_cmd(cleanup_fn, argv, "/dev/null", NULL, 1); in tst_mkfs_()
86 tst_brkm(TCONF, cleanup_fn, in tst_mkfs_()
89 tst_brkm(TBROK, cleanup_fn, in tst_mkfs_()
Dtst_resource.c83 void (*cleanup_fn)(void), const char *path, in file_copy()
95 safe_cp(file, lineno, cleanup_fn, buf, dest); in file_copy()
101 void (*cleanup_fn)(void), in tst_resource_copy()
105 tst_brkm(TBROK, cleanup_fn, in tst_resource_copy()
119 if (file_copy(file, lineno, cleanup_fn, dataroot, filename, dest)) in tst_resource_copy()
127 if (file_copy(file, lineno, cleanup_fn, buf, filename, dest)) in tst_resource_copy()
133 if (file_copy(file, lineno, cleanup_fn, startwd, filename, dest)) in tst_resource_copy()
136 tst_brkm(TBROK, cleanup_fn, "Failed to copy resource '%s' at %s:%d", in tst_resource_copy()
Dtst_run_cmd.c34 int tst_run_cmd_fds_(void (cleanup_fn)(void), in tst_run_cmd_fds_()
43 tst_brkm(TBROK, cleanup_fn, in tst_run_cmd_fds_()
60 tst_brkm(TBROK | TERRNO, cleanup_fn, "vfork failed at %s:%d", in tst_run_cmd_fds_()
85 tst_brkm(TBROK | TERRNO, cleanup_fn, "waitpid failed at %s:%d", in tst_run_cmd_fds_()
93 tst_brkm(TBROK, cleanup_fn, "failed to exec cmd '%s' at %s:%d", in tst_run_cmd_fds_()
101 tst_brkm(TBROK, cleanup_fn, in tst_run_cmd_fds_()
110 int tst_run_cmd_(void (cleanup_fn)(void), in tst_run_cmd_()
140 rc = tst_run_cmd_fds(cleanup_fn, argv, stdout_fd, stderr_fd, in tst_run_cmd_()
Dsafe_net.c84 int safe_socket(const char *file, const int lineno, void (cleanup_fn)(void), in safe_socket()
92 tst_brkm(TBROK | TERRNO, cleanup_fn, in safe_socket()
152 int safe_bind(const char *file, const int lineno, void (cleanup_fn)(void), in safe_bind()
164 tst_brkm(TBROK | TERRNO, cleanup_fn, in safe_bind()
180 tst_brkm(TBROK | TERRNO, cleanup_fn, in safe_bind()
188 int safe_listen(const char *file, const int lineno, void (cleanup_fn)(void), in safe_listen()
196 tst_brkm(TBROK | TERRNO, cleanup_fn, in safe_listen()
204 int safe_connect(const char *file, const int lineno, void (cleanup_fn)(void), in safe_connect()
213 tst_brkm(TBROK | TERRNO, cleanup_fn, in safe_connect()
223 void (cleanup_fn)(void), int sockfd, struct sockaddr *addr, in safe_getsockname()
[all …]
Dtst_net.c29 unsigned short tst_get_unused_port(void (cleanup_fn)(void), in tst_get_unused_port()
55 tst_brkm(TBROK, cleanup_fn, in tst_get_unused_port()
62 tst_brkm(TBROK | TERRNO, cleanup_fn, "socket failed"); in tst_get_unused_port()
67 tst_brkm(TBROK | TERRNO, cleanup_fn, "bind failed"); in tst_get_unused_port()
72 tst_brkm(TBROK | TERRNO, cleanup_fn, "getsockname failed"); in tst_get_unused_port()
77 tst_brkm(TBROK | TERRNO, cleanup_fn, "close failed"); in tst_get_unused_port()
Dtst_dir_is_empty.c28 int tst_dir_is_empty_(void (cleanup_fn)(void), const char *name, int verbose) in tst_dir_is_empty_()
31 DIR *dir = SAFE_OPENDIR(cleanup_fn, name); in tst_dir_is_empty_()
34 while ((entry = SAFE_READDIR(cleanup_fn, dir)) != NULL) { in tst_dir_is_empty_()
46 SAFE_CLOSEDIR(cleanup_fn, dir); in tst_dir_is_empty_()
Dtst_pid.c30 pid_t tst_get_unused_pid_(void (*cleanup_fn) (void)) in tst_get_unused_pid_()
34 SAFE_FILE_SCANF(cleanup_fn, PID_MAX_PATH, "%d", &pid); in tst_get_unused_pid_()
39 int tst_get_free_pids_(void (*cleanup_fn) (void)) in tst_get_free_pids_()
58 SAFE_FILE_SCANF(cleanup_fn, PID_MAX_PATH, "%d", &max_pids); in tst_get_free_pids_()
/external/ltp/testcases/kernel/mem/hugetlb/lib/
Dhugetlb.c52 int getipckey(void (*cleanup_fn) (void)) in getipckey()
63 tst_brkm(TBROK | TERRNO, cleanup_fn, "getcwd(curdir)"); in getipckey()
82 tst_brkm(TBROK | TERRNO, cleanup_fn, "ftok"); in getipckey()
90 int getuserid(void (*cleanup_fn) (void), char *user) in getuserid()
96 tst_brkm(TBROK | TERRNO, cleanup_fn, "getpwnam"); in getuserid()

12