1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00

[LibFuzzer] Fix `FuzzerMutate.ShuffleBytes2` unit test on OSX.

The ``FuzzerMutate.ShuffleBytes2`` unit test was failing on
OSX due to the implementation of ``std::random_shuffle()``
being different between libcxx and libstdc++.

@kcc has decided (see http://reviews.llvm.org/D21218) it is acceptable
for there to be different mutation behavior on different platforms so
this commit just adjusts the test to perform the minimum number of
iterations (that is a power of 2) to see all the mutations the unit test
is looking for.

Differential Revision: http://reviews.llvm.org/D21359

llvm-svn: 272743
This commit is contained in:
Dan Liew 2016-06-15 01:40:02 +00:00
parent f25364903d
commit 996b690cdd

View File

@ -259,7 +259,7 @@ TEST(FuzzerMutate, ShuffleBytes1) {
TestShuffleBytes(&MutationDispatcher::Mutate_ShuffleBytes, 1 << 16);
}
TEST(FuzzerMutate, ShuffleBytes2) {
TestShuffleBytes(&MutationDispatcher::Mutate, 1 << 19);
TestShuffleBytes(&MutationDispatcher::Mutate, 1 << 20);
}
void TestAddWordFromDictionary(Mutator M, int NumIter) {