1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* 3 * Copyright (c) 2014 Red Hat, Inc. 4 * Copyright (C) 2021 SUSE LLC Andrea Cervesato <andrea.cervesato@suse.com> 5 */ 6 7 #ifndef COMMON_H 8 #define COMMON_H 9 10 #include "tst_test.h" 11 12 #define DIRA "LTP_DIR_A" 13 #define DIRB "LTP_DIR_B" 14 umount_folders(void)15static void umount_folders(void) 16 { 17 if (tst_is_mounted(DIRA)) 18 SAFE_UMOUNT(DIRA); 19 20 if (tst_is_mounted(DIRB)) 21 SAFE_UMOUNT(DIRB); 22 } 23 create_folders(void)24static void create_folders(void) 25 { 26 SAFE_MKDIR(DIRA, 0777); 27 SAFE_MKDIR(DIRB, 0777); 28 SAFE_TOUCH(DIRA "/A", 0, NULL); 29 SAFE_TOUCH(DIRB "/B", 0, NULL); 30 } 31 32 #endif 33