Skip to content

Commit ec6de64

Browse files
committed
Rediff patches
Add 0004-test-Fix-regex-syntax-errors.patch: <REASON> Add 0005-test-Fix-use-of-allowed_failures-in-pathological_tes.patch: <REASON> Add 0003-Provide-a-way-to-extend-test-timeouts.patch: <REASON> Add 0002-man-Add-missing-command-line-options.patch: <REASON> Drop 0002-Provide-a-way-to-extend-test-timeouts.patch: <REASON> Drop 0003-man-Add-missing-command-line-options.patch: <REASON> Drop 0004-test-Increase-pathological_tests-timeout-to-50-secon.patch: <REASON> Drop 0006-test-Fix-use-of-allowed_failures-in-pathological_tes.patch: <REASON> Drop 0005-test-Fix-regex-syntax-errors.patch: <REASON>
1 parent 7ce228b commit ec6de64

6 files changed

Lines changed: 36 additions & 38 deletions

debian/patches/0003-man-Add-missing-command-line-options.patch renamed to debian/patches/0002-man-Add-missing-command-line-options.patch

File renamed without changes.

debian/patches/0002-Provide-a-way-to-extend-test-timeouts.patch renamed to debian/patches/0003-Provide-a-way-to-extend-test-timeouts.patch

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ multiply the timeouts by an arbitrary amount
77

88
Signed-off-by: Keith Packard <keithp@keithp.com>
99
---
10-
api_test/main.c | 17 +++++++++++++++--
11-
1 file changed, 15 insertions(+), 2 deletions(-)
10+
api_test/main.c | 17 +++++++++++++++--
11+
test/pathological_tests.py | 4 +++-
12+
2 files changed, 18 insertions(+), 3 deletions(-)
1213

1314
diff --git a/api_test/main.c b/api_test/main.c
1415
index 1a41e69..790327c 100644
@@ -70,3 +71,25 @@ index 1a41e69..790327c 100644
7071
cmark_enable_safety_checks(true);
7172
version(runner);
7273
constructor(runner);
74+
diff --git a/test/pathological_tests.py b/test/pathological_tests.py
75+
index d0e910c..f556a1d 100644
76+
--- a/test/pathological_tests.py
77+
+++ b/test/pathological_tests.py
78+
@@ -7,6 +7,7 @@ import sys
79+
import platform
80+
import itertools
81+
import multiprocessing
82+
+import os
83+
from cmark import CMark
84+
85+
def hash_collisions():
86+
@@ -106,7 +107,8 @@ whitespace_re = re.compile('/s+/')
87+
passed = 0
88+
errored = 0
89+
ignored = 0
90+
-TIMEOUT = 5
91+
+timing_scale = float(os.getenv("CMARK_TIMING_SCALE", "1"))
92+
+TIMEOUT = 5 * timing_scale
93+
94+
def run_test(inp, regex):
95+
parser = argparse.ArgumentParser(description='Run cmark tests.')

debian/patches/0005-test-Fix-regex-syntax-errors.patch renamed to debian/patches/0004-test-Fix-regex-syntax-errors.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ index b7fd9b2..ec4979c 100644
3535
parser = MyHTMLParser()
3636
# We work around HTMLParser's limitations parsing CDATA
3737
diff --git a/test/pathological_tests.py b/test/pathological_tests.py
38-
index 55867ef..9fe1817 100644
38+
index f556a1d..80b5261 100644
3939
--- a/test/pathological_tests.py
4040
+++ b/test/pathological_tests.py
41-
@@ -29,7 +29,7 @@ def hash_collisions():
41+
@@ -30,7 +30,7 @@ def hash_collisions():
4242

4343
document = ''.join("[%s]: /url\n\n[%s]\n\n" % (key, bad_key) for key in collisions)
4444

@@ -47,7 +47,7 @@ index 55867ef..9fe1817 100644
4747

4848
allowed_failures = {"many references": True}
4949

50-
@@ -47,10 +47,10 @@ pathological = {
50+
@@ -48,10 +48,10 @@ pathological = {
5151
re.compile("(_a ){64999}_a")),
5252
"many link closers with no openers":
5353
(("a]" * 65000),
@@ -60,7 +60,7 @@ index 55867ef..9fe1817 100644
6060
"mismatched openers and closers":
6161
(("*a_ " * 50000),
6262
re.compile("([*]a[_] ){49999}[*]a_")),
63-
@@ -59,19 +59,19 @@ pathological = {
63+
@@ -60,19 +60,19 @@ pathological = {
6464
re.compile("a[*][*]b(c[*] ){49999}c[*]")),
6565
"link openers and emph closers":
6666
(("[ a_" * 50000),
@@ -84,7 +84,7 @@ index 55867ef..9fe1817 100644
8484
"nested block quotes":
8585
((("> " * 50000) + "a"),
8686
re.compile("(<blockquote>\n){50000}")),
87-
@@ -86,13 +86,13 @@ pathological = {
87+
@@ -87,13 +87,13 @@ pathological = {
8888
re.compile("^<p>[e`]*</p>\n$")),
8989
"unclosed links A":
9090
("[a](<b" * 30000,

debian/patches/0004-test-Increase-pathological_tests-timeout-to-50-secon.patch

Lines changed: 0 additions & 24 deletions
This file was deleted.

debian/patches/0006-test-Fix-use-of-allowed_failures-in-pathological_tes.patch renamed to debian/patches/0005-test-Fix-use-of-allowed_failures-in-pathological_tes.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ Signed-off-by: Keith Packard <keithp@keithp.com>
1313
1 file changed, 2 insertions(+), 2 deletions(-)
1414

1515
diff --git a/test/pathological_tests.py b/test/pathological_tests.py
16-
index 9fe1817..3986471 100644
16+
index 80b5261..c2fdff6 100644
1717
--- a/test/pathological_tests.py
1818
+++ b/test/pathological_tests.py
19-
@@ -144,12 +144,12 @@ if __name__ == '__main__':
19+
@@ -146,12 +146,12 @@ if __name__ == '__main__':
2020
p.terminate()
2121
p.join()
2222
print('[TIMED OUT]')

debian/patches/series

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
0001-Install-all-headers-in-include-cmark-gfm.patch
2-
0002-Provide-a-way-to-extend-test-timeouts.patch
3-
0003-man-Add-missing-command-line-options.patch
4-
0004-test-Increase-pathological_tests-timeout-to-50-secon.patch
5-
0005-test-Fix-regex-syntax-errors.patch
6-
0006-test-Fix-use-of-allowed_failures-in-pathological_tes.patch
2+
0002-man-Add-missing-command-line-options.patch
3+
0003-Provide-a-way-to-extend-test-timeouts.patch
4+
0004-test-Fix-regex-syntax-errors.patch
5+
0005-test-Fix-use-of-allowed_failures-in-pathological_tes.patch

0 commit comments

Comments
 (0)