gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog testsuite/libamf.all/gen_malfor...


From: Benjamin Wolsey
Subject: [Gnash-commit] gnash ChangeLog testsuite/libamf.all/gen_malfor...
Date: Fri, 16 May 2008 09:34:44 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Benjamin Wolsey <bwy>   08/05/16 09:34:43

Modified files:
        .              : ChangeLog 
Added files:
        testsuite/libamf.all: gen_malformed_sol_tests.pl zzufsol 

Log message:
                * testsuite/libamf.all/zzufsol: script to corrupt all your .sol 
files.
                * testsuite/libamf.all/gen_malformed_sol_tests.pl: script to 
generate
                  an AS file to open all the corrupted .sol files in turn (test
                  robustness).
        
        It seems fairly robust, by the way - Gnash got through a lot of my 
corrupted
        files before one killed it (not as bad as Gnash parsing was on the 
first zzuf
        run...)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6617&r2=1.6618
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libamf.all/gen_malformed_sol_tests.pl?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libamf.all/zzufsol?cvsroot=gnash&rev=1.1

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6617
retrieving revision 1.6618
diff -u -b -r1.6617 -r1.6618
--- ChangeLog   16 May 2008 07:45:23 -0000      1.6617
+++ ChangeLog   16 May 2008 09:34:39 -0000      1.6618
@@ -1,3 +1,10 @@
+2008-05-16 Benjamin Wolsey <address@hidden>
+
+       * testsuite/libamf.all/zzufsol: script to corrupt all your .sol files.
+       * testsuite/libamf.all/gen_malformed_sol_tests.pl: script to generate
+         an AS file to open all the corrupted .sol files in turn (test
+         robustness).
+
 2008-05-16 Sandro Santilli <address@hidden>
 
        * NEWS, README: forward-port nelson changes here (docbook changes

Index: testsuite/libamf.all/gen_malformed_sol_tests.pl
===================================================================
RCS file: testsuite/libamf.all/gen_malformed_sol_tests.pl
diff -N testsuite/libamf.all/gen_malformed_sol_tests.pl
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/libamf.all/gen_malformed_sol_tests.pl     16 May 2008 09:34:41 
-0000      1.1
@@ -0,0 +1,46 @@
+#!perl
+
+# The script looks for files in ../tmpSharedObject/malformed, so you will have
+# to put your malformed files there or change where the script looks.
+#
+# The directory might be cleaned on 'make clean', so if you love your malformed
+# sol files, use a symlink.
+#
+# Use 'makeswf -v6 SOLrobustness.as -o SOLrobustness.swf' and run with Gnash.
+
+use strict;
+use warnings;
+
+my @filelist;
+my $file;
+
+my $dir="../tmpSharedObject/malformed";
+
+opendir(DIR, $dir) || die("Cannot open directory: $dir");
address@hidden = readdir(DIR);
+closedir(DIR);
+
+
+open(OUTF, ">SOLrobustness.as");
+
+print OUTF <<EE;
+// SOL file robustness testing. Feed with malformed SOL files in
+// tmpSharedObject/malformed
+//
+// 'makeswf -v6 SOLrobustness.as -o SOLrobustness.swf' and run with Gnash.
+//
+EE
+
+# ActionScript generation
+for $file (@filelist)
+{
+    if ($file !~ m/^\./)
+    {
+        $file =~ s/\.sol$//;
+        print OUTF "so = SharedObject.getLocal(\"malformed/$file\", \"/\");\n";
+        print OUTF "trace(so.getSize());\n";
+        print OUTF "delete so;\n";
+    }
+}
+
+close(OUTF);

Index: testsuite/libamf.all/zzufsol
===================================================================
RCS file: testsuite/libamf.all/zzufsol
diff -N testsuite/libamf.all/zzufsol
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/libamf.all/zzufsol        16 May 2008 09:34:42 -0000      1.1
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+# Usage: zzufsol <indir> <outdir> <min> <max>
+# Will create corrupted SOL files from all the .sol files in <indir>
+# using zzuf seeds from <min> to <max> and write them to <outdir>
+
+for r in `ls $1/*.sol`
+do
+    count=$3
+    while [ $count -le $4 ]
+    do
+        f=`md5sum $r | sed 's/  .*$//;'`.sol
+        echo "$count-$f"
+        zzuf -s$count < $r > "$2/$count-$f"
+        count=$[$count+1]
+    done
+done




reply via email to

[Prev in Thread] Current Thread [Next in Thread]