Lines Matching refs:cwd
20 static void test_cmdline(const char* const cwd, const char* const label, in test_cmdline() argument
48 static void test_readlink(const char* const cwd, const char* const label, in test_readlink() argument
59 if (strncmp(buf, cwd, strlen(cwd)) == 0) in test_readlink()
60 p += strlen(cwd); in test_readlink()
67 static void test_readlinkat(const char* const cwd, const char* const label, in test_readlinkat() argument
79 if (strncmp(buf, cwd, strlen(cwd)) == 0) in test_readlinkat()
80 p += strlen(cwd); in test_readlinkat()
93 char cwd[512]; in main() local
96 cwd[0] = 0; in main()
97 if (! getcwd(cwd, sizeof(cwd))) in main()
99 strcat(cwd, "/"); in main()
103 test_cmdline(cwd, "/proc/self/cmdline", "/proc/self/cmdline"); in main()
104 test_cmdline(cwd, "/proc/<pid>/cmdline", path); in main()
108 test_readlink(cwd, "/proc/self/exe", "/proc/self/exe"); in main()
109 test_readlink(cwd, "/proc/<pid>/exe", path); in main()
111 test_readlinkat(cwd, "/proc/self/exe", "/proc/self/exe"); in main()
112 test_readlinkat(cwd, "/proc/<pid>/exe", path); in main()