The new LLVM-Unit :: Support/./SupportTests/ProgramEnvTest.TestExecuteAndWaitStatistics test currently FAILs on Solaris:
[ RUN ] ProgramEnvTest.TestExecuteAndWaitStatistics /vol/llvm/src/llvm-project/local/llvm/unittests/Support/ProgramTest.cpp:360: Failure Expected: (ProcStat->PeakMemory) > (0U), actual: 0 vs 0 [ FAILED ] ProgramEnvTest.TestExecuteAndWaitStatistics (22 ms)
According to llvm/lib/Support/Unix/Program.inc (llvm::sys::Wait), PeakMemory
corresponds to struct rusage.ru_maxrss.
However, Solaris getrusage(3C) documents
NOTES The ru_maxrss, ru_ixrss, ru_idrss, and ru_isrss members of the rusage structure are set to 0 in this implementation.
To deal with this, this patch changes to test to allow for PeakMemory == 0.
Tested on amd64-pc-solaris2.11. Ok for master?
PeakMemory is uint64_t, so the check condition is always true. It may cause compiler warnings.
I would propose to remove this check at all.