Lines Matching defs:tag

42     int setup(uint64_t tag);
43 bool checkTag(uint64_t tag, uid_t uid);
97 int SockInfo::setup(uint64_t tag) {
103 if (doCtrlCommand("t %d %llu", fd, tag) < 0) {
104 testPrintE("socket setup: failed to tag");
108 if (!checkTag(tag, getuid())) {
109 testPrintE("socket setup: Unexpected results: tag not found");
124 * tag + uid. But it is not fool proof.
125 * Without the kernel reporting more info on who setup the socket tag, it is
127 * Returns: true if tag found.
154 asprintf(&match_template, "sock=%lx %s", addr, "tag=0x%llx (uid=%u)");
158 asprintf(&match_template, "%s", " tag=0x%llx (uid=%u)");
170 "sock=%lx tag=0x%llx (uid=%lu) pid=%u f_count=%lu",
221 testPrintI("setup sock0 and addr via tag");
223 testPrintI("setup sock1 and addr via tag");
255 testPrintI("setup tag limit");
257 ASSERT_GE(writeModuleParam("max_sock_tags", max_tags_str), 0) << "Failed to setup tag limit";
259 testPrintI("tag quota reach limit");
261 uint64_t tag = valid_tag2 + ((uint64_t)cnt << 32);
262 EXPECT_GE(doCtrlCommand("t %d %llu %u", sock0.fd, tag , fake_uid2), 0)
264 EXPECT_TRUE(sock0.checkTag(tag, fake_uid2))<< "Unexpected results: tag not found";
267 testPrintI("tag quota go over limit");
271 fake_uid2)) << "Unexpected results: tag not found";
276 << "Untagged tag should not be there";
278 testPrintI("tag after untag should not free up max tags");
284 testPrintI("delete one tag");
315 // no tag, no uid
321 // Invalid tag. Expected failure
327 // Valid tag with no uid
341 // Valid 1st tag
347 // Valid re-tag
354 // Valid re-tag with acct_tag change
361 // Re-tag with uid change
367 // Valid 64bit acct tag
387 // Invalid tag. Expected failure