From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]); by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id 4814265f; for ; Thu, 26 Feb 2015 05:43:27 -0500 (EST) Date: Thu, 26 Feb 2015 05:43:27 -0500 (EST) Message-Id: <5371605049290152441.enqueue@fantadrom.bsd.lv> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: kristaps@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: texi2mdoc: Have Makefile install source as 0644 (thanks Sviatoslav X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 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