openpilot
openpilot copied to clipboard
deleter: handle non-openpilot created files
Describe the bug
Cruise control would not engaged, error would pop up "Process Not Running deleter"
Provide a route where the issue occurs
24574459dd7fb3e0|2023-09-29--00-06-58--0
openpilot version
https://github.com/rwxr-xr-x/openpilot/commit/ac97ef3d9162020558f5b3597823e0315fd4c715
Additional info
crashed on the previous route (24574459dd7fb3e0|2023-09-28--23-39-47--0) and still would don't work after a power cycle of the unit.
Looks like you wrote some stuff to that directory it's not designed to clean up (/data/media/0/realdata/2023-09-23.tar.gz
). We'll get that fixed up so it's more robust, but it would be helpful to note that upfront.
I had forgotten to clean that file up, but yes it would be helpful if it would delete the most recent drive data rather than flat out crashing. I have cleaned that up now. Thanks
@jnewb1 can you write a good test for this then fix it up? We should test lots of combos of files/symlink/directories etc.
Bounty is for two things:
- a good unit test that creates lots of files and directory with different structures
- making deleter handle any failures of the test
Hey, I've opened a PR with a fix for this.
@jnewb1 @adeebshihadeh mind having a look at the PR when you have a minute?
Can someone check my attempt?
@adeebshihadeh can you review my PR please ?