RDKEMW-14022: Cleanup crash dumps older than 2 days#54
RDKEMW-14022: Cleanup crash dumps older than 2 days#54gomathishankar37 wants to merge 1 commit intodevelopfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates crash dump cleanup logic to remove crashupload-generated artifacts older than 2 days by adjusting the filename wildcard used in both the legacy shell script and the C batch-cleanup implementation.
Changes:
- Update cleanup wildcard from
*_mac*_dat*to*mac*_dat*inrunDumpUpload.sh. - Update cleanup wildcard from
*_mac*_dat*to*mac*_dat*incleanup_batch.c(both age-based cleanup and startup cleanup).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| runDumpUpload.sh | Broadens the find -name pattern used to delete old and “unfinished” crashupload artifacts. |
| c_sourcecode/src/utils/cleanup_batch.c | Broadens the fnmatch() pattern used for deleting old crashupload artifacts and startup cleanup artifacts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /* 1) Find and delete files by wildcard '*mac*_dat*' older than 2 days */ | ||
| delete_files_matching_pattern_older_than(working_dir, "*mac*_dat*", 2); |
There was a problem hiding this comment.
cleanup_batch() has unit test coverage in unittest/utils_gtest.cpp, but there doesn’t appear to be a test exercising the step-1 deletion of "mac_dat*" files older than 2 days. Since this PR changes the match scope, add a test that creates representative filenames (both '_mac..._dat...' and 'mac..._dat...') with mtimes >2 days and asserts they’re removed, while a nearby non-matching file remains.
No description provided.