Lines Matching refs:path
36 static int make_test_file(char path[PATH_MAX], const char *contents) in make_test_file()
41 strcpy(path, TEMPL); in make_test_file()
42 fd = mkstemp(path); in make_test_file()
50 unlink(path); in make_test_file()
57 static int setup_test(char path[PATH_MAX], const char *contents, in setup_test()
60 if (make_test_file(path, contents)) in setup_test()
63 io->fd = open(path, O_RDONLY); in setup_test()
65 pr_debug("Failed to open '%s'\n", path); in setup_test()
66 unlink(path); in setup_test()
73 unlink(path); in setup_test()
80 static void cleanup_test(char path[PATH_MAX], struct io *io) in cleanup_test()
84 unlink(path); in cleanup_test()
89 char path[PATH_MAX]; in do_test_get_char() local
94 if (setup_test(path, test_string, buf_size, &io)) in do_test_get_char()
107 cleanup_test(path, &io); in do_test_get_char()
136 char path[PATH_MAX]; in do_test_get_hex() local
141 if (setup_test(path, test_string, 4, &io)) in do_test_get_hex()
158 cleanup_test(path, &io); in do_test_get_hex()
217 char path[PATH_MAX]; in do_test_get_dec() local
222 if (setup_test(path, test_string, 4, &io)) in do_test_get_dec()
239 cleanup_test(path, &io); in do_test_get_dec()