Skip to content
Commit bb4f88f9 authored by Guillaume Chatelet's avatar Guillaume Chatelet
Browse files

[libc] simplify test for getrandom

`getrandom` is implemented as a syscall.
We don't want to test linux implementation of the syscall. We just want to verify that it reacts as expected to sensible values.

Runtime before
```
[ RUN      ] LlvmLibcGetRandomTest.InvalidFlag
[       OK ] LlvmLibcGetRandomTest.InvalidFlag (took 0 ms)
[ RUN      ] LlvmLibcGetRandomTest.InvalidBuffer
[       OK ] LlvmLibcGetRandomTest.InvalidBuffer (took 0 ms)
[ RUN      ] LlvmLibcGetRandomTest.ReturnsSize
[       OK ] LlvmLibcGetRandomTest.ReturnsSize (took 83 ms)
[ RUN      ] LlvmLibcGetRandomTest.PiEstimation
[       OK ] LlvmLibcGetRandomTest.PiEstimation (took 9882 ms)
```

Runtime after
```
[ RUN      ] LlvmLibcGetRandomTest.InvalidFlag
[       OK ] LlvmLibcGetRandomTest.InvalidFlag (took 0 ms)
[ RUN      ] LlvmLibcGetRandomTest.InvalidBuffer
[       OK ] LlvmLibcGetRandomTest.InvalidBuffer (took 0 ms)
[ RUN      ] LlvmLibcGetRandomTest.ReturnsSize
[       OK ] LlvmLibcGetRandomTest.ReturnsSize (took 0 ms)
[ RUN      ] LlvmLibcGetRandomTest.CheckValue
[       OK ] LlvmLibcGetRandomTest.CheckValue (took 0 ms)
```

Reviewed By: lntue

Differential Revision: https://reviews.llvm.org/D151336
parent d71297ce
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment