x/tools/go/packages/packagestest: cleanup fails silently and leaves test junk #29558
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
The
Exported.Cleanup
function fromx/tools/go/packages/packagestest
can fail silently and leave temporary files around - currently runninggo test
inx/tools/import
results in around 75MB of test junk being left behind (at least under OpenBSD and I would suspect most other BSD/Unix like platforms), the majority being fromTestSimpleCases
.The cause of the issue is that one of the sub-directories is created as 0555, which means that the subsequent
os.RemoveAll
call fails due to insufficient permissions:There are possibly three separate issues here:
Either these directories need to be created with permissions 0755, or the
Exported.Cleanup
function needs tochmod u+w
before trying toos.RemoveAll
.The
Exported.Cleanup
function should not really fail silently, since these kinds of issues go undetected until a disk fills up.There may be an issue with the code that is creating these directories (which should be using 0755 instead of 0555), if it is outside the test harness.
The text was updated successfully, but these errors were encountered: