* texi2mdoc: Have Makefile install source as 0644 (thanks Sviatoslav
@ 2015-02-26 10:43 kristaps
0 siblings, 0 replies; only message in thread
From: kristaps @ 2015-02-26 10:43 UTC (permalink / raw)
To: source
Log Message:
-----------
Have Makefile install source as 0644 (thanks Sviatoslav Mishyn!) and add
some AFL instructions and another test case.
Modified Files:
--------------
texi2mdoc:
Makefile
Added Files:
-----------
texi2mdoc/afl:
README
texi2mdoc/afl/in:
test02.texi
Revision Data
-------------
--- /dev/null
+++ afl/README
@@ -0,0 +1,25 @@
+$Id: README,v 1.1 2015/02/26 10:43:25 kristaps Exp $
+
+This is the AFL test directory for texi2mdoc, http://mdocml.bsd.lv/texi2mdoc.
+
+First, you'll need the AFL system, http://lcamtuf.coredump.cx/afl/.
+
+Next, you'll need to compile texi2mdoc with the AFL bindings. You can do this
+from the top-level texi2mdoc directory as follows:
+
+ % cd ..
+ % make clean && make texi2mdoc CC=afl-clang
+ % cp texi2mdoc afl
+ % cd afl
+
+(You may need to invoke afl-gcc instead of afl-clang.)
+
+Next, you'll want to build the dictionary of Texinfo terms:
+
+ % sh ./mkdict.sh
+
+Finally, run the instrumentation itself.
+
+ % afl-fuzz -i in -o out -x dict -- ./texi2mdoc @@
+
+See the AFL website for details on how to exercise multiple cores and so on.
Index: Makefile
===================================================================
RCS file: /home/cvs/mdocml/texi2mdoc/Makefile,v
retrieving revision 1.9
retrieving revision 1.10
diff -LMakefile -LMakefile -u -p -r1.9 -r1.10
--- Makefile
+++ Makefile
@@ -1,10 +1,13 @@
-CFLAGS += -g -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings
-OBJS = main.o util.o
-SRCS = main.c util.c
+VERSION = 0.1.2
+
+CFLAGS += -g -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings
+OBJS = main.o util.o
+SRCS = main.c util.c
+AFLS = afl/in/test01.texi \
+ afl/in/test02.texi
VERSIONS = version_0_1_1.xml \
version_0_1_2.xml
-VERSION = 0.1.2
-PREFIX = /usr/local
+PREFIX = /usr/local
all: texi2mdoc
@@ -41,7 +44,11 @@ texi2mdoc.1.html: texi2mdoc.1
texi2mdoc.tgz:
mkdir -p .dist/texi2mdoc-$(VERSION)
- install -m 0444 $(SRCS) extern.h Makefile texi2mdoc.1 .dist/texi2mdoc-$(VERSION)
+ mkdir -p .dist/texi2mdoc-$(VERSION)/afl
+ mkdir -p .dist/texi2mdoc-$(VERSION)/afl/in
+ install -m 0644 $(SRCS) extern.h Makefile texi2mdoc.1 .dist/texi2mdoc-$(VERSION)
+ install -m 0644 $(AFLS) .dist/texi2mdoc-$(VERSION)/afl/in
+ install -m 0644 afl/mkdict.sh afl/README .dist/texi2mdoc-$(VERSION)/afl
(cd .dist && tar zcf ../$@ texi2mdoc-$(VERSION))
rm -rf .dist
--- /dev/null
+++ afl/in/test02.texi
@@ -0,0 +1,30 @@
+\input texinfo
+@setfilename sample.info
+@settitle Sample Manual 1.0
+
+@set FOO BAR
+
+@ifnottex
+@node Top
+@top GNU Sample
+@end ifnottex
+
+@macro foo {p, q}
+Together: \p\ & \q\.
+@end macro
+
+@foo{a, b}
+
+@macro argless {}
+No arguments here.
+@end macro
+
+@argless{}
+
+@macro xyzzy{p}
+@r{\q\}@c
+@end macro
+
+@ifset FOO
+Hello @xyzzy{there}.
+@end ifset
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-02-26 10:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-26 10:43 texi2mdoc: Have Makefile install source as 0644 (thanks Sviatoslav kristaps
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).