Lines Matching refs:path
37 static int make_test_file(char path[PATH_MAX], const char *contents) in make_test_file()
42 strcpy(path, TEMPL); in make_test_file()
43 fd = mkstemp(path); in make_test_file()
51 unlink(path); in make_test_file()
58 static int setup_test(char path[PATH_MAX], const char *contents, in setup_test()
61 if (make_test_file(path, contents)) in setup_test()
64 io->fd = open(path, O_RDONLY); in setup_test()
66 pr_debug("Failed to open '%s'\n", path); in setup_test()
67 unlink(path); in setup_test()
74 unlink(path); in setup_test()
81 static void cleanup_test(char path[PATH_MAX], struct io *io) in cleanup_test()
85 unlink(path); in cleanup_test()
90 char path[PATH_MAX]; in do_test_get_char() local
95 if (setup_test(path, test_string, buf_size, &io)) in do_test_get_char()
108 cleanup_test(path, &io); in do_test_get_char()
137 char path[PATH_MAX]; in do_test_get_hex() local
142 if (setup_test(path, test_string, 4, &io)) in do_test_get_hex()
159 cleanup_test(path, &io); in do_test_get_hex()
218 char path[PATH_MAX]; in do_test_get_dec() local
223 if (setup_test(path, test_string, 4, &io)) in do_test_get_dec()
240 cleanup_test(path, &io); in do_test_get_dec()
295 char path[PATH_MAX]; in test_get_line() local
310 if (setup_test(path, test_string, buf_size, &io)) in test_get_line()
323 cleanup_test(path, &io); in test_get_line()