Home | History | Annotate | Download | only in tests

Lines Matching refs:cwd

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