You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update tools/test/test-setup.sh to preserve symlinks when performing the zip of `$TEST_UNDECLARED_OUTPUTS_DIR`.
This fixes a serious bug where an absolute symlink generated in the test could delete files anywhere on the filesystem.
For example, a `sh_test` containing a line like:
ln -s "$HOME" "$TEST_UNDECLARED_OUTPUTS_DIR/home"
would have caused the users home directory to be deleted after copying it in to the output.zip. With this change, the output.zip only contains a (possibly dangling) symlink, but more importantly the deletions are limited to the `$TEST_UNDECLARED_OUTPUTS_DIR`.
RELNOTES: `--zip_undeclared_test_outputs` now preserves symlinks when zipping `$TEST_UNDECLARED_OUTPUTS_DIR`.
Closes#19948.
Change-Id: Ia4a8a9699e4e2f40498342af55babc5554a9ac93
PiperOrigin-RevId: 587696908
0 commit comments