From 514ba9f1175ddf29478110d53c5bd2014366b2e9 Mon Sep 17 00:00:00 2001 From: Roberto Scolaro Date: Wed, 10 Apr 2024 13:39:33 +0000 Subject: [PATCH] debug Signed-off-by: Roberto Scolaro --- test/libsinsp_e2e/forking.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/libsinsp_e2e/forking.cpp b/test/libsinsp_e2e/forking.cpp index 5bfdfed5931..5d6473fe89a 100644 --- a/test/libsinsp_e2e/forking.cpp +++ b/test/libsinsp_e2e/forking.cpp @@ -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; @@ -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(); @@ -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)