xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xen.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Wei Liu <wei.liu2@citrix.com>, Jan Beulich <JBeulich@suse.com>
Subject: [PATCH 4/8] tools/insn-fuzz: Use shorter filenames
Date: Mon, 20 Mar 2017 11:19:41 +0000	[thread overview]
Message-ID: <1490008785-6058-5-git-send-email-andrew.cooper3@citrix.com> (raw)
In-Reply-To: <1490008785-6058-1-git-send-email-andrew.cooper3@citrix.com>

Amongst other things, these tab complete more easily.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
---
 .gitignore                                             |  2 +-
 tools/fuzz/README.afl                                  |  6 +++---
 tools/fuzz/x86_instruction_emulator/Makefile           | 18 +++++++++---------
 .../{afl-x86-insn-emulator-fuzzer.c => afl-harness.c}  |  0
 .../{x86-insn-emulator-fuzzer.c => fuzz-emul.c}        |  0
 5 files changed, 13 insertions(+), 13 deletions(-)
 rename tools/fuzz/x86_instruction_emulator/{afl-x86-insn-emulator-fuzzer.c => afl-harness.c} (100%)
 rename tools/fuzz/x86_instruction_emulator/{x86-insn-emulator-fuzzer.c => fuzz-emul.c} (100%)

diff --git a/.gitignore b/.gitignore
index 2bf815b..c056247 100644
--- a/.gitignore
+++ b/.gitignore
@@ -158,7 +158,7 @@ tools/flask/utils/flask-label-pci
 tools/fuzz/libelf/afl-libelf-fuzzer
 tools/fuzz/x86_instruction_emulator/asm
 tools/fuzz/x86_instruction_emulator/x86_emulate*
-tools/fuzz/x86_instruction_emulator/afl-x86-insn-emulator-fuzzer
+tools/fuzz/x86_instruction_emulator/afl-harness
 tools/helpers/_paths.h
 tools/helpers/init-xenstore-domain
 tools/helpers/xen-init-dom0
diff --git a/tools/fuzz/README.afl b/tools/fuzz/README.afl
index 68e0fa3..357c3c8 100644
--- a/tools/fuzz/README.afl
+++ b/tools/fuzz/README.afl
@@ -18,15 +18,15 @@ Use the x86 instruction emulator fuzzer as an example.
 2. run the following commands to build:
    $ cd tools/fuzz/x86_instruction_emulator
    $ make distclean
-   $ make CC=$AFLPATH/afl-gcc afl # produces afl-x86-insn-emulator-fuzzer
+   $ make CC=$AFLPATH/afl-gcc afl # produces afl-harness
 
 3. provide initial test case (fuzzer dependent, see afl-*.c):
    $ mkdir testcase_dir
    $ dd if=/dev/urandom of=testcase_dir/rand.bin \
-       bs=`./afl-x86-insn-emulator-fuzzer --min-input-size` count=1
+       bs=`./afl-harness --min-input-size` count=1
 
 4. run the fuzzer with AFL:
    $ $AFLPATH/afl-fuzz -m none -t 1000 -i testcase_dir -o findings_dir -- \
-     ./afl-x86-insn-emulator-fuzzer @@
+     ./afl-harness @@
 
 Please see AFL documentation for more information.
diff --git a/tools/fuzz/x86_instruction_emulator/Makefile b/tools/fuzz/x86_instruction_emulator/Makefile
index abba186..6e3fa1e 100644
--- a/tools/fuzz/x86_instruction_emulator/Makefile
+++ b/tools/fuzz/x86_instruction_emulator/Makefile
@@ -1,11 +1,11 @@
 XEN_ROOT=$(CURDIR)/../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-.PHONY: x86-instruction-emulator-fuzzer-all
+.PHONY: x86-insn-fuzz-all
 ifeq ($(CONFIG_X86_64),y)
-x86-instruction-emulator-fuzzer-all: x86-insn-emulator.a x86-insn-emulator-fuzzer.o afl
+x86-insn-fuzz-all: x86-insn-fuzzer.a fuzz-emul.o afl
 else
-x86-instruction-emulator-fuzzer-all:
+x86-insn-fuzz-all:
 endif
 
 x86_emulate:
@@ -28,17 +28,17 @@ x86_emulate.h := x86_emulate.h x86_emulate/x86_emulate.h $(x86.h)
 
 x86_emulate.o: x86_emulate.c x86_emulate/x86_emulate.c $(x86_emulate.h)
 
-x86-insn-emulator-fuzzer.o: $(x86_emulate.h)
+fuzz-emul.o: $(x86_emulate.h)
 
-x86-insn-emulator.a: x86-insn-emulator-fuzzer.o x86_emulate.o
+x86-insn-fuzzer.a: fuzz-emul.o x86_emulate.o
 	$(AR) rc $@ $^
 
-afl-x86-insn-emulator-fuzzer: afl-x86-insn-emulator-fuzzer.o x86-insn-emulator-fuzzer.o x86_emulate.o
+afl-harness: afl-harness.o fuzz-emul.o x86_emulate.o
 	$(CC) $(CFLAGS) $^ -o $@
 
 # Common targets
 .PHONY: all
-all: x86-instruction-emulator-fuzzer-all
+all: x86-insn-fuzz-all
 
 .PHONY: distclean
 distclean: clean
@@ -46,10 +46,10 @@ distclean: clean
 
 .PHONY: clean
 clean:
-	rm -f *.a *.o .*.d *-x86-insn-emulator-fuzzer
+	rm -f *.a *.o .*.d afl-harness
 
 .PHONY: install
 install: all
 
 .PHONY: afl
-afl: afl-x86-insn-emulator-fuzzer
+afl: afl-harness
diff --git a/tools/fuzz/x86_instruction_emulator/afl-x86-insn-emulator-fuzzer.c b/tools/fuzz/x86_instruction_emulator/afl-harness.c
similarity index 100%
rename from tools/fuzz/x86_instruction_emulator/afl-x86-insn-emulator-fuzzer.c
rename to tools/fuzz/x86_instruction_emulator/afl-harness.c
diff --git a/tools/fuzz/x86_instruction_emulator/x86-insn-emulator-fuzzer.c b/tools/fuzz/x86_instruction_emulator/fuzz-emul.c
similarity index 100%
rename from tools/fuzz/x86_instruction_emulator/x86-insn-emulator-fuzzer.c
rename to tools/fuzz/x86_instruction_emulator/fuzz-emul.c
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2017-03-20 11:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-20 11:19 [PATCH 0/8] Fuzzing misc bugfix and performance improvements Andrew Cooper
2017-03-20 11:19 ` [PATCH 1/8] tools/fuzz: Remove .d files in clean Andrew Cooper
2017-03-20 11:19 ` [PATCH 2/8] tools/fuzz: Use $(CC) for linking the harnesses Andrew Cooper
2017-03-20 11:19 ` [PATCH 3/8] tools/fuzz: Include LLVMFuzzerTestOneInput() in the generated .a Andrew Cooper
2017-03-20 11:19 ` Andrew Cooper [this message]
2017-03-20 11:19 ` [PATCH 5/8] tools/insn-fuzz: Use getopt() for parsing the command line Andrew Cooper
2017-03-20 11:19 ` [PATCH 6/8] tools/insn-fuzz: Accept fuzzing input on stdin Andrew Cooper
2017-03-20 11:19 ` [PATCH 7/8] tools/insn-fuzz: Make use of LLVMFuzzerInitialize() Andrew Cooper
2017-03-20 11:19 ` [PATCH 8/8] tools/insn-fuzz: Support AFL's afl-clang-fast mode Andrew Cooper
2017-03-20 15:55 ` [PATCH 0/8] Fuzzing misc bugfix and performance improvements Wei Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1490008785-6058-5-git-send-email-andrew.cooper3@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).