Skip to content

Commit 2c577f2

Browse files
committed
cleanup: changing FILE_PRINTF to SAFE_FILE_PRINTF
SAFE_MACROS() used in cleanup do not exit the test anymore since: commit 6440c5d (newlib: Allow SAFE_MACROS to be called from cleanup) Signed-off-by: Li Wang <[email protected]> Reviewed-by: Petr Vorel <[email protected]>
1 parent 0c5a950 commit 2c577f2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ static void cleanup(void)
8484
rm_shm(shm_id_arr[i]);
8585

8686
if (orig_shmmni != -1)
87-
FILE_PRINTF(PATH_SHMMNI, "%ld", orig_shmmni);
87+
SAFE_FILE_PRINTF(PATH_SHMMNI, "%ld", orig_shmmni);
8888
}
8989

9090
static struct tst_test test = {

testcases/kernel/syscalls/fcntl/fcntl33.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ static void cleanup(void)
209209
SAFE_CLOSE(fd);
210210

211211
/* Restore the lease-break-time. */
212-
FILE_PRINTF(PATH_LS_BRK_T, "%d", ls_brk_t);
212+
SAFE_FILE_PRINTF(PATH_LS_BRK_T, "%d", ls_brk_t);
213213
}
214214

215215
static struct tst_test test = {

testcases/kernel/syscalls/readahead/readahead02.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ static void setup_readahead_length(void)
352352
/* raise bdi limit as much as kernel allows */
353353
ra_new_limit = testfile_size / 1024;
354354
while (ra_new_limit > pagesize / 1024) {
355-
FILE_PRINTF(sys_bdi_ra_path, "%d", ra_new_limit);
355+
SAFE_FILE_PRINTF(sys_bdi_ra_path, "%d", ra_new_limit);
356356
SAFE_FILE_SCANF(sys_bdi_ra_path, "%d", &ra_limit);
357357

358358
if (ra_limit == ra_new_limit) {

0 commit comments

Comments
 (0)