[compiler-rt] f16c4a3 - [NFC][fuzzer] Simplify StrcmpTest.cpp
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 18 00:36:59 PDT 2020
Author: Vitaly Buka
Date: 2020-09-18T00:36:48-07:00
New Revision: f16c4a3704f26d8f557856b7c9f3ce73c1bf1a31
URL: https://github.com/llvm/llvm-project/commit/f16c4a3704f26d8f557856b7c9f3ce73c1bf1a31
DIFF: https://github.com/llvm/llvm-project/commit/f16c4a3704f26d8f557856b7c9f3ce73c1bf1a31.diff
LOG: [NFC][fuzzer] Simplify StrcmpTest.cpp
The test started to consistently fail after unrelated
2ffaa9a1732c6f2af514603d25f0e8c238b3dd06.
Even before the patch it was possible to fail the test,
e.g. -seed=1660180256 on my workstation.
Also this checks do not look related to strcmp.
Added:
Modified:
compiler-rt/test/fuzzer/StrcmpTest.cpp
Removed:
################################################################################
diff --git a/compiler-rt/test/fuzzer/StrcmpTest.cpp b/compiler-rt/test/fuzzer/StrcmpTest.cpp
index 12cafae6635e..86d42d21ded3 100644
--- a/compiler-rt/test/fuzzer/StrcmpTest.cpp
+++ b/compiler-rt/test/fuzzer/StrcmpTest.cpp
@@ -23,9 +23,7 @@ bool Eq(const uint8_t *Data, size_t Size, const char *Str) {
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
if (Eq(Data, Size, "ABC") &&
Size >= 3 && Eq(Data + 3, Size - 3, "QWER") &&
- Size >= 7 && Eq(Data + 7, Size - 7, "ZXCVN") &&
- Size >= 14 && Data[13] == 42
- ) {
+ Size >= 7 && Eq(Data + 7, Size - 7, "ZXCVN")) {
fprintf(stderr, "BINGO\n");
exit(1);
}
More information about the llvm-commits
mailing list