Page MenuHomePhabricator

Make test use a smaller file

Authored by dyung on Jul 29 2020, 12:30 PM.



In our internal build bot, we were seeing random test failures due to running out of disk space which we eventually traced back to this test which tries to create a large file to test with. This was being written to disk and eating most if not all of the 59GB of free space we had remaining on the machine. And while this test itself did not fail, it caused other tests running at the same time to fail due to being unable to write their output to the disk.

It was discovered that the test should still work with a smaller value which also avoids creating as large of a file. I've run the LLD tests with this change locally multiple times and it seems to avoid the problem we were encountering.

Diff Detail

Unit TestsFailed

80 mswindows > Clang.OpenMP::declare_variant_device_isa_codegen_1.c
Script: -- : 'RUN: at line 1'; c:\ws\w4a\llvm-project\premerge-checks\build\bin\clang.exe -cc1 -internal-isystem c:\ws\w4a\llvm-project\premerge-checks\build\lib\clang\12.0.0\include -nostdsysteminc -verify -fopenmp -x c -triple x86_64-pc-windows-gnu -emit-llvm C:\ws\w4a\llvm-project\premerge-checks\clang\test\OpenMP\declare_variant_device_isa_codegen_1.c -o - -fopenmp-version=50 | c:\ws\w4a\llvm-project\premerge-checks\build\bin\filecheck.exe C:\ws\w4a\llvm-project\premerge-checks\clang\test\OpenMP\declare_variant_device_isa_codegen_1.c --check-prefix=GENERIC

Event Timeline

dyung created this revision.Jul 29 2020, 12:30 PM
dyung requested review of this revision.Jul 29 2020, 12:30 PM
MaskRay added a comment.EditedJul 29 2020, 1:04 PM

Thanks for reporting this issue! That patch fell out of my radar when it was committed. I would slightly change the code construct the test file used. Fixed in ed7bde0e4b40cbf8a7c833fd8240c957fcda176e

We should use -o /dev/null if the output is not needed and use a section of different permissions. .text_low & .text_overflow are by default in the same segment and can make the segment have very large p_filesz.

dyung abandoned this revision.Jul 29 2020, 3:43 PM

Thanks for the fix!