This is an archive of the discontinued LLVM Phabricator instance.

[lld][PowerPC][test] Avoid flaky failures
ClosedPublic

Authored by jsji on Dec 11 2020, 9:26 AM.

Details

Summary

This test may fail if there is a new changes to this tests.

.../llvm-project/lld/test/ELF/common-archive-lookup.s:95:8:
error: MAP: expected string not found in input

^

because the archives are not deleted so the contents from the previous test run
may affect the contents for the current run,
so this will require cleaning up the Output dir or force build of buildbot.

The fix is to put all the objects in the temporary dir that we cleanup every run,
to avoid run-2-run flaky failures.

Diff Detail

Event Timeline

jsji created this revision.Dec 11 2020, 9:26 AM
jsji requested review of this revision.Dec 11 2020, 9:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 11 2020, 9:26 AM
MaskRay added a comment.EditedDec 11 2020, 9:36 AM

because some archive file and command are affected by last run. So this require cleaning up the Output dir or force build of buildbot.

Can you elaborate what happens?

%t should be used for temporary files. I think Google and another industry user (maybe Swift) have a readonly filesystem and don't chdir when running the test. 1.s will be created in the source directory and fail. Even if they did't have such a restriction, using 1.s would be a bad idea because other tests could use 1.s as well and cause a conflict.

jsji added a comment.Dec 11 2020, 10:09 AM

Can you elaborate what happens?

Because we are using the same tmp file name for this test. eg: common-archive-lookup.s.tmp3.a.
Everytime we change the tests, eg: if I changed the content of tmp3.a, instead of putting 3 objects in it,
we put 2 only.
Then we will have to remove previous common-archive-lookup.s.tmp3.a by forcing rebuild of buildbot.

%t should be used for temporary files.

Yes, this is NOT changed. If you look at the beginning of this test, we create a tmp dir, and then put all the temp source file and objects in it.

MaskRay accepted this revision.Dec 11 2020, 10:22 AM

LG. I did not see cd %t.dir above. The description is a bit unclear to me. I'd say "The archives are not deleted so the contents from the previous test run may affect the contents for the current run."

This revision is now accepted and ready to land.Dec 11 2020, 10:22 AM
jsji edited the summary of this revision. (Show Details)Dec 11 2020, 11:30 AM
This revision was landed with ongoing or failed builds.Dec 11 2020, 11:47 AM
This revision was automatically updated to reflect the committed changes.