Skip to contentSkip to conversation

fuzz: reorganise the path for existing oss-fuzz fuzzers

PATCH Superseded Arthur Chan via GitGitGadget 4 participants 9 messages Sep 16, 2022 – Sep 19, 2022 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fuzz: reorganise the path for existing oss-fuzz fuzzers

From: Arthur Chan <[email protected]>

This patch is aimed to provide a better organisation for oss-fuzz fuzzers, allowing more fuzzers for the git project to be added in a later development.

A new folder oss-fuzz has been created and existing fuzzers are moved into the new folders. Makefile has been fixed accordingly.

CC Josh Steadmon <[email protected]>
CC David Korczynski <[email protected]>

---
fuzz: reorganise the path for existing oss-fuzz fuzzers

This patch is aimed to provide a better organisation for oss-fuzz fuzzers, allowing more fuzzers for the git project to be added in a later development.

A new folder oss-fuzz has been created and existing fuzzers are moved into the new folders. Makefile has been fixed accordingly.

CC: Josh Steadmon [email protected] CC: David Korczynski [email protected] Signed-off-by: Arthur Chan [email protected]

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1353%2Farthurscchan%2Frelocate-fuzzer-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1353/arthurscchan/relocate-fuzzer-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1353

 Makefile                                            | 6 +++---
 fuzz-commit-graph.c => oss-fuzz/fuzz-commit-graph.c | 0
 fuzz-pack-headers.c => oss-fuzz/fuzz-pack-headers.c | 0
 fuzz-pack-idx.c => oss-fuzz/fuzz-pack-idx.c         | 0
 4 files changed, 3 insertions(+), 3 deletions(-)
 rename fuzz-commit-graph.c => oss-fuzz/fuzz-commit-graph.c (100%)
 rename fuzz-pack-headers.c => oss-fuzz/fuzz-pack-headers.c (100%)
 rename fuzz-pack-idx.c => oss-fuzz/fuzz-pack-idx.c (100%)
Makefile +3 -3
index d9247ead45b..2d56aae7a1d 100644
@@ -686,9 +686,9 @@ SCRIPTS = $(SCRIPT_SH_GEN) \
 
 ETAGS_TARGET = TAGS
 
-FUZZ_OBJS += fuzz-commit-graph.o
-FUZZ_OBJS += fuzz-pack-headers.o
-FUZZ_OBJS += fuzz-pack-idx.o
+FUZZ_OBJS += oss-fuzz/fuzz-commit-graph.o
+FUZZ_OBJS += oss-fuzz/fuzz-pack-headers.o
+FUZZ_OBJS += oss-fuzz/fuzz-pack-idx.o
 .PHONY: fuzz-objs
 fuzz-objs: $(FUZZ_OBJS)
 
oss-fuzz/fuzz-commit-graph.c renamed from fuzz-commit-graph.c +0 -0
similarity index 100%
rename from fuzz-commit-graph.c
rename to oss-fuzz/fuzz-commit-graph.c
oss-fuzz/fuzz-pack-headers.c renamed from fuzz-pack-headers.c +0 -0
similarity index 100%
rename from fuzz-pack-headers.c
rename to oss-fuzz/fuzz-pack-headers.c
oss-fuzz/fuzz-pack-idx.c renamed from fuzz-pack-idx.c +0 -0
similarity index 100%
rename from fuzz-pack-idx.c
rename to oss-fuzz/fuzz-pack-idx.c

base-commit: d3fa443f97e3a8d75b51341e2d5bac380b7422df

Signature · 1 line
gitgitgadget
#1 lore raw
Quoted 8 lines · Arthur Chan via GitGitGadget

From: Arthur Chan <[email protected]>

This patch is aimed to provide a better organisation for oss-fuzz fuzzers, allowing more fuzzers for the git project to be added in a later development.

A new folder oss-fuzz has been created and existing fuzzers are moved into the new folders. Makefile has been fixed accordingly.

"folder" -> "directory" everywhere.

Quoted 8 lines
 Makefile                                            | 6 +++---
 fuzz-commit-graph.c => oss-fuzz/fuzz-commit-graph.c | 0
 fuzz-pack-headers.c => oss-fuzz/fuzz-pack-headers.c | 0
 fuzz-pack-idx.c => oss-fuzz/fuzz-pack-idx.c         | 0
 4 files changed, 3 insertions(+), 3 deletions(-)
 rename fuzz-commit-graph.c => oss-fuzz/fuzz-commit-graph.c (100%)
 rename fuzz-pack-headers.c => oss-fuzz/fuzz-pack-headers.c (100%)
 rename fuzz-pack-idx.c => oss-fuzz/fuzz-pack-idx.c (100%)

It is curious that we do not have any changes to .gitignore patterns.

    $ git grep fuzz .gitignore Makefile
    .gitignore:/fuzz-commit-graph
    .gitignore:/fuzz_corpora
    .gitignore:/fuzz-pack-headers
    .gitignore:/fuzz-pack-idx
    Makefile:FUZZ_OBJS += fuzz-commit-graph.o
    Makefile:FUZZ_OBJS += fuzz-pack-headers.o
    Makefile:FUZZ_OBJS += fuzz-pack-idx.o
    Makefile:.PHONY: fuzz-objs
    Makefile:fuzz-objs: $(FUZZ_OBJS)
    Makefile:# Always build fuzz objects even if not testing, to prevent bit-rot.
    Makefile:# Building fuzz targets generally requires a special set of compiler flags that
    Makefile:#      CFLAGS="-fsanitize=fuzzer-no-link,address" \
    Makefile:#      LIB_FUZZING_ENGINE="-fsanitize=fuzzer" \
    Makefile:#      fuzz-all
    Makefile:.PHONY: fuzz-all
    Makefile:fuzz-all: $(FUZZ_PROGRAMS)

I do not know what "fuzz_corpora" is, which step in build creates it, and why we do not have to bother removing it in "make clean", the last of which is not the fault of this patch, but I suspect that at least other three existing entries that name $(FUZZ_PROGRAMS) need to be updated, because ...

Quoted 5 lines
Makefile +0 -0
index d9247ead45b..2d56aae7a1d 100644

Makefile SCRIPTS = $(SCRIPT_SH_GEN) \ · line 691

Quoted 9 lines
Makefile +3 -3
@@ -686,9 +686,9 @@ SCRIPTS = $(SCRIPT_SH_GEN) \
 
 ETAGS_TARGET = TAGS
 
-FUZZ_OBJS += fuzz-commit-graph.o
-FUZZ_OBJS += fuzz-pack-headers.o
-FUZZ_OBJS += fuzz-pack-idx.o
+FUZZ_OBJS += oss-fuzz/fuzz-commit-graph.o
+FUZZ_OBJS += oss-fuzz/fuzz-pack-headers.o
+FUZZ_OBJS += oss-fuzz/fuzz-pack-idx.o

... FUZZ_OBJS now live in the oss-fuzz/ directory, and Makefile has

    FUZZ_PROGRAMS += $(patsubst %.o,%,$(FUZZ_OBJS))

    $(FUZZ_PROGRAMS): all
	$(QUIET_LINK)$(CXX) $(FUZZ_CXXFLAGS) $(LIB_OBJS) $(BUILTIN_OBJS) \
		$(XDIFF_OBJS) $(EXTLIBS) git.o [email protected] $(LIB_FUZZING_ENGINE) -o $@

neither of which has been touched by the patch, so presumably the executables are now created in the oss-fuzz/ directory as well, and they are what .gitignore should be listing, right?

Also, compiling the exectuable files would not be the end of the story, right? Do folks (like test script, makefile targets and CI recipes) who used to run ./fuzz-commit-graph need to be told that they now need to run oss-fuzz/fuzz-commit-graph instead? They may not be inside my tree, but what's the best way to inform them? Add entries to release notes (not asking you to add one immediately --- asking you to help formulating the plans).

Thanks.

#2 lore raw
Quoted 11 lines · Junio C Hamano
Quoted 8 lines · Arthur Chan via GitGitGadget

From: Arthur Chan <[email protected]>

This patch is aimed to provide a better organisation for oss-fuzz fuzzers, allowing more fuzzers for the git project to be added in a later development.

A new folder oss-fuzz has been created and existing fuzzers are moved into the new folders. Makefile has been fixed accordingly.

"folder" -> "directory" everywhere.

Thanks for the suggestion. I will change it in v2.

Quoted 29 lines
Quoted 8 lines
  Makefile                                            | 6 +++---
  fuzz-commit-graph.c => oss-fuzz/fuzz-commit-graph.c | 0
  fuzz-pack-headers.c => oss-fuzz/fuzz-pack-headers.c | 0
  fuzz-pack-idx.c => oss-fuzz/fuzz-pack-idx.c         | 0
  4 files changed, 3 insertions(+), 3 deletions(-)

rename fuzz-commit-graph.c => oss-fuzz/fuzz-commit-graph.c (100%) rename fuzz-pack-headers.c => oss-fuzz/fuzz-pack-headers.c (100%) rename fuzz-pack-idx.c => oss-fuzz/fuzz-pack-idx.c (100%)

It is curious that we do not have any changes to .gitignore patterns.

     $ git grep fuzz .gitignore Makefile
     .gitignore:/fuzz-commit-graph
     .gitignore:/fuzz_corpora
     .gitignore:/fuzz-pack-headers
     .gitignore:/fuzz-pack-idx
     Makefile:FUZZ_OBJS += fuzz-commit-graph.o
     Makefile:FUZZ_OBJS += fuzz-pack-headers.o
     Makefile:FUZZ_OBJS += fuzz-pack-idx.o
     Makefile:.PHONY: fuzz-objs
     Makefile:fuzz-objs: $(FUZZ_OBJS)
     Makefile:# Always build fuzz objects even if not testing, to prevent bit-rot.
     Makefile:# Building fuzz targets generally requires a special set of compiler flags that
     Makefile:#      CFLAGS="-fsanitize=fuzzer-no-link,address" \
     Makefile:#      LIB_FUZZING_ENGINE="-fsanitize=fuzzer" \
     Makefile:#      fuzz-all
     Makefile:.PHONY: fuzz-all
     Makefile:fuzz-all: $(FUZZ_PROGRAMS)
Quoted 5 lines

I do not know what "fuzz_corpora" is, which step in build creates it, and why we do not have to bother removing it in "make clean", the last of which is not the fault of this patch, but I suspect that at least other three existing entries that name $(FUZZ_PROGRAMS) need to be updated, because ...

I also have no idea what fuzz_corpora is, I will ask the person who wrote the three fuzzers to see if he got any idea.

And yes, indeed, I miss the change in .gitignore, I will modify it and push it to v2.

Quoted 22 lines
Quoted 5 lines
Makefile +0 -0
index d9247ead45b..2d56aae7a1d 100644

Makefile SCRIPTS = $(SCRIPT_SH_GEN) \ · line 691

Quoted 9 lines
Makefile +3 -3
@@ -686,9 +686,9 @@ SCRIPTS = $(SCRIPT_SH_GEN) \
 
  ETAGS_TARGET = TAGS
 
-FUZZ_OBJS += fuzz-commit-graph.o
-FUZZ_OBJS += fuzz-pack-headers.o
-FUZZ_OBJS += fuzz-pack-idx.o
+FUZZ_OBJS += oss-fuzz/fuzz-commit-graph.o
+FUZZ_OBJS += oss-fuzz/fuzz-pack-headers.o
+FUZZ_OBJS += oss-fuzz/fuzz-pack-idx.o

... FUZZ_OBJS now live in the oss-fuzz/ directory, and Makefile has

     FUZZ_PROGRAMS += $(patsubst %.o,%,$(FUZZ_OBJS))

     $(FUZZ_PROGRAMS): all
         $(QUIET_LINK)$(CXX) $(FUZZ_CXXFLAGS) $(LIB_OBJS) $(BUILTIN_OBJS) \
                 $(XDIFF_OBJS) $(EXTLIBS) git.o [email protected] $(LIB_FUZZING_ENGINE) -o $@
Quoted 3 lines

neither of which has been touched by the patch, so presumably the executables are now created in the oss-fuzz/ directory as well, and they are what .gitignore should be listing, right?

Yes, indeed. sorry for missing out the changes in .gitignore. I will modify it and push it to v2

Quoted 8 lines

Also, compiling the exectuable files would not be the end of the story, right? Do folks (like test script, makefile targets and CI recipes) who used to run ./fuzz-commit-graph need to be told that they now need to run oss-fuzz/fuzz-commit-graph instead? They may not be inside my tree, but what's the best way to inform them? Add entries to release notes (not asking you to add one immediately --- asking you to help formulating the plans).

In general, for the oss-fuzz project, there will be a dockerfile and build script prepared for each of the target project. The Dockerfile will pull out the target version of the the target project, setting them up for the build script. Then the build script will compile the target project together with the fuzzers. After that it will move the compiled fuzzer into correct location for the oss-fuzz library to grab them and start the fuzzing process. The fuzzing and execution of those fuzzers are all on the oss-fuzz side. We are just trying to push fuzzers to the git upstream in order to allow it to compile and sync with the git repository which the fuzzers depending on. This is the existing execution plan for those fuzzers as far as I know. We are actually in offline discussion with the person who create that three fuzzers and we agree to go on this route. For your reference, you could find the dockerfile and build script of the oss-fuzz for the git repository in
https://github.com/google/oss-fuzz/tree/master/projects/git. We will of course need to update the build script on the oss-fuzz tree in order to allow oss-fuzz to retrieve the fuzzers after it has been reloacted. But this won't affect the git tree.

Thanks again for pointing out my careless mistake on .gitignore. I will fix that together with the comment and push a v2. Thanks very much for your time. Cheers

Quoted 4 lines

Thanks.
ADA Logics Ltd is registered in England. No: 11624074. Registered office: 266 Banbury Road, Post Box 292, OX2 7DL, Oxford, Oxfordshire , United Kingdom

ADA Logics Ltd is registered in England. No: 11624074. Registered office: 266 Banbury Road, Post Box 292, OX2 7DL, Oxford, Oxfordshire , United Kingdom

#3 lore raw

PATCH v2 1/1 fuzz: reorganise the path for existing oss-fuzz fuzzers

In reply to Arthur Chan via GitGitGadget

From: Arthur Chan <[email protected]>

This patch is aimed to provide a better organisation for oss-fuzz fuzzers, allowing more fuzzers for the git project to be added in later development.

A new direrctory oss-fuzz has been created and existing fuzzers are moved into the new directory. Makefile and .gitignore have been fixed accordingly.

CC Josh Steadmon <[email protected]>
CC David Korczynski <[email protected]>

---
fuzz: reorganise the path for existing oss-fuzz fuzzers

This patch is aimed to provide a better organisation for oss-fuzz fuzzers, allowing more fuzzers for the git project to be added in later development.

A new directory oss-fuzz has been created and existing fuzzers are moved into the new directory. Makefile and .gitignore have been fixed accordingly.

CC: Josh Steadmon [email protected] CC: David Korczynski [email protected] Signed-off-by: Arthur Chan [email protected]

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1353%2Farthurscchan%2Frelocate-fuzzer-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1353/arthurscchan/relocate-fuzzer-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/1353

Range-diff vs v1:

1: 1cc90522b7b ! 1: c056429897a fuzz: reorganise the path for existing oss-fuzz fuzzers
@@ Commit message

This patch is aimed to provide a better organisation for oss-fuzz fuzzers, allowing more fuzzers for the git project to be added
- in a later development.
+ in later development.

- A new folder oss-fuzz has been created and existing fuzzers are
- moved into the new folders. Makefile has been fixed accordingly.
+ A new direrctory oss-fuzz has been created and existing fuzzers are
+ moved into the new directory. Makefile and .gitignore have been
+ fixed accordingly.

CC Josh Steadmon <[email protected]>
CC David Korczynski <[email protected]>

+ ## .gitignore ##
+@@
+-/fuzz-commit-graph
+-/fuzz_corpora
+-/fuzz-pack-headers
++/oss-fuzz/fuzz-commit-graph
++/oss-fuzz/fuzz_corpora
++/oss-fuzz/fuzz-pack-headers
+ /fuzz-pack-idx
+ /GIT-BUILD-OPTIONS
+ /GIT-CFLAGS
+
## Makefile ##
@@ Makefile: SCRIPTS = $(SCRIPT_SH_GEN) \

 .gitignore                                          | 6 +++---
 Makefile                                            | 6 +++---
 fuzz-commit-graph.c => oss-fuzz/fuzz-commit-graph.c | 0
 fuzz-pack-headers.c => oss-fuzz/fuzz-pack-headers.c | 0
 fuzz-pack-idx.c => oss-fuzz/fuzz-pack-idx.c         | 0
 5 files changed, 6 insertions(+), 6 deletions(-)
 rename fuzz-commit-graph.c => oss-fuzz/fuzz-commit-graph.c (100%)
 rename fuzz-pack-headers.c => oss-fuzz/fuzz-pack-headers.c (100%)
 rename fuzz-pack-idx.c => oss-fuzz/fuzz-pack-idx.c (100%)
.gitignore +3 -3
index 80b530bbed2..9e810c07ba9 100644
@@ -1,6 +1,6 @@
-/fuzz-commit-graph
-/fuzz_corpora
-/fuzz-pack-headers
+/oss-fuzz/fuzz-commit-graph
+/oss-fuzz/fuzz_corpora
+/oss-fuzz/fuzz-pack-headers
 /fuzz-pack-idx
 /GIT-BUILD-OPTIONS
 /GIT-CFLAGS
Makefile +3 -3
index d9247ead45b..2d56aae7a1d 100644
@@ -686,9 +686,9 @@ SCRIPTS = $(SCRIPT_SH_GEN) \
 
 ETAGS_TARGET = TAGS
 
-FUZZ_OBJS += fuzz-commit-graph.o
-FUZZ_OBJS += fuzz-pack-headers.o
-FUZZ_OBJS += fuzz-pack-idx.o
+FUZZ_OBJS += oss-fuzz/fuzz-commit-graph.o
+FUZZ_OBJS += oss-fuzz/fuzz-pack-headers.o
+FUZZ_OBJS += oss-fuzz/fuzz-pack-idx.o
 .PHONY: fuzz-objs
 fuzz-objs: $(FUZZ_OBJS)
 
oss-fuzz/fuzz-commit-graph.c renamed from fuzz-commit-graph.c +0 -0
similarity index 100%
rename from fuzz-commit-graph.c
rename to oss-fuzz/fuzz-commit-graph.c
oss-fuzz/fuzz-pack-headers.c renamed from fuzz-pack-headers.c +0 -0
similarity index 100%
rename from fuzz-pack-headers.c
rename to oss-fuzz/fuzz-pack-headers.c
oss-fuzz/fuzz-pack-idx.c renamed from fuzz-pack-idx.c +0 -0
similarity index 100%
rename from fuzz-pack-idx.c
rename to oss-fuzz/fuzz-pack-idx.c

base-commit: d3fa443f97e3a8d75b51341e2d5bac380b7422df

Signature · 1 line
gitgitgadget
#4 lore raw

PATCH v3 1/1 fuzz: reorganise the path for existing oss-fuzz fuzzers

From: Arthur Chan <[email protected]>

This patch is aimed to provide a better organisation for oss-fuzz fuzzers, allowing more fuzzers for the git project to be added in later development.

A new direrctory oss-fuzz has been created and existing fuzzers are moved into the new directory. Makefile and .gitignore have been fixed accordingly.

CC Josh Steadmon <[email protected]>
CC David Korczynski <[email protected]>

---
fuzz: reorganise the path for existing oss-fuzz fuzzers

This patch is aimed to provide a better organisation for oss-fuzz fuzzers, allowing more fuzzers for the git project to be added in later development.

A new directory oss-fuzz has been created and existing fuzzers are moved into the new directory. Makefile and .gitignore have been fixed accordingly.

Fix wrong push for v2

CC: Josh Steadmon [email protected] CC: David Korczynski [email protected] Signed-off-by: Arthur Chan [email protected]

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1353%2Farthurscchan%2Frelocate-fuzzer-v3
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1353/arthurscchan/relocate-fuzzer-v3
Pull-Request: https://github.com/gitgitgadget/git/pull/1353

Range-diff vs v2:

1: c056429897a ! 1: 21714e583aa fuzz: reorganise the path for existing oss-fuzz fuzzers

     @@ Commit message
       ## .gitignore ##
      @@
      -/fuzz-commit-graph
     --/fuzz_corpora
     --/fuzz-pack-headers
      +/oss-fuzz/fuzz-commit-graph
     -+/oss-fuzz/fuzz_corpora
     + /fuzz_corpora
     +-/fuzz-pack-headers
     +-/fuzz-pack-idx
      +/oss-fuzz/fuzz-pack-headers
     - /fuzz-pack-idx
     ++/oss-fuzz/fuzz-pack-idx
       /GIT-BUILD-OPTIONS
       /GIT-CFLAGS
     + /GIT-LDFLAGS
      
       ## Makefile ##
      @@ Makefile: SCRIPTS = $(SCRIPT_SH_GEN) \
 .gitignore                                          | 6 +++---
 Makefile                                            | 6 +++---
 fuzz-commit-graph.c => oss-fuzz/fuzz-commit-graph.c | 0
 fuzz-pack-headers.c => oss-fuzz/fuzz-pack-headers.c | 0
 fuzz-pack-idx.c => oss-fuzz/fuzz-pack-idx.c         | 0
 5 files changed, 6 insertions(+), 6 deletions(-)
 rename fuzz-commit-graph.c => oss-fuzz/fuzz-commit-graph.c (100%)
 rename fuzz-pack-headers.c => oss-fuzz/fuzz-pack-headers.c (100%)
 rename fuzz-pack-idx.c => oss-fuzz/fuzz-pack-idx.c (100%)
.gitignore +3 -3
index 80b530bbed2..d11fa8297d2 100644
@@ -1,7 +1,7 @@
-/fuzz-commit-graph
+/oss-fuzz/fuzz-commit-graph
 /fuzz_corpora
-/fuzz-pack-headers
-/fuzz-pack-idx
+/oss-fuzz/fuzz-pack-headers
+/oss-fuzz/fuzz-pack-idx
 /GIT-BUILD-OPTIONS
 /GIT-CFLAGS
 /GIT-LDFLAGS
Makefile +3 -3
index d9247ead45b..2d56aae7a1d 100644
@@ -686,9 +686,9 @@ SCRIPTS = $(SCRIPT_SH_GEN) \
 
 ETAGS_TARGET = TAGS
 
-FUZZ_OBJS += fuzz-commit-graph.o
-FUZZ_OBJS += fuzz-pack-headers.o
-FUZZ_OBJS += fuzz-pack-idx.o
+FUZZ_OBJS += oss-fuzz/fuzz-commit-graph.o
+FUZZ_OBJS += oss-fuzz/fuzz-pack-headers.o
+FUZZ_OBJS += oss-fuzz/fuzz-pack-idx.o
 .PHONY: fuzz-objs
 fuzz-objs: $(FUZZ_OBJS)
 
oss-fuzz/fuzz-commit-graph.c renamed from fuzz-commit-graph.c +0 -0
similarity index 100%
rename from fuzz-commit-graph.c
rename to oss-fuzz/fuzz-commit-graph.c
oss-fuzz/fuzz-pack-headers.c renamed from fuzz-pack-headers.c +0 -0
similarity index 100%
rename from fuzz-pack-headers.c
rename to oss-fuzz/fuzz-pack-headers.c
oss-fuzz/fuzz-pack-idx.c renamed from fuzz-pack-idx.c +0 -0
similarity index 100%
rename from fuzz-pack-idx.c
rename to oss-fuzz/fuzz-pack-idx.c

base-commit: d3fa443f97e3a8d75b51341e2d5bac380b7422df

Signature · 1 line
gitgitgadget
#5 lore raw
Quoted 5 lines · Arthur Chan via GitGitGadget

From: Arthur Chan <[email protected]>

This patch is aimed to provide a better organisation for oss-fuzz fuzzers, allowing more fuzzers for the git project to be added in later development.

I don't see any problem with this change per-se, but this rationale really doesn't explain anything in the end to the reader. How does just having x/y-*.c files rather than x-y-*.c allow for more fuzzers to be added? We could also add new fuzzers to the top-level now, why does this change help us to do so.

I suspect the unstated reason is just "adding a lot more would make the top-level cluttered", or perhaps some design reason you hinted at in
https://lore.kernel.org/git/[email protected]/
(but I haven't taken the time to fully understand).

So, I'm fine with this v3 as-is, but also wouldn't mind a v4 with an updated commit message to address the above confusion.

.gitignore line 7

Quoted 13 lines
.gitignore +3 -3
@@ -1,7 +1,7 @@
-/fuzz-commit-graph
+/oss-fuzz/fuzz-commit-graph
 /fuzz_corpora
-/fuzz-pack-headers
-/fuzz-pack-idx
+/oss-fuzz/fuzz-pack-headers
+/oss-fuzz/fuzz-pack-idx
 /GIT-BUILD-OPTIONS
 /GIT-CFLAGS
 /GIT-LDFLAGS

Speaking of clutter, a much better change here IMO would be to create a /oss-fuzz/.gitignore file, and then move these there. For prior art see:

git ls-files '**/.gitignore'

Even better (but I'm not sure how this is all used in the end), can we perhaps build those in a .gitignore'd oss-fuzz/.build/.

But maybe not, and in any case that would be a larger change to the Makefile logic, so we can leave it for now, but I do think it makes sense to create a oss-fuzz/.gitignore in a v4.

#6 lore raw

PATCH v4 1/1 fuzz: reorganise the path for existing oss-fuzz fuzzers

In reply to Arthur Chan via GitGitGadget

From: Arthur Chan <[email protected]>

This patch is aimed to provide a better organisation for oss-fuzz fuzzers and to avoid top-level clustters in the git repository when more fuzzers are introduced. In addition, grouping the fuzzers into their own directory separate their application on fuzz-testing from the core functionalities of the git code. It also provide better and tidier structure the oss-fuzz fuzzing library to manage, locate, build and execute those fuzzers for fuzz-testing purposes in future development.

A new direrctory oss-fuzz has been created and existing fuzzers are moved into the new directory. Makefile and .gitignore have been fixed accordingly.

CC Josh Steadmon <[email protected]>
CC David Korczynski <[email protected]>

---
fuzz: reorganise the path for existing oss-fuzz fuzzers

This patch is aimed to provide a better organisation for oss-fuzz fuzzers and to avoid top-level clustters in the git repository when more fuzzers are introduced. In addition, grouping the fuzzers into their own directory separate their application on fuzz-testing from the core functionalities of the git code. It also provide better and tidier structure the oss-fuzz fuzzing library to manage, locate, build and execute those fuzzers for fuzz-testing purposes in future development.

A new direrctory oss-fuzz has been created and existing fuzzers are moved into the new directory. Makefile and .gitignore have been fixed accordingly.

Create new .gitignore file for the new directory in v4 and fix the commit message.

CC: Josh Steadmon [email protected] CC: David Korczynski [email protected] Signed-off-by: Arthur Chan [email protected]

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1353%2Farthurscchan%2Frelocate-fuzzer-v4
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1353/arthurscchan/relocate-fuzzer-v4
Pull-Request: https://github.com/gitgitgadget/git/pull/1353

Range-diff vs v3:

1: 21714e583aa ! 1: 82d9568ea65 fuzz: reorganise the path for existing oss-fuzz fuzzers
@@ Commit message
fuzz: reorganise the path for existing oss-fuzz fuzzers

This patch is aimed to provide a better organisation for oss-fuzz
- fuzzers, allowing more fuzzers for the git project to be added
- in later development.
+ fuzzers and to avoid top-level clustters in the git repository when
+ more fuzzers are introduced. In addition, grouping the fuzzers into
+ their own directory separate their application on fuzz-testing from
+ the core functionalities of the git code. It also provide better
+ and tidier structure the oss-fuzz fuzzing library to manage, locate,
+ build and execute those fuzzers for fuzz-testing purposes in future
+ development.

A new direrctory oss-fuzz has been created and existing fuzzers are moved into the new directory. Makefile and .gitignore have been
@@ Commit message
## .gitignore ##
@@
-/fuzz-commit-graph
-+/oss-fuzz/fuzz-commit-graph
/fuzz_corpora
-/fuzz-pack-headers
-/fuzz-pack-idx
-+/oss-fuzz/fuzz-pack-headers
-+/oss-fuzz/fuzz-pack-idx
/GIT-BUILD-OPTIONS
/GIT-CFLAGS
/GIT-LDFLAGS
@@ Makefile: SCRIPTS = $(SCRIPT_SH_GEN) \
fuzz-objs: $(FUZZ_OBJS)

+ ## oss-fuzz/.gitignore (new) ##
+@@
++fuzz-commit-graph
++fuzz-pack-headers
++fuzz-pack-idx
+
## fuzz-commit-graph.c => oss-fuzz/fuzz-commit-graph.c ##

## fuzz-pack-headers.c => oss-fuzz/fuzz-pack-headers.c ##

 .gitignore                                          | 3 ---
 Makefile                                            | 6 +++---
 oss-fuzz/.gitignore                                 | 3 +++
 fuzz-commit-graph.c => oss-fuzz/fuzz-commit-graph.c | 0
 fuzz-pack-headers.c => oss-fuzz/fuzz-pack-headers.c | 0
 fuzz-pack-idx.c => oss-fuzz/fuzz-pack-idx.c         | 0
 6 files changed, 6 insertions(+), 6 deletions(-)
 create mode 100644 oss-fuzz/.gitignore
 rename fuzz-commit-graph.c => oss-fuzz/fuzz-commit-graph.c (100%)
 rename fuzz-pack-headers.c => oss-fuzz/fuzz-pack-headers.c (100%)
 rename fuzz-pack-idx.c => oss-fuzz/fuzz-pack-idx.c (100%)
.gitignore +0 -3
index 80b530bbed2..ed8b9f04e5c 100644
@@ -1,7 +1,4 @@
-/fuzz-commit-graph
 /fuzz_corpora
-/fuzz-pack-headers
-/fuzz-pack-idx
 /GIT-BUILD-OPTIONS
 /GIT-CFLAGS
 /GIT-LDFLAGS
Makefile +3 -3
index d9247ead45b..2d56aae7a1d 100644
@@ -686,9 +686,9 @@ SCRIPTS = $(SCRIPT_SH_GEN) \
 
 ETAGS_TARGET = TAGS
 
-FUZZ_OBJS += fuzz-commit-graph.o
-FUZZ_OBJS += fuzz-pack-headers.o
-FUZZ_OBJS += fuzz-pack-idx.o
+FUZZ_OBJS += oss-fuzz/fuzz-commit-graph.o
+FUZZ_OBJS += oss-fuzz/fuzz-pack-headers.o
+FUZZ_OBJS += oss-fuzz/fuzz-pack-idx.o
 .PHONY: fuzz-objs
 fuzz-objs: $(FUZZ_OBJS)
 
oss-fuzz/.gitignore new file +3 -0
new file mode 100644
index 00000000000..9acb74412ef
@@ -0,0 +1,3 @@
+fuzz-commit-graph
+fuzz-pack-headers
+fuzz-pack-idx
oss-fuzz/fuzz-commit-graph.c renamed from fuzz-commit-graph.c +0 -0
similarity index 100%
rename from fuzz-commit-graph.c
rename to oss-fuzz/fuzz-commit-graph.c
oss-fuzz/fuzz-pack-headers.c renamed from fuzz-pack-headers.c +0 -0
similarity index 100%
rename from fuzz-pack-headers.c
rename to oss-fuzz/fuzz-pack-headers.c
oss-fuzz/fuzz-pack-idx.c renamed from fuzz-pack-idx.c +0 -0
similarity index 100%
rename from fuzz-pack-idx.c
rename to oss-fuzz/fuzz-pack-idx.c

base-commit: d3fa443f97e3a8d75b51341e2d5bac380b7422df

Signature · 1 line
gitgitgadget
#7 lore raw
Quoted 11 lines · Arthur Chan via GitGitGadget

From: Arthur Chan <[email protected]>

This patch is aimed to provide a better organisation for oss-fuzz fuzzers and to avoid top-level clustters in the git repository when more fuzzers are introduced. In addition, grouping the fuzzers into their own directory separate their application on fuzz-testing from the core functionalities of the git code. It also provide better and tidier structure the oss-fuzz fuzzing library to manage, locate, build and execute those fuzzers for fuzz-testing purposes in future development.

Quoted 8 lines

A new direrctory oss-fuzz has been created and existing fuzzers are moved into the new directory. Makefile and .gitignore have been fixed accordingly.

CC Josh Steadmon <[email protected]>
CC David Korczynski <[email protected]>

---

Thanks. Will queue with a bit of rephrasing of the above.

#8 lore raw
In reply to Arthur Chan via GitGitGadget
Quoted 11 lines · Arthur Chan via GitGitGadget

From: Arthur Chan <[email protected]>

This patch is aimed to provide a better organisation for oss-fuzz fuzzers and to avoid top-level clustters in the git repository when more fuzzers are introduced. In addition, grouping the fuzzers into their own directory separate their application on fuzz-testing from the core functionalities of the git code. It also provide better and tidier structure the oss-fuzz fuzzing library to manage, locate, build and execute those fuzzers for fuzz-testing purposes in future development.

Quoted 6 lines

A new direrctory oss-fuzz has been created and existing fuzzers are moved into the new directory. Makefile and .gitignore have been fixed accordingly.

CC Josh Steadmon <[email protected]>
CC David Korczynski <[email protected]>

If you mean to tell these people about your work, write these lines on the header of your outgoing e-mail (or instruct GitGitGadget to do so), not here (if writing them here is the only way to instruct GGG to do so then I wouldn't object, but apparently that is not happening and I had to add them manually to this message.

Thanks.

Quoted 137 lines

---
fuzz: reorganise the path for existing oss-fuzz fuzzers

This patch is aimed to provide a better organisation for oss-fuzz fuzzers and to avoid top-level clustters in the git repository when more fuzzers are introduced. In addition, grouping the fuzzers into their own directory separate their application on fuzz-testing from the core functionalities of the git code. It also provide better and tidier structure the oss-fuzz fuzzing library to manage, locate, build and execute those fuzzers for fuzz-testing purposes in future development.

A new direrctory oss-fuzz has been created and existing fuzzers are moved into the new directory. Makefile and .gitignore have been fixed accordingly.

Create new .gitignore file for the new directory in v4 and fix the commit message.

CC: Josh Steadmon [email protected] CC: David Korczynski [email protected] Signed-off-by: Arthur Chan [email protected]

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1353%2Farthurscchan%2Frelocate-fuzzer-v4
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1353/arthurscchan/relocate-fuzzer-v4
Pull-Request: https://github.com/gitgitgadget/git/pull/1353

Range-diff vs v3:

1: 21714e583aa ! 1: 82d9568ea65 fuzz: reorganise the path for existing oss-fuzz fuzzers
@@ Commit message
fuzz: reorganise the path for existing oss-fuzz fuzzers

This patch is aimed to provide a better organisation for oss-fuzz
- fuzzers, allowing more fuzzers for the git project to be added
- in later development.
+ fuzzers and to avoid top-level clustters in the git repository when
+ more fuzzers are introduced. In addition, grouping the fuzzers into
+ their own directory separate their application on fuzz-testing from
+ the core functionalities of the git code. It also provide better
+ and tidier structure the oss-fuzz fuzzing library to manage, locate,
+ build and execute those fuzzers for fuzz-testing purposes in future
+ development.

A new direrctory oss-fuzz has been created and existing fuzzers are moved into the new directory. Makefile and .gitignore have been
@@ Commit message
## .gitignore ##
@@
-/fuzz-commit-graph
-+/oss-fuzz/fuzz-commit-graph
/fuzz_corpora
-/fuzz-pack-headers
-/fuzz-pack-idx
-+/oss-fuzz/fuzz-pack-headers
-+/oss-fuzz/fuzz-pack-idx
/GIT-BUILD-OPTIONS
/GIT-CFLAGS
/GIT-LDFLAGS
@@ Makefile: SCRIPTS = $(SCRIPT_SH_GEN) \
fuzz-objs: $(FUZZ_OBJS)

+ ## oss-fuzz/.gitignore (new) ##
+@@
++fuzz-commit-graph
++fuzz-pack-headers
++fuzz-pack-idx
+
## fuzz-commit-graph.c => oss-fuzz/fuzz-commit-graph.c ##

## fuzz-pack-headers.c => oss-fuzz/fuzz-pack-headers.c ##

 .gitignore                                          | 3 ---
 Makefile                                            | 6 +++---
 oss-fuzz/.gitignore                                 | 3 +++
 fuzz-commit-graph.c => oss-fuzz/fuzz-commit-graph.c | 0
 fuzz-pack-headers.c => oss-fuzz/fuzz-pack-headers.c | 0
 fuzz-pack-idx.c => oss-fuzz/fuzz-pack-idx.c         | 0
 6 files changed, 6 insertions(+), 6 deletions(-)
 create mode 100644 oss-fuzz/.gitignore
 rename fuzz-commit-graph.c => oss-fuzz/fuzz-commit-graph.c (100%)
 rename fuzz-pack-headers.c => oss-fuzz/fuzz-pack-headers.c (100%)
 rename fuzz-pack-idx.c => oss-fuzz/fuzz-pack-idx.c (100%)
.gitignore +0 -3
index 80b530bbed2..ed8b9f04e5c 100644
@@ -1,7 +1,4 @@
-/fuzz-commit-graph
 /fuzz_corpora
-/fuzz-pack-headers
-/fuzz-pack-idx
 /GIT-BUILD-OPTIONS
 /GIT-CFLAGS
 /GIT-LDFLAGS
Makefile +3 -3
index d9247ead45b..2d56aae7a1d 100644
@@ -686,9 +686,9 @@ SCRIPTS = $(SCRIPT_SH_GEN) \
 
 ETAGS_TARGET = TAGS
 
-FUZZ_OBJS += fuzz-commit-graph.o
-FUZZ_OBJS += fuzz-pack-headers.o
-FUZZ_OBJS += fuzz-pack-idx.o
+FUZZ_OBJS += oss-fuzz/fuzz-commit-graph.o
+FUZZ_OBJS += oss-fuzz/fuzz-pack-headers.o
+FUZZ_OBJS += oss-fuzz/fuzz-pack-idx.o
 .PHONY: fuzz-objs
 fuzz-objs: $(FUZZ_OBJS)
 
oss-fuzz/.gitignore new file +3 -0
new file mode 100644
index 00000000000..9acb74412ef
@@ -0,0 +1,3 @@
+fuzz-commit-graph
+fuzz-pack-headers
+fuzz-pack-idx
oss-fuzz/fuzz-commit-graph.c renamed from fuzz-commit-graph.c +0 -0
similarity index 100%
rename from fuzz-commit-graph.c
rename to oss-fuzz/fuzz-commit-graph.c
oss-fuzz/fuzz-pack-headers.c renamed from fuzz-pack-headers.c +0 -0
similarity index 100%
rename from fuzz-pack-headers.c
rename to oss-fuzz/fuzz-pack-headers.c
oss-fuzz/fuzz-pack-idx.c renamed from fuzz-pack-idx.c +0 -0
similarity index 100%
rename from fuzz-pack-idx.c
rename to oss-fuzz/fuzz-pack-idx.c

base-commit: d3fa443f97e3a8d75b51341e2d5bac380b7422df