MCPcopy Create free account
hub / github.com/chromium/crashpad / TEST

Function TEST

util/linux/proc_task_reader_test.cc:63–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61};
62
63TEST(ProcTaskReader, Self) {
64 std::vector<pid_t> tids;
65 ASSERT_TRUE(ReadThreadIDs(getpid(), &tids));
66 EXPECT_TRUE(FindThreadID(getpid(), tids));
67 EXPECT_TRUE(FindThreadID(sys_gettid(), tids));
68
69 ScopedBlockingThread thread1;
70 thread1.Start();
71
72 ScopedBlockingThread thread2;
73 thread2.Start();
74
75 pid_t thread1_tid = thread1.ThreadID();
76 pid_t thread2_tid = thread2.ThreadID();
77
78 tids.clear();
79 ASSERT_TRUE(ReadThreadIDs(getpid(), &tids));
80 EXPECT_TRUE(FindThreadID(getpid(), tids));
81 EXPECT_TRUE(FindThreadID(thread1_tid, tids));
82 EXPECT_TRUE(FindThreadID(thread2_tid, tids));
83}
84
85TEST(ProcTaskReader, BadPID) {
86 std::vector<pid_t> tids;

Callers

nothing calls this directly

Calls 6

ReadThreadIDsFunction · 0.85
FindThreadIDFunction · 0.85
clearMethod · 0.80
StartMethod · 0.45
ThreadIDMethod · 0.45
RunMethod · 0.45

Tested by

no test coverage detected