Skip to content

RDKEMW-14022: Cleanup crash dumps older than 2 days#54

Open
gomathishankar37 wants to merge 1 commit intodevelopfrom
topic/RDKEMW-14022
Open

RDKEMW-14022: Cleanup crash dumps older than 2 days#54
gomathishankar37 wants to merge 1 commit intodevelopfrom
topic/RDKEMW-14022

Conversation

@gomathishankar37
Copy link
Copy Markdown
Contributor

No description provided.

@gomathishankar37 gomathishankar37 requested a review from a team as a code owner March 30, 2026 11:56
Copilot AI review requested due to automatic review settings March 30, 2026 11:56
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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* in runDumpUpload.sh.
  • Update cleanup wildcard from *_mac*_dat* to *mac*_dat* in cleanup_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.

Comment on lines +423 to +424
/* 1) Find and delete files by wildcard '*mac*_dat*' older than 2 days */
delete_files_matching_pattern_older_than(working_dir, "*mac*_dat*", 2);
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
@github-actions github-actions bot locked and limited conversation to collaborators Mar 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants