Lines Matching +full:use +full:- +full:case
4 * Permission to use, copy, modify, and distribute this software for any
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 * Test that "mount -t proc -o subset=pid" hides everything but pids,
18 * /proc/self and /proc/thread-self.
42 if (unshare(CLONE_NEWNS) == -1) { in make_private_proc()
48 if (mount(NULL, "/", NULL, MS_PRIVATE|MS_REC, NULL) == -1) { in make_private_proc()
51 if (mount(NULL, "/proc", "proc", 0, "subset=pid") == -1) { in make_private_proc()
60 case '0':case '1':case '2':case '3':case '4': in string_is_pid()
61 case '5':case '6':case '7':case '8':case '9': in string_is_pid()
64 case '\0': in string_is_pid()
88 if (streq(de->d_name, ".")) { in main()
91 assert(de->d_type == DT_DIR); in main()
92 } else if (streq(de->d_name, "..")) { in main()
95 assert(de->d_type == DT_DIR); in main()
96 } else if (streq(de->d_name, "self")) { in main()
99 assert(de->d_type == DT_LNK); in main()
100 } else if (streq(de->d_name, "thread-self")) { in main()
103 assert(de->d_type == DT_LNK); in main()
105 if (!string_is_pid(de->d_name)) { in main()
106 fprintf(stderr, "d_name '%s'\n", de->d_name); in main()
109 assert(de->d_type == DT_DIR); in main()
115 assert(rv == -1 && errno == ENOENT); in main()
118 assert(fd == -1 && errno == ENOENT); in main()