git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC PATCH 1/2] fuzz: Add basic fuzz testing target.

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 10, 2018, 02:14 UTC
Message-ID
<xmqqva6amtt7.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<bfe4f2f965528ca2a45864857051b9835970ff07.1538693039.git.steadmon@google.com>
Josh Steadmon <steadmon@google.com> writes:
Show 8 quoted lines
> +FUZZ_OBJS += fuzz-pack-headers.o
> +
> +FUZZ_PROGRAMS += $(patsubst %.o,%,$(FUZZ_OBJS))
> +
> ...
> +### Fuzz testing
> +#
> +.PHONY: fuzz-clean fuzz-objs fuzz-compile

I take it that you anticipate the fuzz programs in the future all be named fuzz-$(blah), whose source is fuzz-$(blah).o (even though we may grow some common code that may be linked with them, which can be done by tweaking the rule for the $(FUZZ_PROGRAMS) target). Am I reading you correctly? Would fuzz-{clean,objs,compile} risk squatting on nicer names we may want to use for $(blah) down the line?

> + ...
> +$(FUZZ_PROGRAMS): fuzz-compile
> +	clang++ $(FUZZ_LDFLAGS) $(LIB_OBJS) $(BUILTIN_OBJS) $(XDIFF_OBJS) \
> +		$(EXTLIBS) git.o $@.o /usr/lib/llvm-4.0/lib/libFuzzer.a -o $@

Is the expected usage pattern to know a single fuzz-* program the builder wants to build, to run "make fuzz-pack-headers"? If not, it also would be a good idea to have something like

    fuzz-build-all:: $(FUZZ_PROGRAMS)
    .PHONY: fuzz-build-all
perhaps?

Also, in the final version we unleash to general developer audience, we'd want to support "make V=1" (and "make" that is "$(QUIET)").

Previous: Josh SteadmonNext: Josh Steadmon
Message 3 of 10 in “add fuzzing targets for use with LLVM libFuzzer”
  1. 0/2 add fuzzing targets for use with LLVM libFuzzerJosh Steadmon, Oct 4, 2018
  2. 1/2 fuzz: Add basic fuzz testing target.Josh Steadmon, Oct 4, 2018
  3. Junio C HamanoOct 10, 2018
  4. Josh SteadmonOct 13, 2018
  5. 2/2 fuzz: Add fuzz testing for packfile indices.Josh Steadmon, Oct 4, 2018
  6. Junio C HamanoOct 10, 2018
  7. 0/2 add fuzzing targets for use with OSS-Fuzzsteadmon@google.com, Oct 13, 2018
  8. 1/2 fuzz: Add basic fuzz testing target.steadmon@google.com, Oct 13, 2018
  9. 2/2 fuzz: Add fuzz testing for packfile indices.steadmon@google.com, Oct 13, 2018
  10. Junio C HamanoOct 16, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.