File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -278,6 +278,14 @@ static void test_close_all_fds(void) {
278278 log_open ();
279279}
280280
281+ static void test_format_proc_fd_path (void ) {
282+ assert_se (streq_ptr (FORMAT_PROC_FD_PATH (0 ), "/proc/self/fd/0" ));
283+ assert_se (streq_ptr (FORMAT_PROC_FD_PATH (1 ), "/proc/self/fd/1" ));
284+ assert_se (streq_ptr (FORMAT_PROC_FD_PATH (2 ), "/proc/self/fd/2" ));
285+ assert_se (streq_ptr (FORMAT_PROC_FD_PATH (3 ), "/proc/self/fd/3" ));
286+ assert_se (streq_ptr (FORMAT_PROC_FD_PATH (2147483647 ), "/proc/self/fd/2147483647" ));
287+ }
288+
281289int main (int argc , char * argv []) {
282290
283291 test_setup_logging (LOG_DEBUG );
@@ -290,6 +298,7 @@ int main(int argc, char *argv[]) {
290298 test_rearrange_stdio ();
291299 test_read_nr_open ();
292300 test_close_all_fds ();
301+ test_format_proc_fd_path ();
293302
294303 return 0 ;
295304}
You can’t perform that action at this time.
0 commit comments