From 7029af978763ebba07514cb6c062654b7bc2720f Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Wed, 15 Jun 2016 01:40:02 +0000 Subject: [PATCH] [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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272743 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Fuzzer/test/FuzzerUnittest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Fuzzer/test/FuzzerUnittest.cpp b/lib/Fuzzer/test/FuzzerUnittest.cpp index 36d13a0346d..5b6251b6e96 100644 --- a/lib/Fuzzer/test/FuzzerUnittest.cpp +++ b/lib/Fuzzer/test/FuzzerUnittest.cpp @@ -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) { -- 2.50.1