[PATCH] D60334: Summary:Add close_fd_mask functionality to AFL driver.

Jonathan Metzman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 8 10:49:55 PDT 2019


metzman marked 2 inline comments as done.
metzman added inline comments.


================
Comment at: compiler-rt/test/fuzzer/afl-driver-close-fd-mask.test:4
+
+RUN: echo "%no_fuzzer_cpp_compiler %S/AFLDriverCloseFdMaskTest.cpp %libfuzzer_src/afl/afl_driver.cpp -o %t-AFLDriverCloseFdMaskTest" > /tmp/cmd
+RUN: echo -n "abc" > %t.file1
----------------
morehouse wrote:
> Can we remove this line?
Sorry, left a bunch of debugging code in here.


================
Comment at: compiler-rt/test/fuzzer/afl-driver-close-fd-mask.test:36
+CHECK4: ERROR: AddressSanitizer
+RUN: AFL_DRIVER_CLOSE_FD_MASK=2 not %run %t-AFLDriverCloseFdMaskTest < %t.file2 2>&1  | FileCheck %s --check-prefix=CHECK4
+
----------------
morehouse wrote:
> Can we combine this into check2?
 I split up almost every message so that I did as much sharing and as little repetition as possible.
WDYT?


================
Comment at: compiler-rt/test/fuzzer/afl-driver-close-fd-mask.test:42
+CHECK5: ERROR: AddressSanitizer
+RUN: rm %t.stderr
+RUN: AFL_DRIVER_STDERR_DUPLICATE_FILENAME=%t.stderr AFL_DRIVER_CLOSE_FD_MASK=2 not %run %t-AFLDriverCloseFdMaskTest < %t.file2
----------------
morehouse wrote:
> I think this test will fail if the file doesn't exist.  Better make it `rm -f`
Good point. Fixed.


================
Comment at: compiler-rt/test/fuzzer/afl-driver-close-fd-mask.test:4
+
+; Test that not AFL_DRIVER_CLOSE_FD_MASK file isn't broken.
+RUN: echo -n "abc" > %t.file3
----------------
morehouse wrote:
> I don't understand this comment.
Ah well it was a pretty bad comment. Improved it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60334/new/

https://reviews.llvm.org/D60334





More information about the llvm-commits mailing list