]> granicus.if.org Git - zziplib/blobdiff - test/zziptests.py
optimize download without trycopy
[zziplib] / test / zziptests.py
index d09dc00cc3a1d673b7fa4a03eeb9fae0c8dec1f5..813e8cca2695d08988f29ac7dfbf4493a4b10719 100644 (file)
@@ -1,8 +1,10 @@
 import unittest
 import subprocess
 import logging
+import inspect
 import os
 import collections
+import urllib
 import shutil
 import random
 import re
@@ -78,6 +80,13 @@ def shell(command, shell=True, calls=False, cwd=None, env=None, lang=None, retur
                 logg.debug("ERR: %s", line)
     return Shell(run.returncode, output, errors, sh_command)
 
+def get_caller_name():
+    frame = inspect.currentframe().f_back.f_back
+    return frame.f_code.co_name
+def get_caller_caller_name():
+    frame = inspect.currentframe().f_back.f_back.f_back
+    return frame.f_code.co_name
+
 def testdir(testname):
     newdir = "tests/tmp."+testname
     if os.path.isdir(newdir):
@@ -86,17 +95,25 @@ def testdir(testname):
     return newdir
 
 def download(base_url, filename, into):
+    data = "tmp.download"
+    if not os.path.isdir(data):
+        os.makedirs(data)
+    subname = urllib.quote_plus(base_url)
+    subdir = os.path.join(data, subname)
+    if not os.path.isdir(subdir):
+        os.makedirs(subdir)
+    subfile = os.path.join(subdir, filename)
+    if not os.path.exists(subfile):
+       logg.info("need %s", subfile)
+       d = urllib.urlopen(base_url + "/" + filename)
+       f = open(subfile, "w")
+       f.write(d.read())
+       f.close()
+    #
     if not os.path.isdir(into):
         os.makedirs(into)
-    if not os.path.exists(os.path.join(into, filename)):
-        shell("cd {into} && wget {base_url}/{filename}".format(**locals()))
-def trycopy(srcdir, filename, into):
-    if not os.path.isdir(into):
-        os.makedirs(into)
-    src_file = os.path.join(srcdir, filename)
-    dst_file = os.path.join(into, filename)
-    if os.path.isfile(src_file):
-        shutil.copy(src_file, dst_file)
+    shutil.copy(subfile, into)
+    return filename
 
 def output(cmd, shell=True):
     run = subprocess.Popen(cmd, shell=shell, stdout=subprocess.PIPE)
@@ -115,23 +132,23 @@ def greps(lines, pattern):
 class ZZipTest(unittest.TestCase):
   @property
   def t(self):
-    if not os.path.isdir(testdatadir):
-       os.makedirs(testdatadir)
-    return testdatdir
+        if not os.path.isdir(testdatadir):
+            os.makedirs(testdatadir)
+        return testdatdir
   @property
   def s(self):
     return topsrcdir
   def src(self, name):
     return os.path.join(self.s, name)
   def readme(self):
-     f = open(self.src(readme))
-     text = f.read()
-     f.close()
-     return text
+    f = open(self.src(readme))
+    text = f.read()
+    f.close()
+    return text
   def mkfile(self, name, content):
     b = os.path.dirname(name)
     if not os.path.isdir(b):
-       os.makedirs(b)
+        os.makedirs(b)
     f = open(name, "w")
     f.write(content)
     f.close()
@@ -147,49 +164,49 @@ class ZZipTest(unittest.TestCase):
     old1 = ''
     old2 = ''
     for i in xrange(size):
-       while True:
-          x = random.choice("       abcdefghijklmnopqrstuvwxyz\n")
-          if x == old1 or x == old2: continue
-          old1 = old2
-          old2 = x
-          break
-       result.write(x)
+        while True:
+            x = random.choice("       abcdefghijklmnopqrstuvwxyz\n")
+            if x == old1 or x == old2: continue
+            old1 = old2
+            old2 = x
+            break
+        result.write(x)
     return result.getvalue()
-    def caller_testname(self):
-        name = get_caller_caller_name()
-        x1 = name.find("_")
-        if x1 < 0: return name
-        x2 = name.find("_", x1+1)
-        if x2 < 0: return name
-        return name[:x2]
-    def testname(self, suffix = None):
-        name = self.caller_testname()
-        if suffix:
-            return name + "_" + suffix
-        return name
-    def testzip(self, testname = None):
-        testname = testname or self.caller_testname()
-        zipname = testname + ".zip"
-        return zipname
-    def testdir(self, testname = None):
-        testname = testname or self.caller_testname()
-        newdir = "tmp/tmp."+testname
-        if os.path.isdir(newdir):
-            shutil.rmtree(newdir)
-        os.makedirs(newdir)
-        return newdir
-    def rm_testdir(self, testname = None):
-        testname = testname or self.caller_testname()
-        newdir = "tmp/tmp."+testname
-        if os.path.isdir(newdir):
-            shutil.rmtree(newdir)
-        return newdir
-    def rm_testzip(self, testname = None):
-        testname = testname or self.caller_testname()
-        zipname = testname + ".zip"
-        if os.path.exists(zipname):
-            os.remove(zipname)
-        return True
+  def caller_testname(self):
+    name = get_caller_caller_name()
+    x1 = name.find("_")
+    if x1 < 0: return name
+    x2 = name.find("_", x1+1)
+    if x2 < 0: return name
+    return name[:x2]
+  def testname(self, suffix = None):
+    name = self.caller_testname()
+    if suffix:
+        return name + "_" + suffix
+    return name
+  def testzip(self, testname = None):
+    testname = testname or self.caller_testname()
+    zipname = testname + ".zip"
+    return zipname
+  def testdir(self, testname = None):
+    testname = testname or self.caller_testname()
+    newdir = "tmp."+testname
+    if os.path.isdir(newdir):
+        shutil.rmtree(newdir)
+    os.makedirs(newdir)
+    return newdir
+  def rm_testdir(self, testname = None):
+    testname = testname or self.caller_testname()
+    newdir = "tmp."+testname
+    if os.path.isdir(newdir):
+        shutil.rmtree(newdir)
+    return newdir
+  def rm_testzip(self, testname = None):
+    testname = testname or self.caller_testname()
+    zipname = testname + ".zip"
+    if os.path.exists(zipname):
+        os.remove(zipname)
+    return True
   ################################################################
   def test_1000_make_test0_zip(self):
     """ create a test.zip for later tests using standard 'zip'
@@ -1241,8 +1258,7 @@ class ZZipTest(unittest.TestCase):
         => coughs up a SEGFAULT in zzip_dir_close() ?!?"""
     zipfile = "test5.zip"
     getfile = "test5.zip"
-    tmpdir = "tmp.test_20595"
-    testdir(tmpdir)
+    tmpdir = self.testdir()
     exe = self.bins("unzzip")
     run = shell("cd {tmpdir} && ../{exe} ../{getfile} ".format(**locals()))
     self.assertTrue(tmpdir+'/subdir1/subdir2/file3-1024.txt')
@@ -1254,7 +1270,6 @@ class ZZipTest(unittest.TestCase):
     tmpdir = "tmp.test_59770"
     filename = self.zip_CVE_2017_5977
     file_url = self.url_CVE_2017_5977
-    trycopy("tmp.test_59771", filename, tmpdir)
     testdir(tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzip")
@@ -1269,8 +1284,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5977
     file_url = self.url_CVE_2017_5977
     testdir(tmpdir)
-    trycopy("tmp.test_59770", filename, tmpdir)
-    trycopy("tmp.test_59772", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-big")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -1284,8 +1297,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5977
     file_url = self.url_CVE_2017_5977
     testdir(tmpdir)
-    trycopy("tmp.test_59771", filename, tmpdir)
-    trycopy("tmp.test_59773", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mem")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -1299,8 +1310,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5977
     file_url = self.url_CVE_2017_5977
     testdir(tmpdir)
-    trycopy("tmp.test_59772", filename, tmpdir)
-    trycopy("tmp.test_59774", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mix")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -1314,7 +1323,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5977
     file_url = self.url_CVE_2017_5977
     testdir(tmpdir)
-    trycopy("tmp.test_59773", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -1328,8 +1336,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5977
     file_url = self.url_CVE_2017_5977
     testdir(tmpdir)
-    trycopy("tmp.test_59774", filename, tmpdir)
-    trycopy("tmp.test_59776", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzip")
     run = shell("cd {tmpdir} && {exe} -o {filename}".format(**locals()),
@@ -1345,8 +1351,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5977
     file_url = self.url_CVE_2017_5977
     testdir(tmpdir)
-    trycopy("tmp.test_59775", filename, tmpdir)
-    trycopy("tmp.test_59777", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-big")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),
@@ -1361,8 +1365,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5977
     file_url = self.url_CVE_2017_5977
     testdir(tmpdir)
-    trycopy("tmp.test_59776", filename, tmpdir)
-    trycopy("tmp.test_59778", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mem")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),
@@ -1376,8 +1378,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5977
     file_url = self.url_CVE_2017_5977
     testdir(tmpdir)
-    trycopy("tmp.test_59777", filename, tmpdir)
-    trycopy("tmp.test_59779", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mix")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),
@@ -1391,8 +1391,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5977
     file_url = self.url_CVE_2017_5977
     testdir(tmpdir)
-    trycopy("tmp.test_59777", filename, tmpdir)
-    trycopy("tmp.test_59778", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),
@@ -1409,7 +1407,6 @@ class ZZipTest(unittest.TestCase):
     tmpdir = "tmp.test_59780"
     filename = self.zip_CVE_2017_5978
     file_url = self.url_CVE_2017_5978
-    trycopy("tmp.test_59781", filename, tmpdir)
     testdir(tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzip")
@@ -1425,8 +1422,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5978
     file_url = self.url_CVE_2017_5978
     testdir(tmpdir)
-    trycopy("tmp.test_59780", filename, tmpdir)
-    trycopy("tmp.test_59782", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-big")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -1440,8 +1435,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5978
     file_url = self.url_CVE_2017_5978
     testdir(tmpdir)
-    trycopy("tmp.test_59781", filename, tmpdir)
-    trycopy("tmp.test_59783", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mem")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -1457,8 +1450,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5978
     file_url = self.url_CVE_2017_5978
     testdir(tmpdir)
-    trycopy("tmp.test_59782", filename, tmpdir)
-    trycopy("tmp.test_59784", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mix")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -1474,7 +1465,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5978
     file_url = self.url_CVE_2017_5978
     testdir(tmpdir)
-    trycopy("tmp.test_59783", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -1489,8 +1479,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5978
     file_url = self.url_CVE_2017_5978
     testdir(tmpdir)
-    trycopy("tmp.test_59784", filename, tmpdir)
-    trycopy("tmp.test_59786", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzip")
     run = shell("cd {tmpdir} && {exe} -o {filename}".format(**locals()),
@@ -1506,8 +1494,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5978
     file_url = self.url_CVE_2017_5978
     testdir(tmpdir)
-    trycopy("tmp.test_59785", filename, tmpdir)
-    trycopy("tmp.test_59787", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-big")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),
@@ -1521,8 +1507,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5978
     file_url = self.url_CVE_2017_5978
     testdir(tmpdir)
-    trycopy("tmp.test_59786", filename, tmpdir)
-    trycopy("tmp.test_59788", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mem")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),
@@ -1538,8 +1522,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5978
     file_url = self.url_CVE_2017_5978
     testdir(tmpdir)
-    trycopy("tmp.test_59787", filename, tmpdir)
-    trycopy("tmp.test_59789", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mem")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),
@@ -1556,8 +1538,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5978
     file_url = self.url_CVE_2017_5978
     testdir(tmpdir)
-    trycopy("tmp.test_59787", filename, tmpdir)
-    trycopy("tmp.test_59788", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),
@@ -1575,7 +1555,6 @@ class ZZipTest(unittest.TestCase):
     tmpdir = "tmp.test_59790"
     filename = self.zip_CVE_2017_5979
     file_url = self.url_CVE_2017_5979
-    trycopy("tmp.test_59791", filename, tmpdir)
     testdir(tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzip")
@@ -1590,8 +1569,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5979
     file_url = self.url_CVE_2017_5979
     testdir(tmpdir)
-    trycopy("tmp.test_59790", filename, tmpdir)
-    trycopy("tmp.test_59792", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-big")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -1605,8 +1582,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5979
     file_url = self.url_CVE_2017_5979
     testdir(tmpdir)
-    trycopy("tmp.test_59791", filename, tmpdir)
-    trycopy("tmp.test_59793", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mem")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -1620,8 +1595,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5979
     file_url = self.url_CVE_2017_5979
     testdir(tmpdir)
-    trycopy("tmp.test_59792", filename, tmpdir)
-    trycopy("tmp.test_59794", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mix")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -1635,7 +1608,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5979
     file_url = self.url_CVE_2017_5979
     testdir(tmpdir)
-    trycopy("tmp.test_59793", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -1649,8 +1621,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5979
     file_url = self.url_CVE_2017_5979
     testdir(tmpdir)
-    trycopy("tmp.test_59794", filename, tmpdir)
-    trycopy("tmp.test_59796", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzip")
     run = shell("cd {tmpdir} && {exe} -o {filename}".format(**locals()),
@@ -1665,8 +1635,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5979
     file_url = self.url_CVE_2017_5979
     testdir(tmpdir)
-    trycopy("tmp.test_59795", filename, tmpdir)
-    trycopy("tmp.test_59797", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-big")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),
@@ -1681,8 +1649,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5979
     file_url = self.url_CVE_2017_5979
     testdir(tmpdir)
-    trycopy("tmp.test_59796", filename, tmpdir)
-    trycopy("tmp.test_59798", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mem")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),
@@ -1697,8 +1663,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5979
     file_url = self.url_CVE_2017_5979
     testdir(tmpdir)
-    trycopy("tmp.test_59797", filename, tmpdir)
-    trycopy("tmp.test_59799", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mix")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),
@@ -1713,8 +1677,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5979
     file_url = self.url_CVE_2017_5979
     testdir(tmpdir)
-    trycopy("tmp.test_59797", filename, tmpdir)
-    trycopy("tmp.test_59798", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),
@@ -1731,7 +1693,6 @@ class ZZipTest(unittest.TestCase):
     tmpdir = "tmp.test_59740"
     filename = self.zip_CVE_2017_5974
     file_url = self.url_CVE_2017_5974
-    trycopy("tmp.test_59741", filename, tmpdir)
     testdir(tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzip")
@@ -1746,8 +1707,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5974
     file_url = self.url_CVE_2017_5974
     testdir(tmpdir)
-    trycopy("tmp.test_59740", filename, tmpdir)
-    trycopy("tmp.test_59742", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-big")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -1761,8 +1720,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5974
     file_url = self.url_CVE_2017_5974
     testdir(tmpdir)
-    trycopy("tmp.test_59741", filename, tmpdir)
-    trycopy("tmp.test_59743", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mem")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -1777,8 +1734,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5974
     file_url = self.url_CVE_2017_5974
     testdir(tmpdir)
-    trycopy("tmp.test_59742", filename, tmpdir)
-    trycopy("tmp.test_59744", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mix")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -1792,7 +1747,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5974
     file_url = self.url_CVE_2017_5974
     testdir(tmpdir)
-    trycopy("tmp.test_59743", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -1806,8 +1760,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5974
     file_url = self.url_CVE_2017_5974
     testdir(tmpdir)
-    trycopy("tmp.test_59744", filename, tmpdir)
-    trycopy("tmp.test_59746", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzip")
     run = shell("cd {tmpdir} && {exe} -o {filename}".format(**locals()),
@@ -1822,8 +1774,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5974
     file_url = self.url_CVE_2017_5974
     testdir(tmpdir)
-    trycopy("tmp.test_59745", filename, tmpdir)
-    trycopy("tmp.test_59747", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-big")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),
@@ -1838,8 +1788,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5974
     file_url = self.url_CVE_2017_5974
     testdir(tmpdir)
-    trycopy("tmp.test_59746", filename, tmpdir)
-    trycopy("tmp.test_59748", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mem")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),
@@ -1854,8 +1802,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5974
     file_url = self.url_CVE_2017_5974
     testdir(tmpdir)
-    trycopy("tmp.test_59747", filename, tmpdir)
-    trycopy("tmp.test_59749", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mix")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),
@@ -1869,7 +1815,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5974
     file_url = self.url_CVE_2017_5974
     testdir(tmpdir)
-    trycopy("tmp.test_59748", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),
@@ -1885,7 +1830,6 @@ class ZZipTest(unittest.TestCase):
     tmpdir = "tmp.test_59750"
     filename = self.zip_CVE_2017_5975
     file_url = self.url_CVE_2017_5975
-    trycopy("tmp.test_59751", filename, tmpdir)
     testdir(tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzip")
@@ -1902,8 +1846,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5975
     file_url = self.url_CVE_2017_5975
     testdir(tmpdir)
-    trycopy("tmp.test_59750", filename, tmpdir)
-    trycopy("tmp.test_59752", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-big")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -1917,8 +1859,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5975
     file_url = self.url_CVE_2017_5975
     testdir(tmpdir)
-    trycopy("tmp.test_59751", filename, tmpdir)
-    trycopy("tmp.test_59753", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mem")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -1933,8 +1873,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5975
     file_url = self.url_CVE_2017_5975
     testdir(tmpdir)
-    trycopy("tmp.test_59752", filename, tmpdir)
-    trycopy("tmp.test_59754", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mix")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -1949,7 +1887,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5975
     file_url = self.url_CVE_2017_5975
     testdir(tmpdir)
-    trycopy("tmp.test_59753", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -1963,8 +1900,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5975
     file_url = self.url_CVE_2017_5975
     testdir(tmpdir)
-    trycopy("tmp.test_59754", filename, tmpdir)
-    trycopy("tmp.test_59756", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzip")
     run = shell("cd {tmpdir} && {exe} -o {filename}".format(**locals()),
@@ -1980,8 +1915,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5975
     file_url = self.url_CVE_2017_5975
     testdir(tmpdir)
-    trycopy("tmp.test_59755", filename, tmpdir)
-    trycopy("tmp.test_59757", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-big")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),
@@ -1995,8 +1928,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5975
     file_url = self.url_CVE_2017_5975
     testdir(tmpdir)
-    trycopy("tmp.test_59756", filename, tmpdir)
-    trycopy("tmp.test_59758", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mem")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),
@@ -2012,8 +1943,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5975
     file_url = self.url_CVE_2017_5975
     testdir(tmpdir)
-    trycopy("tmp.test_59757", filename, tmpdir)
-    trycopy("tmp.test_59759", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mix")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),
@@ -2029,8 +1958,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5975
     file_url = self.url_CVE_2017_5975
     testdir(tmpdir)
-    trycopy("tmp.test_59757", filename, tmpdir)
-    trycopy("tmp.test_59758", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),
@@ -2048,7 +1975,6 @@ class ZZipTest(unittest.TestCase):
     tmpdir = "tmp.test_59760"
     filename = self.zip_CVE_2017_5976
     file_url = self.url_CVE_2017_5976
-    trycopy("tmp.test_59761", filename, tmpdir)
     testdir(tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzip")
@@ -2065,8 +1991,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5976
     file_url = self.url_CVE_2017_5976
     testdir(tmpdir)
-    trycopy("tmp.test_59760", filename, tmpdir)
-    trycopy("tmp.test_59762", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-big")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -2080,8 +2004,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5976
     file_url = self.url_CVE_2017_5976
     testdir(tmpdir)
-    trycopy("tmp.test_59761", filename, tmpdir)
-    trycopy("tmp.test_59763", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mem")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -2095,8 +2017,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5976
     file_url = self.url_CVE_2017_5976
     testdir(tmpdir)
-    trycopy("tmp.test_59762", filename, tmpdir)
-    trycopy("tmp.test_59764", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mix")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -2110,7 +2030,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5976
     file_url = self.url_CVE_2017_5976
     testdir(tmpdir)
-    trycopy("tmp.test_59763", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -2124,8 +2043,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5976
     file_url = self.url_CVE_2017_5976
     testdir(tmpdir)
-    trycopy("tmp.test_59764", filename, tmpdir)
-    trycopy("tmp.test_59766", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzip")
     run = shell("cd {tmpdir} && {exe} -o {filename}".format(**locals()),
@@ -2142,8 +2059,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5976
     file_url = self.url_CVE_2017_5976
     testdir(tmpdir)
-    trycopy("tmp.test_59765", filename, tmpdir)
-    trycopy("tmp.test_59767", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-big")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),
@@ -2157,8 +2072,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5976
     file_url = self.url_CVE_2017_5976
     testdir(tmpdir)
-    trycopy("tmp.test_59766", filename, tmpdir)
-    trycopy("tmp.test_59768", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mem")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),
@@ -2173,8 +2086,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5976
     file_url = self.url_CVE_2017_5976
     testdir(tmpdir)
-    trycopy("tmp.test_59767", filename, tmpdir)
-    trycopy("tmp.test_59769", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mix")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),
@@ -2188,8 +2099,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5976
     file_url = self.url_CVE_2017_5976
     testdir(tmpdir)
-    trycopy("tmp.test_59767", filename, tmpdir)
-    trycopy("tmp.test_59768", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),
@@ -2205,7 +2114,6 @@ class ZZipTest(unittest.TestCase):
     tmpdir = "tmp.test_59800"
     filename = self.zip_CVE_2017_5980
     file_url = self.url_CVE_2017_5980
-    trycopy("tmp.test_59801", filename, tmpdir)
     testdir(tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzip")
@@ -2222,8 +2130,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5980
     file_url = self.url_CVE_2017_5980
     testdir(tmpdir)
-    trycopy("tmp.test_59800", filename, tmpdir)
-    trycopy("tmp.test_59802", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-big")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -2237,8 +2143,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5980
     file_url = self.url_CVE_2017_5980
     testdir(tmpdir)
-    trycopy("tmp.test_59801", filename, tmpdir)
-    trycopy("tmp.test_59803", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mem")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -2254,8 +2158,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5980
     file_url = self.url_CVE_2017_5980
     testdir(tmpdir)
-    trycopy("tmp.test_59802", filename, tmpdir)
-    trycopy("tmp.test_59804", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mix")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -2270,7 +2172,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5980
     file_url = self.url_CVE_2017_5980
     testdir(tmpdir)
-    trycopy("tmp.test_59803", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -2284,8 +2185,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5980
     file_url = self.url_CVE_2017_5980
     testdir(tmpdir)
-    trycopy("tmp.test_59804", filename, tmpdir)
-    trycopy("tmp.test_59806", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzip")
     run = shell("cd {tmpdir} && {exe} -o {filename}".format(**locals()),
@@ -2302,8 +2201,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5980
     file_url = self.url_CVE_2017_5980
     testdir(tmpdir)
-    trycopy("tmp.test_59805", filename, tmpdir)
-    trycopy("tmp.test_59807", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-big")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),
@@ -2318,8 +2215,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5980
     file_url = self.url_CVE_2017_5980
     testdir(tmpdir)
-    trycopy("tmp.test_59806", filename, tmpdir)
-    trycopy("tmp.test_59808", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mem")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),
@@ -2335,8 +2230,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5980
     file_url = self.url_CVE_2017_5980
     testdir(tmpdir)
-    trycopy("tmp.test_59807", filename, tmpdir)
-    trycopy("tmp.test_59809", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mix")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),
@@ -2351,8 +2244,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5980
     file_url = self.url_CVE_2017_5980
     testdir(tmpdir)
-    trycopy("tmp.test_59807", filename, tmpdir)
-    trycopy("tmp.test_59808", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),
@@ -2369,7 +2260,6 @@ class ZZipTest(unittest.TestCase):
     tmpdir = "tmp.test_59810"
     filename = self.zip_CVE_2017_5981
     file_url = self.url_CVE_2017_5981
-    trycopy("tmp.test_59811", filename, tmpdir)
     testdir(tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzip")
@@ -2385,8 +2275,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5981
     file_url = self.url_CVE_2017_5981
     testdir(tmpdir)
-    trycopy("tmp.test_59810", filename, tmpdir)
-    trycopy("tmp.test_59812", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-big")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -2399,8 +2287,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5981
     file_url = self.url_CVE_2017_5981
     testdir(tmpdir)
-    trycopy("tmp.test_59811", filename, tmpdir)
-    trycopy("tmp.test_59813", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mem")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -2413,8 +2299,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5981
     file_url = self.url_CVE_2017_5981
     testdir(tmpdir)
-    trycopy("tmp.test_59812", filename, tmpdir)
-    trycopy("tmp.test_59814", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mix")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -2427,7 +2311,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5981
     file_url = self.url_CVE_2017_5981
     testdir(tmpdir)
-    trycopy("tmp.test_59813", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip")
     run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()),
@@ -2441,8 +2324,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5981
     file_url = self.url_CVE_2017_5981
     testdir(tmpdir)
-    trycopy("tmp.test_59814", filename, tmpdir)
-    trycopy("tmp.test_59816", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzip")
     run = shell("cd {tmpdir} && {exe} -o {filename}".format(**locals()),
@@ -2458,8 +2339,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5981
     file_url = self.url_CVE_2017_5981
     testdir(tmpdir)
-    trycopy("tmp.test_59815", filename, tmpdir)
-    trycopy("tmp.test_59817", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-big")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),
@@ -2474,8 +2353,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5981
     file_url = self.url_CVE_2017_5981
     testdir(tmpdir)
-    trycopy("tmp.test_59816", filename, tmpdir)
-    trycopy("tmp.test_59818", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mem")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),
@@ -2491,8 +2368,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5981
     file_url = self.url_CVE_2017_5981
     testdir(tmpdir)
-    trycopy("tmp.test_59817", filename, tmpdir)
-    trycopy("tmp.test_59819", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip-mix")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),
@@ -2508,8 +2383,6 @@ class ZZipTest(unittest.TestCase):
     filename = self.zip_CVE_2017_5981
     file_url = self.url_CVE_2017_5981
     testdir(tmpdir)
-    trycopy("tmp.test_59817", filename, tmpdir)
-    trycopy("tmp.test_59818", filename, tmpdir)
     download(file_url, filename, tmpdir)
     exe = self.bins("unzzip")
     run = shell("cd {tmpdir} && ../{exe} {filename} ".format(**locals()),