##// END OF EJS Templates
phabricator: warn if unable to amend, instead of aborting after posting...
phabricator: warn if unable to amend, instead of aborting after posting There was a divergence in behavior here between obsolete and strip based amending. I first noticed the abort when testing outside of the test harness, but then had trouble recreating it here after reverting the code changes. It turns out, strip based amend was successfully amending the public commit after it was posted! It looks like the protection is in the `commit --amend` command, not in the underlying code that it calls. I considered doing a preflight check and aborting. But the locks are only acquired at the end, if amending, and this is too large a section of code to be wrapped in a maybe-it's-held-or-not context manager for my tastes. Additionally, some people do post-push reviews, and amending is the default behavior, so they shouldn't see a misleading error message. The lack of a 'Differential Revision' entry in the commit message breaks a {phabreview} test, so it had to be partially conditionalized.

File last commit:

r40800:d9fc51f7 stable
r41198:0101a35d default
Show More
test-fuzz-targets.t
43 lines | 1.1 KiB | text/troff | Tads3Lexer
/ tests / test-fuzz-targets.t
Yuya Nishihara
test-fuzz-targets: look for clang-6.0 binary as well...
r38238 #require test-repo
Augie Fackler
contrib: add some basic scaffolding for some fuzz test targets...
r35688 $ cd $TESTDIR/../contrib/fuzz
Yuya Nishihara
test-fuzz-targets: look for clang-6.0 binary as well...
r38238
Augie Fackler
tests: sniff for /usr/local/bin/gmake and use it in test-fuzz-targets.t...
r40799 which(1) could exit nonzero, but that's fine because we'll still end
up without a valid executable, so we don't need to check $? here.
$ if which gmake >/dev/null 2>&1; then
> MAKE=gmake
> else
> MAKE=make
> fi
Augie Fackler
tests: sniff for libfuzzer actually being available in test-fuzz-targets.t...
r40800 $ havefuzz() {
> cat > $TESTTMP/dummy.cc <<EOF
> #include <stdlib.h>
> #include <stdint.h>
> int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { return 0; }
> int main(int argc, char **argv) {
> const char data[] = "asdf";
> return LLVMFuzzerTestOneInput((const uint8_t *)data, 4);
> }
> EOF
> $CXX $TESTTMP/dummy.cc -o $TESTTMP/dummy \
> -fsanitize=fuzzer-no-link,address || return 1
> }
Yuya Nishihara
test-fuzz-targets: look for clang-6.0 binary as well...
r38238 #if clang-libfuzzer
Augie Fackler
tests: sniff for libfuzzer actually being available in test-fuzz-targets.t...
r40800 $ CXX=clang++ havefuzz || exit 80
Augie Fackler
tests: sniff for /usr/local/bin/gmake and use it in test-fuzz-targets.t...
r40799 $ $MAKE -s clean all
Yuya Nishihara
test-fuzz-targets: look for clang-6.0 binary as well...
r38238 #endif
#if no-clang-libfuzzer clang-6.0
Augie Fackler
tests: sniff for libfuzzer actually being available in test-fuzz-targets.t...
r40800 $ CXX=clang++-6.0 havefuzz || exit 80
Augie Fackler
tests: sniff for /usr/local/bin/gmake and use it in test-fuzz-targets.t...
r40799 $ $MAKE -s clean all CC=clang-6.0 CXX=clang++-6.0
Yuya Nishihara
test-fuzz-targets: look for clang-6.0 binary as well...
r38238 #endif
#if no-clang-libfuzzer no-clang-6.0
$ exit 80
#endif
Augie Fackler
tests: update fuzzer tests to include both fuzzers...
r38190 Just run the fuzzers for five seconds each to verify it works at all.
Augie Fackler
contrib: add some basic scaffolding for some fuzz test targets...
r35688 $ ./bdiff -max_total_time 5
Augie Fackler
fuzz: new fuzzer for the mpatch code...
r38264 $ ./mpatch -max_total_time 5
Augie Fackler
tests: update fuzzer tests to include both fuzzers...
r38190 $ ./xdiff -max_total_time 5