Home
last modified time | relevance | path

Searched refs:cleanup (Results 1 – 25 of 2593) sorted by relevance

12345678910>>...104

/external/ltp/testcases/kernel/syscalls/utils/
Dcompat_16.h46 # define LTP_CREATE_SYSCALL(sys_name, cleanup, ...) \ argument
50 tst_brkm(TCONF, cleanup, \
55 # define LTP_CREATE_SYSCALL(sys_name, cleanup, ...) \ argument
56 (void) cleanup; \
60 #define UID16_CHECK(uid, sys_name, cleanup) \ argument
62 tst_brkm(TBROK, cleanup, \
67 #define GID16_CHECK(gid, sys_name, cleanup) \ argument
69 tst_brkm(TBROK, cleanup, \
75 int SETGROUPS(void (cleanup)(void), size_t gidsetsize, GID_T *list) in SETGROUPS()
77 LTP_CREATE_SYSCALL(setgroups, cleanup, gidsetsize, list); in SETGROUPS()
[all …]
/external/ltp/testcases/kernel/syscalls/open/
Dopen14.c39 static void cleanup(void) in cleanup() function
56 tst_brkm(TCONF, cleanup, "O_TMPFILE not supported"); in setup()
58 tst_brkm(TBROK | TERRNO, cleanup, "open() failed"); in setup()
61 SAFE_CLOSE(cleanup, fd); in setup()
69 SAFE_WRITE(cleanup, 1, fd, buf, size); in write_file()
78 fd = SAFE_OPEN(cleanup, ".", O_TMPFILE | O_RDWR, 0600); in test01()
83 SAFE_FSTAT(cleanup, fd, &st); in test01()
89 SAFE_CLOSE(cleanup, fd); in test01()
94 if (!tst_dir_is_empty(cleanup, ".", 1)) in test01()
95 tst_brkm(TFAIL, cleanup, "found a file, this is not expected"); in test01()
[all …]
Dopen12.c48 static void cleanup(void);
74 cleanup(); in main()
84 tst_sig(FORK, DEF_HANDLER, cleanup); in setup()
88 SAFE_MKDIR(cleanup, MNTPOINT, DIR_MODE); in setup()
90 if (tst_path_has_mnt_flags(cleanup, NULL, mount_flags)) { in setup()
102 device = tst_acquire_device(cleanup); in setup()
110 tst_mkfs(cleanup, device, fs_type, NULL, NULL); in setup()
112 SAFE_MOUNT(cleanup, device, MNTPOINT, fs_type, MS_STRICTATIME, NULL); in setup()
117 SAFE_FILE_PRINTF(cleanup, TEST_FILE, TEST_FILE); in setup()
131 len1 = SAFE_LSEEK(cleanup, TEST_RETURN, 0, SEEK_CUR); in test_append()
[all …]
/external/ltp/testcases/kernel/syscalls/openat/
Dopenat03.c40 static void cleanup(void) in cleanup() function
57 tst_brkm(TCONF, cleanup, "O_TMPFILE not supported"); in setup()
59 tst_brkm(TBROK | TERRNO, cleanup, "openat() failed"); in setup()
62 SAFE_CLOSE(cleanup, fd); in setup()
72 tst_brkm(TBROK | TERRNO, cleanup, "openat() failed"); in openat_tmp()
80 SAFE_WRITE(cleanup, 1, fd, buf, size); in write_file()
94 SAFE_FSTAT(cleanup, fd, &st); in test01()
100 SAFE_CLOSE(cleanup, fd); in test01()
105 if (!tst_dir_is_empty(cleanup, ".", 1)) in test01()
106 tst_brkm(TFAIL, cleanup, "found a file, this is not expected"); in test01()
[all …]
Dopenat02.c63 static void cleanup(void);
100 cleanup(); in main()
108 tst_sig(FORK, DEF_HANDLER, cleanup); in setup()
112 SAFE_FILE_PRINTF(cleanup, TEST_FILE, "test file"); in setup()
114 SAFE_SYMLINK(cleanup, TEST_FILE, SFILE); in setup()
121 SAFE_FILE_PRINTF(cleanup, TEST_FILE, "test file"); in testfunc_append()
130 SAFE_WRITE(cleanup, 1, TEST_RETURN, STR, sizeof(STR) - 1); in testfunc_append()
132 file_offset = SAFE_LSEEK(cleanup, TEST_RETURN, 0, SEEK_CUR); in testfunc_append()
139 SAFE_CLOSE(cleanup, TEST_RETURN); in testfunc_append()
166 tst_brkm(TBROK | TERRNO, cleanup, "fork() failed"); in testfunc_cloexec()
[all …]
/external/ltp/testcases/kernel/syscalls/fanotify/
Dfanotify01.c56 static void cleanup(void);
82 tst_brkm(TBROK | TERRNO, cleanup, in main()
91 fd = SAFE_OPEN(cleanup, fname, O_RDONLY); in main()
95 SAFE_READ(cleanup, 0, fd, buf, BUF_SIZE); in main()
99 SAFE_CLOSE(cleanup, fd); in main()
107 ret = SAFE_READ(cleanup, 0, fd_notify, event_buf, EVENT_BUF_LEN); in main()
110 fd = SAFE_OPEN(cleanup, fname, O_RDWR | O_CREAT, 0700); in main()
114 SAFE_WRITE(cleanup, 1, fd, fname, strlen(fname)); in main()
118 SAFE_CLOSE(cleanup, fd); in main()
125 ret = SAFE_READ(cleanup, 0, fd_notify, event_buf + len, in main()
[all …]
Dfanotify02.c56 static void cleanup(void);
84 tst_brkm(TBROK | TERRNO, cleanup, in main()
94 fd = SAFE_OPEN(cleanup, fname, O_RDWR | O_CREAT, 0700); in main()
98 SAFE_WRITE(cleanup, 1, fd, fname, strlen(fname)); in main()
102 SAFE_CLOSE(cleanup, fd); in main()
110 ret = SAFE_READ(cleanup, 0, fd_notify, event_buf, in main()
114 fd = SAFE_OPEN(cleanup, fname, O_RDONLY); in main()
118 SAFE_READ(cleanup, 0, fd, buf, BUF_SIZE); in main()
122 SAFE_CLOSE(cleanup, fd); in main()
129 ret = SAFE_READ(cleanup, 0, fd_notify, event_buf + len, in main()
[all …]
/external/ltp/testcases/kernel/syscalls/getrusage/
Dgetrusage03.c66 static void cleanup(void);
90 cleanup(); in main()
100 SAFE_GETRUSAGE(cleanup, RUSAGE_SELF, &ru); in inherit_fork()
105 tst_brkm(TBROK | TERRNO, cleanup, "fork #1"); in inherit_fork()
108 SAFE_GETRUSAGE(cleanup, RUSAGE_SELF, &ru); in inherit_fork()
116 tst_brkm(TBROK | TERRNO, cleanup, "waitpid"); in inherit_fork()
127 SAFE_GETRUSAGE(cleanup, RUSAGE_CHILDREN, &ru); in inherit_fork2()
136 tst_brkm(TBROK | TERRNO, cleanup, "fork #2"); in inherit_fork2()
138 SAFE_GETRUSAGE(cleanup, RUSAGE_CHILDREN, &ru); in inherit_fork2()
146 tst_brkm(TBROK | TERRNO, cleanup, "waitpid"); in inherit_fork2()
[all …]
/external/llvm/test/CodeGen/PowerPC/
DBoolRetToIntTest.ll17 br i1 %cmp.4, label %cleanup, label %for.body.preheader
24 br i1 %cmp, label %cleanup.loopexit, label %for.body
31 br i1 %call, label %cleanup.loopexit, label %for.cond
33 cleanup.loopexit: ; preds = %for.body, %for.cond
35 %cleanup.dest.slot.0.ph = phi i1 [ true, %for.body ], [ false, %for.cond ]
36 br label %cleanup
38 cleanup: ; preds = %cleanup.loopexit, %entry
39 ; CHECK: = phi i32 [ 0, %entry ], [ [[PHI]], %cleanup.loopexit ]
40 %cleanup.dest.slot.0 = phi i1 [ false, %entry ], [ %cleanup.dest.slot.0.ph, %cleanup.loopexit ]
43 ret i1 %cleanup.dest.slot.0
[all …]
/external/ltp/testcases/kernel/syscalls/mlock/
Dmlock02.c49 static void cleanup(void);
77 cleanup(); in main()
85 tst_sig(NOFORK, DEF_HANDLER, cleanup); in setup()
89 ltpuser = SAFE_GETPWNAM(cleanup, "nobody"); in setup()
93 SAFE_GETRLIMIT(cleanup, RLIMIT_MEMLOCK, &original); in setup()
116 SAFE_SETRLIMIT(cleanup, RLIMIT_MEMLOCK, &rl); in test_enomem1()
119 addr = SAFE_MMAP(cleanup, NULL, len, PROT_READ, in test_enomem1()
122 SAFE_MUNMAP(cleanup, addr, len); in test_enomem1()
141 SAFE_SETRLIMIT(cleanup, RLIMIT_MEMLOCK, &rl); in test_enomem2()
143 addr = SAFE_MMAP(cleanup, NULL, len, PROT_READ, in test_enomem2()
[all …]
/external/selinux/libsemanage/src/
Ddirect_api.c616 goto cleanup; in semanage_direct_update_user_extra()
629 goto cleanup; in semanage_direct_update_user_extra()
633 goto cleanup; in semanage_direct_update_user_extra()
642 goto cleanup; in semanage_direct_update_user_extra()
646 goto cleanup; in semanage_direct_update_user_extra()
654 cleanup: in semanage_direct_update_user_extra()
671 goto cleanup; in semanage_direct_update_seuser()
684 goto cleanup; in semanage_direct_update_seuser()
688 goto cleanup; in semanage_direct_update_seuser()
697 goto cleanup; in semanage_direct_update_seuser()
[all …]
/external/ltp/testcases/kernel/syscalls/utimes/
Dutimes01.c88 static void cleanup(void);
109 cleanup(); in main()
120 tst_sig(NOFORK, DEF_HANDLER, cleanup); in setup()
127 device = tst_acquire_device(cleanup); in setup()
130 tst_brkm(TCONF, cleanup, "Failed to obtain block device"); in setup()
132 SAFE_TOUCH(cleanup, TESTFILE1, FILE_MODE, NULL); in setup()
133 ltpuser = SAFE_GETPWNAM(cleanup, LTPUSER1); in setup()
134 SAFE_CHOWN(cleanup, TESTFILE1, ltpuser->pw_uid, in setup()
137 SAFE_TOUCH(cleanup, TESTFILE2, FILE_MODE, NULL); in setup()
138 ltpuser = SAFE_GETPWNAM(cleanup, LTPUSER2); in setup()
[all …]
/external/ltp/testcases/kernel/containers/userns/
Duserns06.c93 static void cleanup(void) in cleanup() function
103 TST_RESOURCE_COPY(cleanup, "userns06_capcheck", NULL); in setup()
128 tst_brkm(TBROK | TERRNO, cleanup, in main()
134 tst_brkm(TBROK | TERRNO, cleanup, in main()
139 fd = SAFE_OPEN(cleanup, path, O_WRONLY, 0644); in main()
140 SAFE_WRITE(cleanup, 1, fd, "deny", 4); in main()
141 SAFE_CLOSE(cleanup, fd); in main()
144 fd = SAFE_OPEN(cleanup, path, O_WRONLY, 0644); in main()
145 SAFE_WRITE(cleanup, 1, fd, "deny", 4); in main()
146 SAFE_CLOSE(cleanup, fd); in main()
[all …]
Duserns03.c149 static void cleanup(void) in cleanup() function
181 tst_brkm(TBROK | TERRNO, cleanup, in main()
187 tst_brkm(TBROK | TERRNO, cleanup, in main()
192 fd = SAFE_OPEN(cleanup, path, O_WRONLY, 0644); in main()
193 SAFE_WRITE(cleanup, 1, fd, "deny", 4); in main()
194 SAFE_CLOSE(cleanup, fd); in main()
203 fd = SAFE_OPEN(cleanup, path, O_WRONLY, 0644); in main()
207 tst_brkm(TBROK | TERRNO, cleanup, in main()
210 tst_brkm(TBROK | TERRNO, cleanup, in main()
213 SAFE_CLOSE(cleanup, fd); in main()
[all …]
/external/ltp/testcases/kernel/syscalls/chown/
Dchown04.c94 static void cleanup(void);
107 UID16_CHECK((user_id = geteuid()), "chown", cleanup) in main()
108 GID16_CHECK((group_id = getegid()), "chown", cleanup) in main()
114 TEST(CHOWN(cleanup, tc[i].pathname, user_id, group_id)); in main()
132 cleanup(); in main()
142 tst_sig(FORK, DEF_HANDLER, cleanup); in setup()
148 device = tst_acquire_device(cleanup); in setup()
150 tst_brkm(TCONF, cleanup, "Failed to obtain block device"); in setup()
152 tst_mkfs(cleanup, device, fs_type, NULL, NULL); in setup()
161 tst_brkm(TBROK | TERRNO, cleanup, "mmap failed"); in setup()
[all …]
/external/ltp/testcases/kernel/syscalls/sendfile/
Dsendfile06.c55 static void cleanup(void);
74 in_fd = SAFE_OPEN(cleanup, IN_FILE, O_RDONLY); in do_sendfile()
78 tst_brkm(TBROK, cleanup, in do_sendfile()
89 SAFE_KILL(cleanup, child_pid, SIGKILL); in do_sendfile()
96 SAFE_KILL(cleanup, child_pid, SIGKILL); in do_sendfile()
103 SAFE_CLOSE(cleanup, in_fd); in do_sendfile()
104 SAFE_CLOSE(cleanup, out_fd); in do_sendfile()
105 SAFE_CLOSE(cleanup, sockfd); in do_sendfile()
132 tst_sig(FORK, DEF_HANDLER, cleanup); in setup()
138 fd = SAFE_CREAT(cleanup, IN_FILE, 0600); in setup()
[all …]
/external/clang/test/Sema/
Dattr-cleanup.c5 extern int g1 __attribute((cleanup(c1))); // expected-warning {{'cleanup' attribute ignored}}
6 int g2 __attribute((cleanup(c1))); // expected-warning {{'cleanup' attribute ignored}}
7 static int g3 __attribute((cleanup(c1))); // expected-warning {{'cleanup' attribute ignored}}
11 int v1 __attribute((cleanup)); // expected-error {{'cleanup' attribute takes one argument}} in t1()
12 … int v2 __attribute((cleanup(1, 2))); // expected-error {{'cleanup' attribute takes one argument}} in t1()
14 static int v3 __attribute((cleanup(c1))); // expected-warning {{'cleanup' attribute ignored}} in t1()
16 int v4 __attribute((cleanup(h))); // expected-error {{use of undeclared identifier 'h'}} in t1()
18 int v5 __attribute((cleanup(c1))); in t1()
19 … int v6 __attribute((cleanup(v3))); // expected-error {{'cleanup' argument 'v3' is not a function}} in t1()
31 …int v1 __attribute__((cleanup(c2))); // expected-error {{'cleanup' function 'c2' must take 1 param… in t2()
[all …]
/external/ltp/testcases/kernel/syscalls/tee/
Dtee01.c45 static void cleanup(void);
69 cleanup(); in main()
78 fd_out = SAFE_OPEN(cleanup, TESTFILE2, O_RDONLY); in check_file()
79 SAFE_READ(cleanup, 1, fd_out, teebuffer, TEST_BLOCK_SIZE); in check_file()
101 fd_in = SAFE_OPEN(cleanup, TESTFILE1, O_RDONLY); in tee_test()
102 fd_out = SAFE_OPEN(cleanup, TESTFILE2, O_WRONLY | O_CREAT | O_TRUNC, 0777); in tee_test()
104 SAFE_PIPE(cleanup, pipe1); in tee_test()
105 SAFE_PIPE(cleanup, pipe2); in tee_test()
109 tst_brkm(TBROK | TERRNO, cleanup, "splice(fd_in, pipe1) failed"); in tee_test()
113 tst_brkm(TBROK | TERRNO, cleanup, "tee() failed"); in tee_test()
[all …]
/external/ltp/testcases/kernel/syscalls/rename/
Drename11.c60 static void cleanup(void);
85 cleanup(); in main()
93 tst_sig(NOFORK, DEF_HANDLER, cleanup); in setup()
102 device = tst_acquire_device(cleanup); in setup()
105 tst_brkm(TCONF, cleanup, "Failed to obtain block device"); in setup()
107 tst_mkfs(cleanup, device, fs_type, NULL, NULL); in setup()
109 SAFE_MKDIR(cleanup, MNTPOINT, 0755); in setup()
111 tst_brkm(TBROK | TERRNO, cleanup, in setup()
115 SAFE_TOUCH(cleanup, TEST_EROFS, 0644, NULL); in setup()
117 SAFE_MKDIR(cleanup, TEST_EMLINK, 0755); in setup()
[all …]
/external/ltp/testcases/kernel/syscalls/mprotect/
Dmprotect02.c47 static void cleanup(void);
73 fd = SAFE_OPEN(cleanup, file1, O_RDWR | O_CREAT, 0777); in main()
85 SAFE_WRITE(cleanup, 1, fd, buf, bytes_to_write); in main()
90 addr = SAFE_MMAP(cleanup, 0, sizeof(buf), PROT_READ, in main()
94 tst_brkm(TBROK | TERRNO, cleanup, "fork #1 failed"); in main()
102 tst_brkm(TBROK | TERRNO, cleanup, "waitpid failed"); in main()
104 tst_brkm(TBROK, cleanup, "child exited abnormally " in main()
108 tst_brkm(TBROK, cleanup, in main()
114 tst_brkm(TBROK, cleanup, "got unexpected signal: %d", in main()
124 tst_brkm(TBROK | TERRNO, cleanup, in main()
[all …]
/external/ltp/testcases/kernel/syscalls/renameat/
Drenameat01.c106 static void cleanup(void);
127 cleanup(); in main()
145 tst_sig(NOFORK, DEF_HANDLER, cleanup); in setup()
150 device = tst_acquire_device(cleanup); in setup()
153 tst_brkm(TCONF, cleanup, "Failed to obtain block device"); in setup()
157 SAFE_TOUCH(cleanup, TESTFILE, FILEMODE, NULL); in setup()
159 SAFE_TOUCH(cleanup, TESTFILE2, FILEMODE, NULL); in setup()
165 SAFE_MKDIR(cleanup, TESTDIR, DIRMODE); in setup()
166 SAFE_TOUCH(cleanup, TESTFILE3, FILEMODE, NULL); in setup()
167 SAFE_MKDIR(cleanup, NEW_TESTDIR, DIRMODE); in setup()
[all …]
/external/ltp/testcases/kernel/syscalls/fallocate/
Dfallocate04.c58 static void cleanup(void) in cleanup() function
68 SAFE_FSTAT(cleanup, fd, &file_stat); in get_blocksize()
80 SAFE_FSTAT(cleanup, fd, &file_stat); in get_allocsize()
98 fd = SAFE_OPEN(cleanup, fname, O_RDWR | O_CREAT, 0700); in setup()
109 SAFE_LSEEK(cleanup, fd, 0, SEEK_SET); in check_file_data()
110 SAFE_READ(cleanup, 1, fd, rbuf, size); in check_file_data()
117 tst_brkm(TFAIL, cleanup, "not expected file data"); in check_file_data()
127 tst_brkm(TCONF, cleanup, "fallocate() not supported"); in test01()
128 tst_brkm(TFAIL | TERRNO, cleanup, "fallocate() failed"); in test01()
135 SAFE_WRITE(cleanup, 1, fd, buf, buf_size); in test01()
[all …]
/external/ltp/testcases/kernel/syscalls/chmod/
Dchmod06.c88 void (*cleanup)(void); member
107 static void cleanup(void);
128 if (tc[i].cleanup) in main()
129 tc[i].cleanup(); in main()
149 cleanup(); in main()
155 SAFE_SETEUID(cleanup, 0); in set_root()
160 SAFE_SETEUID(cleanup, nobody_uid); in set_nobody()
168 tst_sig(FORK, DEF_HANDLER, cleanup); in setup()
184 device = tst_acquire_device(cleanup); in setup()
187 tst_brkm(TCONF, cleanup, "Failed to obtain block device"); in setup()
[all …]
/external/ltp/testcases/kernel/syscalls/fchown/
Dfchown04.c72 static void cleanup(void);
91 cleanup(); in main()
107 device = tst_acquire_device(cleanup); in setup()
110 tst_brkm(TCONF, cleanup, "Failed to acquire device"); in setup()
112 tst_sig(NOFORK, DEF_HANDLER, cleanup); in setup()
114 fd1 = SAFE_OPEN(cleanup, "tfile_1", O_RDWR | O_CREAT, 0666); in setup()
116 tst_mkfs(cleanup, device, fs_type, NULL, NULL); in setup()
117 SAFE_MKDIR(cleanup, "mntpoint", DIR_MODE); in setup()
119 tst_brkm(TBROK | TERRNO, cleanup, in setup()
123 SAFE_TOUCH(cleanup, "mntpoint/tfile_3", 0644, NULL); in setup()
[all …]
/external/ltp/include/
Dtst_fs.h57 int tst_fs_has_free_(void (*cleanup)(void), const char *path,
83 long tst_fs_type_(void (*cleanup)(void), const char *path);
106 int tst_fs_fill_hardlinks_(void (*cleanup) (void), const char *dir);
125 int tst_fs_fill_subdirs_(void (*cleanup) (void), const char *dir);
131 int tst_dir_is_empty_(void (*cleanup)(void), const char *name, int verbose);
177 static inline long tst_fs_type(void (*cleanup)(void), const char *path) in tst_fs_type()
179 return tst_fs_type_(cleanup, path); in tst_fs_type()
182 static inline int tst_fs_has_free(void (*cleanup)(void), const char *path, in tst_fs_has_free()
185 return tst_fs_has_free_(cleanup, path, size, mult); in tst_fs_has_free()
188 static inline int tst_fs_fill_hardlinks(void (*cleanup)(void), const char *dir) in tst_fs_fill_hardlinks()
[all …]

12345678910>>...104