This is an archive of the discontinued LLVM Phabricator instance.

Fixed a profdata file size detection on Windows system.
ClosedPublic

Authored by vvereschaka on Oct 22 2019, 11:59 AM.

Details

Summary

The space symbols are allowed in the group names on Windows system (as example: Domain Users). In that case the test extracts a wrong field from the output to get a size of the profdata file.

This patch avoids a printing of the group names in the test output and extracts a proper field as a file size.

Diff Detail

Event Timeline

vvereschaka created this revision.Oct 22 2019, 11:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 22 2019, 11:59 AM
andreil99 accepted this revision.Nov 4 2019, 9:50 PM
andreil99 added a subscriber: andreil99.

Thanks, Vlad!

This revision is now accepted and ready to land.Nov 4 2019, 9:50 PM
wmi accepted this revision.Nov 5 2019, 9:19 AM

Sorry I missed the patch. Thanks for fixing the test!

vvereschaka changed the repository for this revision from rL LLVM to rG LLVM Github Monorepo.Nov 5 2019, 4:14 PM
This revision was automatically updated to reflect the committed changes.
mgorny added a subscriber: mgorny.Nov 10 2019, 7:06 AM

This broke the NetBSD buildbot: http://lab.llvm.org:8014/builders/netbsd-amd64/builds/140/steps/run%20unit%20tests/logs/FAIL%3A%20LLVM%3A%3Ashow-prof-size.test

The -o option is not portable, and does something completely different on NetBSD:

-o      Include the file flags in a long (-l) output.  If no file flags
        are set, “-” is displayed.  (See chflags(1) for a list of
        possible flags and their meanings.)

The same is true for at least FreeBSD and macOS. So this patch breaks more platforms than it fixes.

Thanks @mgorny and @krytarowski for letting me know.

Looks like there is no way to make a portable fix using 'ls' tool.
I am going to revert this commit.