Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
Signed-off-by: Roberto Scolaro <[email protected]>
  • Loading branch information
therealbobo committed Apr 10, 2024
1 parent e8cc9ed commit 514ba9f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/libsinsp_e2e/forking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ TEST_F(sys_call_test, forking_clone_fs)
char bcwd[1024];
int prfd;
int ptid; // parent tid
pid_t clone_tid;
int child_tid;
int parent_res;
int flags = CLONE_FILES | CLONE_FS | CLONE_VM | CLONE_PARENT_SETTID;
Expand Down Expand Up @@ -394,7 +395,7 @@ TEST_F(sys_call_test, forking_clone_fs)

/* Create child; child commences execution in childFunc() */

pid_t clone_tid = clone(clone_callback_1, stackTop, flags, &cp,
clone_tid = clone(clone_callback_1, stackTop, flags, &cp,
&child_tid);
if (clone_tid == -1)
FAIL();
Expand Down Expand Up @@ -478,7 +479,11 @@ TEST_F(sys_call_test, forking_clone_fs)
if(fdi && fdi->tostring_clean().find(FILENAME) != std::string::npos)
{
EXPECT_EQ(parent_res, res) << "filename: "
<< fdi->tostring_clean() << " res: " << res << std::endl;
<< fdi->tostring_clean() << std::endl
<< "res: " << res << std::endl
<< "parent tid: " << ptid << std::endl
<< "child tid: " << child_tid << std::endl
<< "clone tid: " << clone_tid << std::endl;
}
}
else if (ti->m_tid == child_tid)
Expand Down

0 comments on commit 514ba9f

Please sign in to comment.