Skip to content

Conversation

@ariosmon
Copy link
Contributor

@ariosmon ariosmon commented Dec 9, 2025

Description

Adds unit test for LSM cgroup tracking map fix.

Testing

Test passes on Linux with both EnableCgTrackerID enabled and disabled cases.

andres@andres:~/hubble-fgs/modules/tetragon-oss$ sudo /tmp/test_lsm -test.v -test.run TestLSMCgTrackerMap -test.timeout 2m
=== RUN   TestLSMCgTrackerMap
=== RUN   TestLSMCgTrackerMap/With_EnableCgTrackerID_=_false
  
level=info msg="Unloading sensor __base__"
=== RUN   TestLSMCgTrackerMap/With_EnableCgTrackerID_=_true
lsm_test.go:227: Found tg_cgtracker_map in sensor generic_lsm
    
--- PASS: TestLSMCgTrackerMap (15.25s)
    --- PASS: TestLSMCgTrackerMap/With_EnableCgTrackerID_=_false (7.16s)
    --- PASS: TestLSMCgTrackerMap/With_EnableCgTrackerID_=_true (7.48s)
PASS

@ariosmon ariosmon changed the title tetragon: Add test for LSM cgtracker map presence based on EnableCgTr… Fix(dev): tg_cgtracker_map incompatibility in LSM hooks Dec 9, 2025
@ariosmon ariosmon changed the title Fix(dev): tg_cgtracker_map incompatibility in LSM hooks Unit Test for LSM CGroup Tracking Map Fix Dec 9, 2025
@ariosmon ariosmon force-pushed the pr/ariosmon/LSM_CGroup_Tracking_Map branch 8 times, most recently from 325fe07 to cb76a5e Compare December 10, 2025 00:18
@ariosmon ariosmon changed the title Unit Test for LSM CGroup Tracking Map Fix fix(tests): Unit Test for LSM CGroup Tracking Map Fix Dec 10, 2025
@FedeDP FedeDP added area/testing Related to testing release-note/misc This PR makes changes that have no direct user impact. labels Dec 10, 2025
@ariosmon ariosmon marked this pull request as ready for review December 10, 2025 12:30
@ariosmon ariosmon requested a review from a team as a code owner December 10, 2025 12:30
@ariosmon ariosmon requested a review from tixxdz December 10, 2025 12:30
Copy link
Contributor

@FedeDP FedeDP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM!

@FedeDP
Copy link
Contributor

FedeDP commented Dec 10, 2025

Oh @ariosmon i just noticed that the commit message is a bit off, seems like you should amend it!

@ariosmon ariosmon force-pushed the pr/ariosmon/LSM_CGroup_Tracking_Map branch 2 times, most recently from aa61900 to 8195826 Compare December 10, 2025 14:46
@ariosmon
Copy link
Contributor Author

@FedeDP I've added a new commit message, I think is good now 👍

@ariosmon
Copy link
Contributor Author

👋 Hello @mtardy I'll appreciate if you can take a look and add your comments or merge if you agree 👍

Copy link
Member

@mtardy mtardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey 👋, thanks for the new test, which fix is this testing against? Could you link to it in the commit description? you can use this command to reference commit:

[alias]
    cite = "!f() { git log -1 '--pretty=format:%H (\"%s\")%n' $1 | sed -e 's/\\([0-f]\\{12\\}\\)[0-f]*/\\1/'; }; f"

@ariosmon ariosmon force-pushed the pr/ariosmon/LSM_CGroup_Tracking_Map branch from 8195826 to c4ea628 Compare January 7, 2026 12:50
@netlify
Copy link

netlify bot commented Jan 7, 2026

Deploy Preview for tetragon ready!

Name Link
🔨 Latest commit 6c1e555
🔍 Latest deploy log https://app.netlify.com/projects/tetragon/deploys/695e58c229a1390008fc525d
😎 Deploy Preview https://deploy-preview-4418--tetragon.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ariosmon ariosmon force-pushed the pr/ariosmon/LSM_CGroup_Tracking_Map branch 2 times, most recently from 6c1e555 to 84cf5a1 Compare January 7, 2026 13:05
Add TestLSMCgTrackerMap to validate that tg_cgtracker_map
is correctly included in LSM sensors when EnableCgTrackerID
is enabled.

The test verifies both cases (enabled and disabled) to
prevent regressions of the cgtracker map loading logic
introduced in
commit 2e3ec05 Fix tg_cgtracker_map size in LSM generic probes

Signed-off-by: ariosmon <[email protected]>
Copy link
Member

@mtardy mtardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

@mtardy
Copy link
Member

mtardy commented Jan 7, 2026

ah checkpatch seeing that it's the wrong commit ID, you pulled the one from the PR on your fork not the one that got merge on main. Not a huge deal but the correct one is 2e3ec05.

@ariosmon ariosmon force-pushed the pr/ariosmon/LSM_CGroup_Tracking_Map branch from 84cf5a1 to 90014af Compare January 7, 2026 13:19
@ariosmon
Copy link
Contributor Author

ariosmon commented Jan 7, 2026

👋 Hello @mtardy thanks for your comments, I already added the requested comment in the commit and all list of jobs are good, can you take a look? if you agree please get merge it, thanks in advance 👍

@mtardy mtardy merged commit c30f157 into cilium:main Jan 7, 2026
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/testing Related to testing release-note/misc This PR makes changes that have no direct user impact.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants