Skip to content

Tezt: do not recursively delete symbolic links

Romain requested to merge nomadic-labs/tezos:romain-tezt-rmrf into master

Context

In Tezt, function Temp.remove_recursively currently would follow symbolic links to directories and recursively delete those directories. This merge request modifies this function to make it closer to calling rm -rf: links themselves are deleted instead.

This MR also improves error handling in this function. Since it is only used when cleaning up, errors become warnings, with informative messages.

Manually testing the MR

Run some Tezt tests and check that temporary files do get deleted (nothing left matching /tmp/tezt*).

Checklist

  • Select suitable reviewers using the Reviewers field below.

Merge request reports