source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: kristaps@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: texi2mdoc: Have Makefile install source as 0644 (thanks Sviatoslav
Date: Thu, 26 Feb 2015 05:43:27 -0500 (EST)	[thread overview]
Message-ID: <5371605049290152441.enqueue@fantadrom.bsd.lv> (raw)

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

                 reply	other threads:[~2015-02-26 10:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=5371605049290152441.enqueue@fantadrom.bsd.lv \
    --to=kristaps@mdocml.bsd.lv \
    --cc=source@mdocml.bsd.lv \
    /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).