Lines Matching refs:err

37 	int err, map;  in fn()  local
39 err = unshare(CLONE_NEWNS); in fn()
40 if (!ASSERT_OK(err, "unshare")) in fn()
43 err = mount("", "/", "", MS_REC | MS_PRIVATE, NULL); in fn()
44 if (!ASSERT_OK(err, "mount /")) in fn()
47 err = mkdir(TDIR, 0777); in fn()
51 if ((err && errno != EEXIST) && !ASSERT_OK(err, "mkdir " TDIR)) in fn()
54 err = mount("none", TDIR, "tmpfs", 0, NULL); in fn()
55 if (!ASSERT_OK(err, "mount tmpfs")) in fn()
58 err = mkdir(TDIR "/fs1", 0777); in fn()
59 if (!ASSERT_OK(err, "mkdir " TDIR "/fs1")) in fn()
61 err = mkdir(TDIR "/fs2", 0777); in fn()
62 if (!ASSERT_OK(err, "mkdir " TDIR "/fs2")) in fn()
65 err = mount("bpf", TDIR "/fs1", "bpf", 0, NULL); in fn()
66 if (!ASSERT_OK(err, "mount bpffs " TDIR "/fs1")) in fn()
68 err = mount("bpf", TDIR "/fs2", "bpf", 0, NULL); in fn()
69 if (!ASSERT_OK(err, "mount bpffs " TDIR "/fs2")) in fn()
72 err = read_iter(TDIR "/fs1/maps.debug"); in fn()
73 if (!ASSERT_OK(err, "reading " TDIR "/fs1/maps.debug")) in fn()
75 err = read_iter(TDIR "/fs2/progs.debug"); in fn()
76 if (!ASSERT_OK(err, "reading " TDIR "/fs2/progs.debug")) in fn()
79 err = mkdir(TDIR "/fs1/a", 0777); in fn()
80 if (!ASSERT_OK(err, "creating " TDIR "/fs1/a")) in fn()
82 err = mkdir(TDIR "/fs1/a/1", 0777); in fn()
83 if (!ASSERT_OK(err, "creating " TDIR "/fs1/a/1")) in fn()
85 err = mkdir(TDIR "/fs1/b", 0777); in fn()
86 if (!ASSERT_OK(err, "creating " TDIR "/fs1/b")) in fn()
92 err = bpf_obj_pin(map, TDIR "/fs1/c"); in fn()
93 if (!ASSERT_OK(err, "pin map")) in fn()
98 err = stat(TDIR "/fs1/a", &a); in fn()
99 if (!ASSERT_OK(err, "stat(" TDIR "/fs1/a)")) in fn()
101 err = renameat2(0, TDIR "/fs1/a", 0, TDIR "/fs1/b", RENAME_EXCHANGE); in fn()
102 if (!ASSERT_OK(err, "renameat2(/fs1/a, /fs1/b, RENAME_EXCHANGE)")) in fn()
104 err = stat(TDIR "/fs1/b", &b); in fn()
105 if (!ASSERT_OK(err, "stat(" TDIR "/fs1/b)")) in fn()
109 err = access(TDIR "/fs1/b/1", F_OK); in fn()
110 if (!ASSERT_OK(err, "access(" TDIR "/fs1/b/1)")) in fn()
114 err = stat(TDIR "/fs1/c", &c); in fn()
115 if (!ASSERT_OK(err, "stat(" TDIR "/fs1/map)")) in fn()
117 err = renameat2(0, TDIR "/fs1/c", 0, TDIR "/fs1/b", RENAME_EXCHANGE); in fn()
118 if (!ASSERT_OK(err, "renameat2(/fs1/c, /fs1/b, RENAME_EXCHANGE)")) in fn()
120 err = stat(TDIR "/fs1/b", &b); in fn()
121 if (!ASSERT_OK(err, "stat(" TDIR "/fs1/b)")) in fn()
125 err = access(TDIR "/fs1/c/1", F_OK); in fn()
126 if (!ASSERT_OK(err, "access(" TDIR "/fs1/c/1)")) in fn()
130 err = renameat2(0, TDIR "/fs1/b", 0, TDIR "/fs1/a", RENAME_NOREPLACE); in fn()
131 if (!ASSERT_ERR(err, "renameat2(RENAME_NOREPLACE)")) { in fn()
132 err = -EINVAL; in fn()
135 err = access(TDIR "/fs1/b", F_OK); in fn()
136 if (!ASSERT_OK(err, "access(" TDIR "/fs1/b)")) in fn()
146 exit(err); in fn()
151 int err, duration = 0, status = 0; in test_test_bpffs() local
159 err = waitpid(pid, &status, 0); in test_test_bpffs()
160 if (CHECK(err == -1 && errno != ECHILD, "waitpid", "failed %d", errno)) in test_test_bpffs()