1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
5 >Testing Guidelines</TITLE
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
10 TITLE="Privoxy Developer Manual"
11 HREF="index.html"><LINK
13 TITLE="Coding Guidelines"
14 HREF="coding.html"><LINK
16 TITLE="Releasing a New Version"
17 HREF="newrelease.html"><LINK
20 HREF="../p_doc.css"><META
21 HTTP-EQUIV="Content-Type"
23 charset=ISO-8859-1"></HEAD
34 SUMMARY="Header navigation table"
43 >Privoxy Developer Manual</TH
65 HREF="newrelease.html"
80 >5. Testing Guidelines</A
90 >5.1. Testplan for releases</A
93 > Explain release numbers. major, minor. developer releases. etc.
101 >Remove any existing rpm with rpm -e</P
105 >Remove any file that was left over. This includes (but is not limited to)
120 >/usr/sbin/privoxy</P
124 >/etc/init.d/privoxy</P
128 >/usr/doc/privoxy*</P
134 >Install the rpm. Any error messages?</P
138 >start,stop,status <SPAN
141 > with the specific script
142 (e.g. /etc/rc.d/init/privoxy stop). Reboot your machine. Does
147 >Start browsing. Does <SPAN
150 > work? Logfile written?</P
154 >Remove the rpm. Any error messages? All files removed?</P
164 >5.2. Fuzzing Privoxy</A
167 > To make fuzzing more convenient, Privoxy can be configured
168 with --enable-fuzz which will result in the --fuzz option
172 > Example (tested on ElectroBSD):
181 CLASS="PROGRAMLISTING"
182 ># Compile Privoxy with instrumentation for afl
183 $ export CC=afl-clang
184 $ export CFLAGS="-fsanitize=address -ggdb"
185 $ export CPPFLAGS=-I/usr/local/include/
186 $ export LDFLAGS="-fsanitize=address -L/usr/local/lib"
187 $ export AFL_USE_ASAN=1
188 $ export AFL_HARDEN=1
189 $ ./configure --with-debug --enable-extended-host-patterns --enable-accept-filter --enable-no-gifs --enable-compression --enable-strptime-sanity-checks --enable-external-filters --enable-fuzz
192 Privoxy version 3.0.24 (http://www.privoxy.org/)
193 Usage: ./privoxy [--config-test] [--chroot] [--help] [--no-daemon] [--pidfile pidfile] [--pre-chroot-nslookup hostname] [--user user[.group]] [--version] [configfile]
194 ./privoxy --fuzz fuzz-mode ./path/to/fuzzed/input [--stfu]
196 Supported fuzz modes and the expected input:
197 action: Text to parse as action file.
198 client-request: Client request to parse. Currently incomplete
199 client-header: Client header to parse.
200 chunked-transfer-encoding: Chunk-encoded data to dechunk.
201 deflate: deflate-compressed data to decompress.
202 filter: Text to parse as filter file.
203 gif: gif to deanimate.
204 gzip: gzip-compressed data to decompress.
205 pcrs-substitute: A pcrs-substitute to compile. Not a whole pcrs job! Example: Bla $1 bla C $3 blah.
206 server-header: Server header to parse.
207 server-response: Server response to parse.
209 The following fuzz modes read data from stdin if the 'file' is '-'
212 chunked-transfer-encoding
222 $ export ASAN_OPTIONS='abort_on_error=1'
224 $ echo '$1 bla fasel $2' > input/pcrs
225 $ afl-fuzz -i input -o output -m none ~/git/privoxy/privoxy --fuzz pcrs-substitute - --stfu
227 $ cat >input/pcrs.txt
229 s@(.{1})[432](\d+)@$1$2$hostname@UgisT
231 $ afl-fuzz -i input/ -o output/ -f bla.filter -m none privoxy --fuzz filter bla.filter --stfu</PRE
242 SUMMARY="Footer navigation table"
271 HREF="newrelease.html"
281 >Coding Guidelines</TD
291 >Releasing a New Version</TD