The 002_pg_upgrade.pl test leaves a file delete_old_cluster.sh in the
source directory. In vpath builds, there shouldn't be any files written
to the source directory.
Note that the TAP tests run with the source directory as the current
directory, so this is the result of pg_upgrade leaving its output files
in the current directory.
It looks like an addition of
chdir $ENV{TESTOUTDIR};
could fix it. Please check the patch.