summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/libxml/libxml2/runtest.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/libxml/libxml2/runtest.patch')
-rw-r--r--meta/recipes-core/libxml/libxml2/runtest.patch204
1 files changed, 114 insertions, 90 deletions
diff --git a/meta/recipes-core/libxml/libxml2/runtest.patch b/meta/recipes-core/libxml/libxml2/runtest.patch
index 544dc05834..0dbb353c0f 100644
--- a/meta/recipes-core/libxml/libxml2/runtest.patch
+++ b/meta/recipes-core/libxml/libxml2/runtest.patch
@@ -1,14 +1,28 @@
1Add 'install-ptest' rule. 1Add 'install-ptest' rule. Print a standard result line for
2Print a standard result line for each test. 2each test.
3 3
4Signed-off-by: Mihaela Sendrea <mihaela.sendrea@enea.com> 4Signed-off-by: Mihaela Sendrea <mihaela.sendrea@enea.com>
5Signed-off-by: Andrej Valek <andrej.valek@siemens.com> 5Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
6Upstream-Status: Backport 6Upstream-Status: Backport
7 7
8diff -uNr a/Makefile.am b/Makefile.am 8Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
9--- a/Makefile.am 2017-12-02 09:58:10.000000000 +0100 9---
10+++ b/Makefile.am 2018-03-20 08:27:34.360505864 +0100 10 Makefile.am | 9 ++++
11@@ -202,6 +202,15 @@ 11 runsuite.c | 1 +
12 runtest.c | 2 +
13 runxmlconf.c | 1 +
14 testapi.c | 122 ++++++++++++++++++++++++++++++---------------
15 testchar.c | 156 +++++++++++++++++++++++++++++++++++++++++-----------------
16 testdict.c | 1 +
17 testlimits.c | 1 +
18 testrecurse.c | 2 +
19 9 files changed, 210 insertions(+), 85 deletions(-)
20
21diff --git a/Makefile.am b/Makefile.am
22index 9c630be..7cfd04b 100644
23--- a/Makefile.am
24+++ b/Makefile.am
25@@ -202,6 +202,15 @@ runxmlconf_LDADD= $(LDADDS)
12 #testOOM_DEPENDENCIES = $(DEPS) 26 #testOOM_DEPENDENCIES = $(DEPS)
13 #testOOM_LDADD= $(LDADDS) 27 #testOOM_LDADD= $(LDADDS)
14 28
@@ -24,10 +38,11 @@ diff -uNr a/Makefile.am b/Makefile.am
24 runtests: runtest$(EXEEXT) testrecurse$(EXEEXT) testapi$(EXEEXT) \ 38 runtests: runtest$(EXEEXT) testrecurse$(EXEEXT) testapi$(EXEEXT) \
25 testchar$(EXEEXT) testdict$(EXEEXT) runxmlconf$(EXEEXT) 39 testchar$(EXEEXT) testdict$(EXEEXT) runxmlconf$(EXEEXT)
26 [ -d test ] || $(LN_S) $(srcdir)/test . 40 [ -d test ] || $(LN_S) $(srcdir)/test .
27diff -uNr a/runsuite.c b/runsuite.c 41diff --git a/runsuite.c b/runsuite.c
28--- a/runsuite.c 2016-06-07 12:04:14.000000000 +0200 42index aaab13e..9ba2c5d 100644
29+++ b/runsuite.c 2018-03-20 08:27:57.478817247 +0100 43--- a/runsuite.c
30@@ -1162,6 +1162,7 @@ 44+++ b/runsuite.c
45@@ -1162,6 +1162,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
31 46
32 if (logfile != NULL) 47 if (logfile != NULL)
33 fclose(logfile); 48 fclose(logfile);
@@ -35,20 +50,19 @@ diff -uNr a/runsuite.c b/runsuite.c
35 return(ret); 50 return(ret);
36 } 51 }
37 #else /* !SCHEMAS */ 52 #else /* !SCHEMAS */
38diff -uNr a/runtest.c b/runtest.c 53diff --git a/runtest.c b/runtest.c
39--- a/runtest.c 2017-11-13 22:00:17.000000000 +0100 54index addda5c..8ba5d59 100644
40+++ b/runtest.c 2018-03-20 08:28:50.859047551 +0100 55--- a/runtest.c
41@@ -4496,7 +4496,8 @@ 56+++ b/runtest.c
42 } 57@@ -4501,6 +4501,7 @@ launchTests(testDescPtr tst) {
43
44 xmlCharEncCloseFunc(ebcdicHandler); 58 xmlCharEncCloseFunc(ebcdicHandler);
45- 59 xmlCharEncCloseFunc(eucJpHandler);
46+ 60
47+ printf("%s: %s\n", (err == 0) ? "PASS" : "FAIL", tst->desc); 61+ printf("%s: %s\n", (err == 0) ? "PASS" : "FAIL", tst->desc);
48 return(err); 62 return(err);
49 } 63 }
50 64
51@@ -4573,6 +4574,7 @@ 65@@ -4577,6 +4578,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
52 xmlCleanupParser(); 66 xmlCleanupParser();
53 xmlMemoryDump(); 67 xmlMemoryDump();
54 68
@@ -56,10 +70,11 @@ diff -uNr a/runtest.c b/runtest.c
56 return(ret); 70 return(ret);
57 } 71 }
58 72
59diff -uNr a/runxmlconf.c b/runxmlconf.c 73diff --git a/runxmlconf.c b/runxmlconf.c
60--- a/runxmlconf.c 2016-06-07 12:04:14.000000000 +0200 74index cef20f4..4f291fb 100644
61+++ b/runxmlconf.c 2018-03-20 08:29:17.944862893 +0100 75--- a/runxmlconf.c
62@@ -595,6 +595,7 @@ 76+++ b/runxmlconf.c
77@@ -595,6 +595,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
63 78
64 if (logfile != NULL) 79 if (logfile != NULL)
65 fclose(logfile); 80 fclose(logfile);
@@ -67,15 +82,15 @@ diff -uNr a/runxmlconf.c b/runxmlconf.c
67 return(ret); 82 return(ret);
68 } 83 }
69 84
70diff -uNr a/testapi.c b/testapi.c 85diff --git a/testapi.c b/testapi.c
71--- a/testapi.c 2018-01-25 07:39:15.000000000 +0100 86index 4a751e2..7ccc066 100644
72+++ b/testapi.c 2018-03-20 09:08:35.323980145 +0100 87--- a/testapi.c
73@@ -1246,49 +1246,91 @@ 88+++ b/testapi.c
89@@ -1246,49 +1246,91 @@ static int
74 testlibxml2(void) 90 testlibxml2(void)
75 { 91 {
76 int test_ret = 0; 92 int test_ret = 0;
77+ int ret = 0; 93-
78
79- test_ret += test_HTMLparser(); 94- test_ret += test_HTMLparser();
80- test_ret += test_HTMLtree(); 95- test_ret += test_HTMLtree();
81- test_ret += test_SAX2(); 96- test_ret += test_SAX2();
@@ -115,6 +130,8 @@ diff -uNr a/testapi.c b/testapi.c
115- test_ret += test_xpath(); 130- test_ret += test_xpath();
116- test_ret += test_xpathInternals(); 131- test_ret += test_xpathInternals();
117- test_ret += test_xpointer(); 132- test_ret += test_xpointer();
133+ int ret = 0;
134+
118+ test_ret += (ret = test_HTMLparser()); 135+ test_ret += (ret = test_HTMLparser());
119+ printf("%s: HTMLparser\n", (ret == 0) ? "PASS" : "FAIL"); 136+ printf("%s: HTMLparser\n", (ret == 0) ? "PASS" : "FAIL");
120+ test_ret += (ret = test_HTMLtree()); 137+ test_ret += (ret = test_HTMLtree());
@@ -201,20 +218,11 @@ diff -uNr a/testapi.c b/testapi.c
201 return(test_ret); 218 return(test_ret);
202 } 219 }
203 220
204diff -uNr a/testdict.c b/testdict.c 221diff --git a/testchar.c b/testchar.c
205--- a/testdict.c 2016-06-07 12:04:14.000000000 +0200 222index 0d08792..f555d3b 100644
206+++ b/testdict.c 2018-03-20 08:59:16.864275812 +0100 223--- a/testchar.c
207@@ -440,5 +440,6 @@ 224+++ b/testchar.c
208 clean_strings(); 225@@ -23,7 +23,7 @@ static void errorHandler(void *unused, xmlErrorPtr err) {
209 xmlCleanupParser();
210 xmlMemoryDump();
211+ printf("%s: testdict\n\n", (ret == 0) ? "PASS" : "FAIL");
212 return(ret);
213 }
214diff -uNr a/testchar.c b/testchar.c
215--- a/testchar.c 2016-06-07 12:04:14.000000000 +0200
216+++ b/testchar.c 2018-03-20 09:11:20.383573912 +0100
217@@ -23,7 +23,7 @@
218 char document1[100] = "<doc>XXXX</doc>"; 226 char document1[100] = "<doc>XXXX</doc>";
219 char document2[100] = "<doc foo='XXXX'/>"; 227 char document2[100] = "<doc foo='XXXX'/>";
220 228
@@ -223,7 +231,7 @@ diff -uNr a/testchar.c b/testchar.c
223 int len, char *data, int forbid1, int forbid2) { 231 int len, char *data, int forbid1, int forbid2) {
224 int i; 232 int i;
225 xmlDocPtr res; 233 xmlDocPtr res;
226@@ -37,33 +37,41 @@ 234@@ -37,33 +37,41 @@ static void testDocumentRangeByte1(xmlParserCtxtPtr ctxt, char *document,
227 res = xmlReadMemory(document, len, "test", NULL, 0); 235 res = xmlReadMemory(document, len, "test", NULL, 0);
228 236
229 if ((i == forbid1) || (i == forbid2)) { 237 if ((i == forbid1) || (i == forbid2)) {
@@ -269,7 +277,7 @@ diff -uNr a/testchar.c b/testchar.c
269 int len, char *data) { 277 int len, char *data) {
270 int i, j; 278 int i, j;
271 xmlDocPtr res; 279 xmlDocPtr res;
272@@ -80,10 +88,12 @@ 280@@ -80,10 +88,12 @@ static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document,
273 281
274 /* if first bit of first char is set, then second bit must too */ 282 /* if first bit of first char is set, then second bit must too */
275 if ((i & 0x80) && ((i & 0x40) == 0)) { 283 if ((i & 0x80) && ((i & 0x40) == 0)) {
@@ -283,7 +291,7 @@ diff -uNr a/testchar.c b/testchar.c
283 } 291 }
284 292
285 /* 293 /*
286@@ -91,10 +101,12 @@ 294@@ -91,10 +101,12 @@ static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document,
287 * bits must be 10 295 * bits must be 10
288 */ 296 */
289 else if ((i & 0x80) && ((j & 0xC0) != 0x80)) { 297 else if ((i & 0x80) && ((j & 0xC0) != 0x80)) {
@@ -297,7 +305,7 @@ diff -uNr a/testchar.c b/testchar.c
297 } 305 }
298 306
299 /* 307 /*
300@@ -102,10 +114,12 @@ 308@@ -102,10 +114,12 @@ static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document,
301 * than 0x80, i.e. one of bits 5 to 1 of i must be set 309 * than 0x80, i.e. one of bits 5 to 1 of i must be set
302 */ 310 */
303 else if ((i & 0x80) && ((i & 0x1E) == 0)) { 311 else if ((i & 0x80) && ((i & 0x1E) == 0)) {
@@ -311,7 +319,7 @@ diff -uNr a/testchar.c b/testchar.c
311 } 319 }
312 320
313 /* 321 /*
314@@ -113,10 +127,12 @@ 322@@ -113,10 +127,12 @@ static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document,
315 * at least 3 bytes, but we give only 2 ! 323 * at least 3 bytes, but we give only 2 !
316 */ 324 */
317 else if ((i & 0xE0) == 0xE0) { 325 else if ((i & 0xE0) == 0xE0) {
@@ -325,7 +333,7 @@ diff -uNr a/testchar.c b/testchar.c
325 } 333 }
326 334
327 /* 335 /*
328@@ -125,11 +141,13 @@ 336@@ -125,11 +141,13 @@ static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document,
329 else if ((lastError != 0) || (res == NULL)) { 337 else if ((lastError != 0) || (res == NULL)) {
330 fprintf(stderr, 338 fprintf(stderr,
331 "Failed to parse document for Bytes 0x%02X 0x%02X\n", i, j); 339 "Failed to parse document for Bytes 0x%02X 0x%02X\n", i, j);
@@ -339,7 +347,7 @@ diff -uNr a/testchar.c b/testchar.c
339 } 347 }
340 348
341 /** 349 /**
342@@ -141,9 +159,10 @@ 350@@ -141,9 +159,10 @@ static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document,
343 * CDATA in text or in attribute values. 351 * CDATA in text or in attribute values.
344 */ 352 */
345 353
@@ -351,7 +359,7 @@ diff -uNr a/testchar.c b/testchar.c
351 359
352 /* 360 /*
353 * Set up a parsing context using the first document as 361 * Set up a parsing context using the first document as
354@@ -152,7 +171,7 @@ 362@@ -152,7 +171,7 @@ static void testDocumentRanges(void) {
355 ctxt = xmlNewParserCtxt(); 363 ctxt = xmlNewParserCtxt();
356 if (ctxt == NULL) { 364 if (ctxt == NULL) {
357 fprintf(stderr, "Failed to allocate parser context\n"); 365 fprintf(stderr, "Failed to allocate parser context\n");
@@ -360,7 +368,7 @@ diff -uNr a/testchar.c b/testchar.c
360 } 368 }
361 369
362 printf("testing 1 byte char in document: 1"); 370 printf("testing 1 byte char in document: 1");
363@@ -163,7 +182,7 @@ 371@@ -163,7 +182,7 @@ static void testDocumentRanges(void) {
364 data[2] = ' '; 372 data[2] = ' ';
365 data[3] = ' '; 373 data[3] = ' ';
366 /* test 1 byte injection at beginning of area */ 374 /* test 1 byte injection at beginning of area */
@@ -369,7 +377,7 @@ diff -uNr a/testchar.c b/testchar.c
369 data, -1, -1); 377 data, -1, -1);
370 printf(" 2"); 378 printf(" 2");
371 fflush(stdout); 379 fflush(stdout);
372@@ -172,7 +191,7 @@ 380@@ -172,7 +191,7 @@ static void testDocumentRanges(void) {
373 data[2] = ' '; 381 data[2] = ' ';
374 data[3] = ' '; 382 data[3] = ' ';
375 /* test 1 byte injection at end of area */ 383 /* test 1 byte injection at end of area */
@@ -378,7 +386,7 @@ diff -uNr a/testchar.c b/testchar.c
378 data + 3, -1, -1); 386 data + 3, -1, -1);
379 387
380 printf(" 3"); 388 printf(" 3");
381@@ -183,7 +202,7 @@ 389@@ -183,7 +202,7 @@ static void testDocumentRanges(void) {
382 data[2] = ' '; 390 data[2] = ' ';
383 data[3] = ' '; 391 data[3] = ' ';
384 /* test 1 byte injection at beginning of area */ 392 /* test 1 byte injection at beginning of area */
@@ -387,7 +395,7 @@ diff -uNr a/testchar.c b/testchar.c
387 data, '\'', -1); 395 data, '\'', -1);
388 printf(" 4"); 396 printf(" 4");
389 fflush(stdout); 397 fflush(stdout);
390@@ -192,7 +211,7 @@ 398@@ -192,7 +211,7 @@ static void testDocumentRanges(void) {
391 data[2] = ' '; 399 data[2] = ' ';
392 data[3] = ' '; 400 data[3] = ' ';
393 /* test 1 byte injection at end of area */ 401 /* test 1 byte injection at end of area */
@@ -396,7 +404,7 @@ diff -uNr a/testchar.c b/testchar.c
396 data + 3, '\'', -1); 404 data + 3, '\'', -1);
397 printf(" done\n"); 405 printf(" done\n");
398 406
399@@ -204,7 +223,7 @@ 407@@ -204,7 +223,7 @@ static void testDocumentRanges(void) {
400 data[2] = ' '; 408 data[2] = ' ';
401 data[3] = ' '; 409 data[3] = ' ';
402 /* test 2 byte injection at beginning of area */ 410 /* test 2 byte injection at beginning of area */
@@ -405,7 +413,7 @@ diff -uNr a/testchar.c b/testchar.c
405 data); 413 data);
406 printf(" 2"); 414 printf(" 2");
407 fflush(stdout); 415 fflush(stdout);
408@@ -213,7 +232,7 @@ 416@@ -213,7 +232,7 @@ static void testDocumentRanges(void) {
409 data[2] = ' '; 417 data[2] = ' ';
410 data[3] = ' '; 418 data[3] = ' ';
411 /* test 2 byte injection at end of area */ 419 /* test 2 byte injection at end of area */
@@ -414,7 +422,7 @@ diff -uNr a/testchar.c b/testchar.c
414 data + 2); 422 data + 2);
415 423
416 printf(" 3"); 424 printf(" 3");
417@@ -224,7 +243,7 @@ 425@@ -224,7 +243,7 @@ static void testDocumentRanges(void) {
418 data[2] = ' '; 426 data[2] = ' ';
419 data[3] = ' '; 427 data[3] = ' ';
420 /* test 2 byte injection at beginning of area */ 428 /* test 2 byte injection at beginning of area */
@@ -423,7 +431,7 @@ diff -uNr a/testchar.c b/testchar.c
423 data); 431 data);
424 printf(" 4"); 432 printf(" 4");
425 fflush(stdout); 433 fflush(stdout);
426@@ -233,14 +252,15 @@ 434@@ -233,14 +252,15 @@ static void testDocumentRanges(void) {
427 data[2] = ' '; 435 data[2] = ' ';
428 data[3] = ' '; 436 data[3] = ' ';
429 /* test 2 byte injection at end of area */ 437 /* test 2 byte injection at end of area */
@@ -441,7 +449,7 @@ diff -uNr a/testchar.c b/testchar.c
441 int i = 0; 449 int i = 0;
442 int len, c; 450 int len, c;
443 451
444@@ -255,19 +275,25 @@ 452@@ -255,19 +275,25 @@ static void testCharRangeByte1(xmlParserCtxtPtr ctxt, char *data) {
445 c = xmlCurrentChar(ctxt, &len); 453 c = xmlCurrentChar(ctxt, &len);
446 if ((i == 0) || (i >= 0x80)) { 454 if ((i == 0) || (i >= 0x80)) {
447 /* we must see an error there */ 455 /* we must see an error there */
@@ -470,7 +478,7 @@ diff -uNr a/testchar.c b/testchar.c
470 int i, j; 478 int i, j;
471 int len, c; 479 int len, c;
472 480
473@@ -284,10 +310,12 @@ 481@@ -284,10 +310,12 @@ static void testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) {
474 482
475 /* if first bit of first char is set, then second bit must too */ 483 /* if first bit of first char is set, then second bit must too */
476 if ((i & 0x80) && ((i & 0x40) == 0)) { 484 if ((i & 0x80) && ((i & 0x40) == 0)) {
@@ -484,7 +492,7 @@ diff -uNr a/testchar.c b/testchar.c
484 } 492 }
485 493
486 /* 494 /*
487@@ -295,10 +323,12 @@ 495@@ -295,10 +323,12 @@ static void testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) {
488 * bits must be 10 496 * bits must be 10
489 */ 497 */
490 else if ((i & 0x80) && ((j & 0xC0) != 0x80)) { 498 else if ((i & 0x80) && ((j & 0xC0) != 0x80)) {
@@ -498,7 +506,7 @@ diff -uNr a/testchar.c b/testchar.c
498 } 506 }
499 507
500 /* 508 /*
501@@ -306,10 +336,12 @@ 509@@ -306,10 +336,12 @@ static void testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) {
502 * than 0x80, i.e. one of bits 5 to 1 of i must be set 510 * than 0x80, i.e. one of bits 5 to 1 of i must be set
503 */ 511 */
504 else if ((i & 0x80) && ((i & 0x1E) == 0)) { 512 else if ((i & 0x80) && ((i & 0x1E) == 0)) {
@@ -512,7 +520,7 @@ diff -uNr a/testchar.c b/testchar.c
512 } 520 }
513 521
514 /* 522 /*
515@@ -317,10 +349,12 @@ 523@@ -317,10 +349,12 @@ static void testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) {
516 * at least 3 bytes, but we give only 2 ! 524 * at least 3 bytes, but we give only 2 !
517 */ 525 */
518 else if ((i & 0xE0) == 0xE0) { 526 else if ((i & 0xE0) == 0xE0) {
@@ -526,7 +534,7 @@ diff -uNr a/testchar.c b/testchar.c
526 } 534 }
527 535
528 /* 536 /*
529@@ -329,6 +363,7 @@ 537@@ -329,6 +363,7 @@ static void testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) {
530 else if ((lastError != 0) || (len != 2)) { 538 else if ((lastError != 0) || (len != 2)) {
531 fprintf(stderr, 539 fprintf(stderr,
532 "Failed to parse char for Bytes 0x%02X 0x%02X\n", i, j); 540 "Failed to parse char for Bytes 0x%02X 0x%02X\n", i, j);
@@ -534,7 +542,7 @@ diff -uNr a/testchar.c b/testchar.c
534 } 542 }
535 543
536 /* 544 /*
537@@ -338,12 +373,14 @@ 545@@ -338,12 +373,14 @@ static void testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) {
538 fprintf(stderr, 546 fprintf(stderr,
539 "Failed to parse char for Bytes 0x%02X 0x%02X: expect %d got %d\n", 547 "Failed to parse char for Bytes 0x%02X 0x%02X: expect %d got %d\n",
540 i, j, ((j & 0x3F) + ((i & 0x1F) << 6)), c); 548 i, j, ((j & 0x3F) + ((i & 0x1F) << 6)), c);
@@ -550,7 +558,7 @@ diff -uNr a/testchar.c b/testchar.c
550 int i, j, k, K; 558 int i, j, k, K;
551 int len, c; 559 int len, c;
552 unsigned char lows[6] = {0, 0x80, 0x81, 0xC1, 0xFF, 0xBF}; 560 unsigned char lows[6] = {0, 0x80, 0x81, 0xC1, 0xFF, 0xBF};
553@@ -368,20 +405,24 @@ 561@@ -368,20 +405,24 @@ static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) {
554 * at least 4 bytes, but we give only 3 ! 562 * at least 4 bytes, but we give only 3 !
555 */ 563 */
556 if ((i & 0xF0) == 0xF0) { 564 if ((i & 0xF0) == 0xF0) {
@@ -577,7 +585,7 @@ diff -uNr a/testchar.c b/testchar.c
577 } 585 }
578 586
579 /* 587 /*
580@@ -390,10 +431,12 @@ 588@@ -390,10 +431,12 @@ static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) {
581 * the 6th byte of data[1] must be set 589 * the 6th byte of data[1] must be set
582 */ 590 */
583 else if (((i & 0xF) == 0) && ((j & 0x20) == 0)) { 591 else if (((i & 0xF) == 0) && ((j & 0x20) == 0)) {
@@ -591,7 +599,7 @@ diff -uNr a/testchar.c b/testchar.c
591 } 599 }
592 600
593 /* 601 /*
594@@ -401,10 +444,12 @@ 602@@ -401,10 +444,12 @@ static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) {
595 */ 603 */
596 else if (((value > 0xD7FF) && (value <0xE000)) || 604 else if (((value > 0xD7FF) && (value <0xE000)) ||
597 ((value > 0xFFFD) && (value <0x10000))) { 605 ((value > 0xFFFD) && (value <0x10000))) {
@@ -605,7 +613,7 @@ diff -uNr a/testchar.c b/testchar.c
605 } 613 }
606 614
607 /* 615 /*
608@@ -414,6 +459,7 @@ 616@@ -414,6 +459,7 @@ static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) {
609 fprintf(stderr, 617 fprintf(stderr,
610 "Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X\n", 618 "Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X\n",
611 i, j, K); 619 i, j, K);
@@ -613,7 +621,7 @@ diff -uNr a/testchar.c b/testchar.c
613 } 621 }
614 622
615 /* 623 /*
616@@ -423,13 +469,15 @@ 624@@ -423,13 +469,15 @@ static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) {
617 fprintf(stderr, 625 fprintf(stderr,
618 "Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X: expect %d got %d\n", 626 "Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X: expect %d got %d\n",
619 i, j, data[2], value, c); 627 i, j, data[2], value, c);
@@ -630,7 +638,7 @@ diff -uNr a/testchar.c b/testchar.c
630 int i, j, k, K, l, L; 638 int i, j, k, K, l, L;
631 int len, c; 639 int len, c;
632 unsigned char lows[6] = {0, 0x80, 0x81, 0xC1, 0xFF, 0xBF}; 640 unsigned char lows[6] = {0, 0x80, 0x81, 0xC1, 0xFF, 0xBF};
633@@ -458,10 +506,12 @@ 641@@ -458,10 +506,12 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
634 * at least 5 bytes, but we give only 4 ! 642 * at least 5 bytes, but we give only 4 !
635 */ 643 */
636 if ((i & 0xF8) == 0xF8) { 644 if ((i & 0xF8) == 0xF8) {
@@ -644,7 +652,7 @@ diff -uNr a/testchar.c b/testchar.c
644 } 652 }
645 653
646 /* 654 /*
647@@ -469,10 +519,12 @@ 655@@ -469,10 +519,12 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
648 */ 656 */
649 else if (((j & 0xC0) != 0x80) || ((K & 0xC0) != 0x80) || 657 else if (((j & 0xC0) != 0x80) || ((K & 0xC0) != 0x80) ||
650 ((L & 0xC0) != 0x80)) { 658 ((L & 0xC0) != 0x80)) {
@@ -658,7 +666,7 @@ diff -uNr a/testchar.c b/testchar.c
658 } 666 }
659 667
660 /* 668 /*
661@@ -481,10 +533,12 @@ 669@@ -481,10 +533,12 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
662 * the 6 or 5th byte of j must be set 670 * the 6 or 5th byte of j must be set
663 */ 671 */
664 else if (((i & 0x7) == 0) && ((j & 0x30) == 0)) { 672 else if (((i & 0x7) == 0) && ((j & 0x30) == 0)) {
@@ -672,7 +680,7 @@ diff -uNr a/testchar.c b/testchar.c
672 } 680 }
673 681
674 /* 682 /*
675@@ -493,10 +547,12 @@ 683@@ -493,10 +547,12 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
676 else if (((value > 0xD7FF) && (value <0xE000)) || 684 else if (((value > 0xD7FF) && (value <0xE000)) ||
677 ((value > 0xFFFD) && (value <0x10000)) || 685 ((value > 0xFFFD) && (value <0x10000)) ||
678 (value > 0x10FFFF)) { 686 (value > 0x10FFFF)) {
@@ -686,7 +694,7 @@ diff -uNr a/testchar.c b/testchar.c
686 } 694 }
687 695
688 /* 696 /*
689@@ -506,6 +562,7 @@ 697@@ -506,6 +562,7 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
690 fprintf(stderr, 698 fprintf(stderr,
691 "Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X\n", 699 "Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X\n",
692 i, j, K); 700 i, j, K);
@@ -694,7 +702,7 @@ diff -uNr a/testchar.c b/testchar.c
694 } 702 }
695 703
696 /* 704 /*
697@@ -515,11 +572,13 @@ 705@@ -515,11 +572,13 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
698 fprintf(stderr, 706 fprintf(stderr,
699 "Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X: expect %d got %d\n", 707 "Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X: expect %d got %d\n",
700 i, j, data[2], value, c); 708 i, j, data[2], value, c);
@@ -708,7 +716,7 @@ diff -uNr a/testchar.c b/testchar.c
708 } 716 }
709 717
710 /** 718 /**
711@@ -530,11 +589,12 @@ 719@@ -530,11 +589,12 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
712 * cover the full range of UTF-8 chars accepted by XML-1.0 720 * cover the full range of UTF-8 chars accepted by XML-1.0
713 */ 721 */
714 722
@@ -722,7 +730,7 @@ diff -uNr a/testchar.c b/testchar.c
722 730
723 memset(data, 0, 5); 731 memset(data, 0, 5);
724 732
725@@ -545,17 +605,19 @@ 733@@ -545,17 +605,19 @@ static void testCharRanges(void) {
726 ctxt = xmlNewParserCtxt(); 734 ctxt = xmlNewParserCtxt();
727 if (ctxt == NULL) { 735 if (ctxt == NULL) {
728 fprintf(stderr, "Failed to allocate parser context\n"); 736 fprintf(stderr, "Failed to allocate parser context\n");
@@ -743,7 +751,7 @@ diff -uNr a/testchar.c b/testchar.c
743 goto error; 751 goto error;
744 } 752 }
745 input->filename = NULL; 753 input->filename = NULL;
746@@ -567,25 +629,28 @@ 754@@ -567,25 +629,28 @@ static void testCharRanges(void) {
747 755
748 printf("testing char range: 1"); 756 printf("testing char range: 1");
749 fflush(stdout); 757 fflush(stdout);
@@ -776,7 +784,7 @@ diff -uNr a/testchar.c b/testchar.c
776 /* 784 /*
777 * this initialize the library and check potential ABI mismatches 785 * this initialize the library and check potential ABI mismatches
778 * between the version it was compiled for and the actual shared 786 * between the version it was compiled for and the actual shared
779@@ -602,8 +667,9 @@ 787@@ -602,8 +667,9 @@ int main(void) {
780 /* 788 /*
781 * Run the tests 789 * Run the tests
782 */ 790 */
@@ -788,20 +796,33 @@ diff -uNr a/testchar.c b/testchar.c
788 796
789 /* 797 /*
790 * Cleanup function for the XML library. 798 * Cleanup function for the XML library.
791diff -uNr a/testlimits.c b/testlimits.c 799diff --git a/testdict.c b/testdict.c
792--- a/testlimits.c 2016-11-07 09:41:40.000000000 +0100 800index 40bebd0..114b934 100644
793+++ b/testlimits.c 2018-03-20 08:59:38.965581280 +0100 801--- a/testdict.c
794@@ -1634,5 +1634,6 @@ 802+++ b/testdict.c
803@@ -440,5 +440,6 @@ int main(void)
804 clean_strings();
805 xmlCleanupParser();
806 xmlMemoryDump();
807+ printf("%s: testdict\n\n", (ret == 0) ? "PASS" : "FAIL");
808 return(ret);
809 }
810diff --git a/testlimits.c b/testlimits.c
811index 68c94db..1584434 100644
812--- a/testlimits.c
813+++ b/testlimits.c
814@@ -1634,5 +1634,6 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
795 xmlCleanupParser(); 815 xmlCleanupParser();
796 xmlMemoryDump(); 816 xmlMemoryDump();
797 817
798+ printf("%s: testlimits\n", (ret == 0) ? "PASS" : "FAIL"); 818+ printf("%s: testlimits\n", (ret == 0) ? "PASS" : "FAIL");
799 return(ret); 819 return(ret);
800 } 820 }
801diff -uNr a/testrecurse.c b/testrecurse.c 821diff --git a/testrecurse.c b/testrecurse.c
802--- a/testrecurse.c 2017-10-26 09:54:40.000000000 +0200 822index f95ae1c..74c8f8b 100644
803+++ b/testrecurse.c 2018-03-20 09:00:46.781628749 +0100 823--- a/testrecurse.c
804@@ -892,6 +892,7 @@ 824+++ b/testrecurse.c
825@@ -892,6 +892,7 @@ launchTests(testDescPtr tst) {
805 err++; 826 err++;
806 } 827 }
807 } 828 }
@@ -809,10 +830,13 @@ diff -uNr a/testrecurse.c b/testrecurse.c
809 return(err); 830 return(err);
810 } 831 }
811 832
812@@ -961,5 +962,6 @@ 833@@ -961,5 +962,6 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
813 xmlCleanupParser(); 834 xmlCleanupParser();
814 xmlMemoryDump(); 835 xmlMemoryDump();
815 836
816+ printf("%s: testrecurse\n\n", (ret == 0) ? "PASS" : "FAIL"); 837+ printf("%s: testrecurse\n\n", (ret == 0) ? "PASS" : "FAIL");
817 return(ret); 838 return(ret);
818 } 839 }
840--
8412.7.4
842