pantoniou / libfyaml

Fully feature complete YAML parser and emitter, supporting the latest YAML spec and passing the full YAML testsuite.
MIT License
239 stars 73 forks source link

Fix emit event create apis #111

Closed kdubb closed 1 month ago

kdubb commented 1 month ago

As discovered in investigating #109, there are issues with using fy_emit_event_create (and similar apis) that cause tokens to be emitted incorrectly, specifically, whitespace-only scalars.

After implementing #110 to test the fy_emit_event_create code path fully, 15 failing tests revealed other issues.

With the fixes below, the existing and newly added tests in #110 all PASS.

The test-only PR was created as a precaution, considering the uncertainty of fixing all the issues initially observed. Now that the tests have passed, I can merge the two PRs if that is the preferred course of action.

Details of fixed issues:

Whitespace-Only Strings

fy_analyze_scalar_content returned FYACF_FLOW_PLAIN in the flags for whitespace-only strings. This flag is now removed when the scalar starts or ends with whitespace or newlines.

Failing tests:

Zero-length Scalars as Mapping Keys

fy_token_text_analyze never added the FYTTAF_CAN_BE_SIMPLE_KEY flag to zero-length scalars. This was added and checked for when emitting FYSS_PLAIN scalars.

Failing tests:

Pain Scalars with Newlines

fy_input_from_data_setup had an explicit path for simple or FYACF_FLOW_PLAIN inputs that caused FYSS_PLAIN scalars, containing newlines, to be output with the newlines as spaces; this was removed.

Failing tests:

Tags with Zero-length Handles

Tags with a zero-length handle (e.g. !) were considered invalid. In fy_tag_scan this replaces the test for handle_length <= 0, with just less than zero.

[!NOTE] This change is validated by the fact that further down in fy_tag_scan there is a check for `handle_length == 0’, meaning it is expets zero-length handles and handles them properly.

Failing tests:

kdubb commented 1 month ago

I don't know where the disconnect is. I ensured that all tests succeed in all code paths.

You example (containing newlines) would be emitted as

Not my examples... these are tests existing in libfyaml prior to my PRs.

Also, the direct output detection of an atom is key to performance, and having it set to false, while it works it forces a slow path which I would like to avoid.

Fine, but it's broken currently. It's a YAML library, functionality has to come before performance, even if that means regressing performance until a later date.

kdubb commented 1 month ago

Also, to be clear, I am very concerned with performance. We are parsing/generating YAML files 10-50MB in size. I am keen to search for and implement any improvement in performance, but libfyaml has to at least work until that time.

pantoniou commented 1 month ago
$ git log --oneline master..HEAD
f3f1783 (HEAD -> fix/emit_event_create_apis) Setup testing for the event creation in streaming mode
d16b5e1 Allow prefix only tags to pass `fy_tag_scan`.
d83c572 Allow “plain” scalars, created via emit event apis, to include newlines
1a07ace Allow zero-length scalars created with emit event api to be “plain” mapping keys
74cd78a Fixes creating blank (aka ws only) scalars with emit event api
$ echo "foo" | ./src/fy-tool --streaming -
foo
$ echo "foo" | ./src/fy-tool --streaming --recreating -

Note how all scalars are empty

$ make check TESTS=testemitter-restreaming.test
Making check in src
Making check in test
FAIL: testemitter-restreaming.test 1 anchors-1.yaml
FAIL: testemitter-restreaming.test 2 anchors-2.yaml
FAIL: testemitter-restreaming.test 3 anchors-3.yaml
FAIL: testemitter-restreaming.test 4 anchors-4.1.yaml
FAIL: testemitter-restreaming.test 5 anchors-4.yaml
PASS: testemitter-restreaming.test 6 anchors-on-empty-scalars1.yaml
PASS: testemitter-restreaming.test 7 anchors-on-empty-scalars2.yaml
FAIL: testemitter-restreaming.test 8 anchors-on-empty-scalars3.yaml
PASS: testemitter-restreaming.test 9 anchors-on-empty-scalars4.yaml
FAIL: testemitter-restreaming.test 10 anchors-on-empty-scalars.yaml
FAIL: testemitter-restreaming.test 11 anchors.yaml
FAIL: testemitter-restreaming.test 12 array.yaml
FAIL: testemitter-restreaming.test 13 block2.yaml
FAIL: testemitter-restreaming.test 14 block3.yaml
FAIL: testemitter-restreaming.test 15 block4.yaml
FAIL: testemitter-restreaming.test 16 block6.yaml
FAIL: testemitter-restreaming.test 17 block7.yaml
FAIL: testemitter-restreaming.test 18 blocked.yaml
FAIL: testemitter-restreaming.test 19 blockind.yaml
FAIL: testemitter-restreaming.test 20 block.yaml
FAIL: testemitter-restreaming.test 21 c10.yaml
FAIL: testemitter-restreaming.test 22 c11.yaml
FAIL: testemitter-restreaming.test 23 c12.yaml
FAIL: testemitter-restreaming.test 24 c13.yaml
FAIL: testemitter-restreaming.test 25 c1.yaml
FAIL: testemitter-restreaming.test 26 c2.yaml
FAIL: testemitter-restreaming.test 27 c3.yaml
FAIL: testemitter-restreaming.test 28 c4.yaml
FAIL: testemitter-restreaming.test 29 c5.yaml
FAIL: testemitter-restreaming.test 30 c6.yaml
FAIL: testemitter-restreaming.test 31 c7.yaml
FAIL: testemitter-restreaming.test 32 c8.yaml
FAIL: testemitter-restreaming.test 33 c9.yaml
FAIL: testemitter-restreaming.test 34 compact1.yaml
FAIL: testemitter-restreaming.test 35 compactblockmap.yaml
FAIL: testemitter-restreaming.test 36 complexkey2.yaml
FAIL: testemitter-restreaming.test 37 complexkey3.yaml
FAIL: testemitter-restreaming.test 38 complexkey4.yaml
FAIL: testemitter-restreaming.test 39 complexkey5.yaml
FAIL: testemitter-restreaming.test 40 complexkey6.yaml
FAIL: testemitter-restreaming.test 41 complexkey7.yaml
FAIL: testemitter-restreaming.test 42 complexkey8.yaml
FAIL: testemitter-restreaming.test 43 complexkey9.yaml
FAIL: testemitter-restreaming.test 44 complexkey.yaml
FAIL: testemitter-restreaming.test 45 docstartend.yaml
FAIL: testemitter-restreaming.test 46 dqscalar.yaml
FAIL: testemitter-restreaming.test 47 dqzero.yaml
FAIL: testemitter-restreaming.test 48 emoji.yaml
PASS: testemitter-restreaming.test 49 emptydoc.yaml
FAIL: testemitter-restreaming.test 50 emptykey.yaml
PASS: testemitter-restreaming.test 51 emptystream.yaml
FAIL: testemitter-restreaming.test 52 flow1.yaml
FAIL: testemitter-restreaming.test 53 flow2.yaml
FAIL: testemitter-restreaming.test 54 flow.yaml
FAIL: testemitter-restreaming.test 55 fold2.yaml
FAIL: testemitter-restreaming.test 56 fold3.yaml
FAIL: testemitter-restreaming.test 57 fold4.yaml
FAIL: testemitter-restreaming.test 58 fold5.yaml
FAIL: testemitter-restreaming.test 59 folded2.yaml
FAIL: testemitter-restreaming.test 60 folded-endbreaks.yaml
FAIL: testemitter-restreaming.test 61 folded.yaml
FAIL: testemitter-restreaming.test 62 folding.yaml
FAIL: testemitter-restreaming.test 63 fold-tricky.yaml
FAIL: testemitter-restreaming.test 64 fold.yaml
FAIL: testemitter-restreaming.test 65 global-tag.yaml
FAIL: testemitter-restreaming.test 66 invoice.yaml
FAIL: testemitter-restreaming.test 67 json.yaml
FAIL: testemitter-restreaming.test 68 keyflow.yaml
FAIL: testemitter-restreaming.test 69 keykey2.yaml
FAIL: testemitter-restreaming.test 70 keykey.yaml
FAIL: testemitter-restreaming.test 71 line.yaml
FAIL: testemitter-restreaming.test 72 literal1.yaml
FAIL: testemitter-restreaming.test 73 literal2.yaml
FAIL: testemitter-restreaming.test 74 literal3.yaml
FAIL: testemitter-restreaming.test 75 literal4.yaml
FAIL: testemitter-restreaming.test 76 literal-endbreaks.yaml
FAIL: testemitter-restreaming.test 77 literal.yaml
FAIL: testemitter-restreaming.test 78 mapping.yaml
FAIL: testemitter-restreaming.test 79 mergekeyspec.yaml
FAIL: testemitter-restreaming.test 80 multi-document.yaml
FAIL: testemitter-restreaming.test 81 multiline-quoted-key.yaml
FAIL: testemitter-restreaming.test 82 multiline-simple-key.yaml
FAIL: testemitter-restreaming.test 83 nodeprop2.yaml
FAIL: testemitter-restreaming.test 84 nodeprop.yaml
FAIL: testemitter-restreaming.test 85 numbers-flow.yaml
FAIL: testemitter-restreaming.test 86 numbers.yaml
FAIL: testemitter-restreaming.test 87 plainlines.yaml
FAIL: testemitter-restreaming.test 88 plain-scalars-with-commas.yaml
FAIL: testemitter-restreaming.test 89 plainscalar.yaml
FAIL: testemitter-restreaming.test 90 quotedbackslash.yaml
FAIL: testemitter-restreaming.test 91 quoted.yaml
FAIL: testemitter-restreaming.test 92 scalar-multiline.yaml
FAIL: testemitter-restreaming.test 93 scalars2.yaml
FAIL: testemitter-restreaming.test 94 scalar-singlequoted.yaml
FAIL: testemitter-restreaming.test 95 scalar-space1.yaml
FAIL: testemitter-restreaming.test 96 scalar-space.yaml
FAIL: testemitter-restreaming.test 97 scalars.yaml
FAIL: testemitter-restreaming.test 98 scanner-c-10.yaml
FAIL: testemitter-restreaming.test 99 scanner-c-11.yaml
FAIL: testemitter-restreaming.test 100 scanner-c-12.yaml
FAIL: testemitter-restreaming.test 101 scanner-c-13.yaml
FAIL: testemitter-restreaming.test 102 scanner-c-1.yaml
PASS: testemitter-restreaming.test 103 scanner-c-2.yaml
FAIL: testemitter-restreaming.test 104 scanner-c-3.yaml
FAIL: testemitter-restreaming.test 105 scanner-c-4.yaml
FAIL: testemitter-restreaming.test 106 scanner-c-5.yaml
PASS: testemitter-restreaming.test 107 scanner-c-6.yaml
FAIL: testemitter-restreaming.test 108 scanner-c-7.yaml
FAIL: testemitter-restreaming.test 109 scanner-c-8-2.yaml
FAIL: testemitter-restreaming.test 110 scanner-c-8.yaml
FAIL: testemitter-restreaming.test 111 scanner-c-9.yaml
FAIL: testemitter-restreaming.test 112 seq1.yaml
FAIL: testemitter-restreaming.test 113 seq2.yaml
FAIL: testemitter-restreaming.test 114 seq3.yaml
FAIL: testemitter-restreaming.test 115 seq4.yaml
FAIL: testemitter-restreaming.test 116 seq5.yaml
FAIL: testemitter-restreaming.test 117 seq6.yaml
FAIL: testemitter-restreaming.test 118 seq.yaml
FAIL: testemitter-restreaming.test 119 sets.yaml
FAIL: testemitter-restreaming.test 120 simple1.yaml
FAIL: testemitter-restreaming.test 121 simple2.yaml
FAIL: testemitter-restreaming.test 122 simpleanchor1.yaml
FAIL: testemitter-restreaming.test 123 simpleanchor2.yaml
FAIL: testemitter-restreaming.test 124 simpleanchor3.yaml
FAIL: testemitter-restreaming.test 125 simpleanchor4.yaml
FAIL: testemitter-restreaming.test 126 simpleanchor.yaml
FAIL: testemitter-restreaming.test 127 simplefolded.yaml
FAIL: testemitter-restreaming.test 128 simplekey1.yaml
FAIL: testemitter-restreaming.test 129 simplekey2.yaml
FAIL: testemitter-restreaming.test 130 simplekey3.yaml
FAIL: testemitter-restreaming.test 131 simplekey4.yaml
FAIL: testemitter-restreaming.test 132 simplekey5.yaml
FAIL: testemitter-restreaming.test 133 simplekey.yaml
FAIL: testemitter-restreaming.test 134 simpleliteral.yaml
FAIL: testemitter-restreaming.test 135 simpleseq1.yaml
FAIL: testemitter-restreaming.test 136 simpleseq.yaml
FAIL: testemitter-restreaming.test 137 simple.yaml
FAIL: testemitter-restreaming.test 138 singlepairimp2.yaml
FAIL: testemitter-restreaming.test 139 singlepairimp.yaml
FAIL: testemitter-restreaming.test 140 sqscalarspace.yaml
FAIL: testemitter-restreaming.test 141 sqscalar.yaml
FAIL: testemitter-restreaming.test 142 strings.yaml
FAIL: testemitter-restreaming.test 143 t1.yaml
FAIL: testemitter-restreaming.test 144 t2.yaml
FAIL: testemitter-restreaming.test 145 t3.yaml
FAIL: testemitter-restreaming.test 146 t4.yaml
FAIL: testemitter-restreaming.test 147 t5.yaml
FAIL: testemitter-restreaming.test 148 tabsmix.yaml
FAIL: testemitter-restreaming.test 149 tagdirective.yaml
FAIL: testemitter-restreaming.test 150 tagesc.yaml
FAIL: testemitter-restreaming.test 151 tags-1.yaml
FAIL: testemitter-restreaming.test 152 tags.yaml
FAIL: testemitter-restreaming.test 153 test1.yaml
FAIL: testemitter-restreaming.test 154 test2.yaml
FAIL: testemitter-restreaming.test 155 test.yaml
FAIL: testemitter-restreaming.test 156 t.yaml
FAIL: testemitter-restreaming.test 157 u1.yaml
FAIL: testemitter-restreaming.test 158 u2.yaml
FAIL: testemitter-restreaming.test 159 u3.yaml
FAIL: testemitter-restreaming.test 160 utf8-simple.yaml
FAIL: testemitter-restreaming.test 161 utf8.yaml
FAIL: testemitter-restreaming.test 162 u.yaml
FAIL: testemitter-restreaming.test 163 v1.yaml
FAIL: testemitter-restreaming.test 164 v2.yaml
PASS: testemitter-restreaming.test 165 version.yaml
FAIL: testemitter-restreaming.test 166 v.yaml
FAIL: testemitter-restreaming.test 167 weirdplain.yaml
FAIL: testemitter-restreaming.test 168 ws0.yaml
FAIL: testemitter-restreaming.test 169 ws1.yaml
FAIL: testemitter-restreaming.test 170 ws2.yaml
FAIL: testemitter-restreaming.test 171 ws3.yaml
FAIL: testemitter-restreaming.test 172 yaml-version.yaml
FAIL: testemitter-restreaming.test 173 y.yaml
FAIL: testemitter-restreaming.test 174 yy.yaml
FAIL: testemitter-restreaming.test 175 zeroexplicit.yaml
============================================================================
Testsuite summary for libfyaml 0.9
============================================================================
# TOTAL: 175
# PASS:  8
# SKIP:  0
# XFAIL: 0
# FAIL:  167
# XPASS: 0
# ERROR: 0
============================================================================
See test/test-suite.log
Please report to pantelis.antoniou@konsulko.com
============================================================================
make[4]: *** [Makefile:1049: test-suite.log] Error 1
make[3]: *** [Makefile:1157: check-TESTS] Error 2
make[2]: *** [Makefile:1223: check-am] Error 2
make[1]: *** [Makefile:579: check-recursive] Error 1
make: *** [Makefile:885: check] Error 2

configure command was

$ ./configure --enable-debug --enable-asan

With the following simple patch:

diff --git a/src/tool/fy-tool.c b/src/tool/fy-tool.c
index 7694d3b..9e38da4 100644
--- a/src/tool/fy-tool.c
+++ b/src/tool/fy-tool.c
@@ -1797,6 +1797,7 @@ int main(int argc, char *argv[])
    int tool_mode = OPT_TOOL;
    struct fy_event *fyev;
    struct fy_event *fyeev;
+   const char *eevtext;
    size_t eevlen;
    struct fy_token *fyt;
    bool join_resolve = RESOLVE_DEFAULT;
@@ -2441,10 +2442,12 @@ int main(int argc, char *argv[])
                                    break;
                                case FYET_SCALAR:
                                    eevlen = 0;
+                                   eevtext = fy_token_get_text(fy_event_get_token(fyev), &eevlen);
+                                   if (!eevtext)
+                                       goto cleanup;
                                    fyeev = fy_emit_event_create(fye, FYET_SCALAR,
                                                fy_scalar_token_get_style(fy_event_get_token(fyev)),
-                                               fy_token_get_text(fy_event_get_token(fyev), &eevlen),
-                                               eevlen,
+                                               eevtext, eevlen,
                                                fy_event_get_anchor_token(fyev)
                                                    ? fy_token_get_text0(fy_event_get_anchor_token(fyev))
                                                    : NULL,

This patch makes things better but still there are some failures

$ make check TESTS=testemitter-restreaming.test
Making check in src
Making check in test
PASS: testemitter-restreaming.test 1 anchors-1.yaml
PASS: testemitter-restreaming.test 2 anchors-2.yaml
PASS: testemitter-restreaming.test 3 anchors-3.yaml
PASS: testemitter-restreaming.test 4 anchors-4.1.yaml
PASS: testemitter-restreaming.test 5 anchors-4.yaml
PASS: testemitter-restreaming.test 6 anchors-on-empty-scalars1.yaml
PASS: testemitter-restreaming.test 7 anchors-on-empty-scalars2.yaml
PASS: testemitter-restreaming.test 8 anchors-on-empty-scalars3.yaml
PASS: testemitter-restreaming.test 9 anchors-on-empty-scalars4.yaml
PASS: testemitter-restreaming.test 10 anchors-on-empty-scalars.yaml
PASS: testemitter-restreaming.test 11 anchors.yaml
PASS: testemitter-restreaming.test 12 array.yaml
PASS: testemitter-restreaming.test 13 block2.yaml
PASS: testemitter-restreaming.test 14 block3.yaml
PASS: testemitter-restreaming.test 15 block4.yaml
PASS: testemitter-restreaming.test 16 block6.yaml
PASS: testemitter-restreaming.test 17 block7.yaml
PASS: testemitter-restreaming.test 18 blocked.yaml
PASS: testemitter-restreaming.test 19 blockind.yaml
PASS: testemitter-restreaming.test 20 block.yaml
PASS: testemitter-restreaming.test 21 c10.yaml
PASS: testemitter-restreaming.test 22 c11.yaml
PASS: testemitter-restreaming.test 23 c12.yaml
PASS: testemitter-restreaming.test 24 c13.yaml
PASS: testemitter-restreaming.test 25 c1.yaml
PASS: testemitter-restreaming.test 26 c2.yaml
PASS: testemitter-restreaming.test 27 c3.yaml
PASS: testemitter-restreaming.test 28 c4.yaml
PASS: testemitter-restreaming.test 29 c5.yaml
PASS: testemitter-restreaming.test 30 c6.yaml
PASS: testemitter-restreaming.test 31 c7.yaml
PASS: testemitter-restreaming.test 32 c8.yaml
PASS: testemitter-restreaming.test 33 c9.yaml
PASS: testemitter-restreaming.test 34 compact1.yaml
PASS: testemitter-restreaming.test 35 compactblockmap.yaml
PASS: testemitter-restreaming.test 36 complexkey2.yaml
PASS: testemitter-restreaming.test 37 complexkey3.yaml
PASS: testemitter-restreaming.test 38 complexkey4.yaml
PASS: testemitter-restreaming.test 39 complexkey5.yaml
PASS: testemitter-restreaming.test 40 complexkey6.yaml
PASS: testemitter-restreaming.test 41 complexkey7.yaml
PASS: testemitter-restreaming.test 42 complexkey8.yaml
PASS: testemitter-restreaming.test 43 complexkey9.yaml
PASS: testemitter-restreaming.test 44 complexkey.yaml
PASS: testemitter-restreaming.test 45 docstartend.yaml
PASS: testemitter-restreaming.test 46 dqscalar.yaml
PASS: testemitter-restreaming.test 47 dqzero.yaml
PASS: testemitter-restreaming.test 48 emoji.yaml
PASS: testemitter-restreaming.test 49 emptydoc.yaml
PASS: testemitter-restreaming.test 50 emptykey.yaml
PASS: testemitter-restreaming.test 51 emptystream.yaml
PASS: testemitter-restreaming.test 52 flow1.yaml
PASS: testemitter-restreaming.test 53 flow2.yaml
PASS: testemitter-restreaming.test 54 flow.yaml
PASS: testemitter-restreaming.test 55 fold2.yaml
PASS: testemitter-restreaming.test 56 fold3.yaml
PASS: testemitter-restreaming.test 57 fold4.yaml
PASS: testemitter-restreaming.test 58 fold5.yaml
PASS: testemitter-restreaming.test 59 folded2.yaml
PASS: testemitter-restreaming.test 60 folded-endbreaks.yaml
PASS: testemitter-restreaming.test 61 folded.yaml
PASS: testemitter-restreaming.test 62 folding.yaml
PASS: testemitter-restreaming.test 63 fold-tricky.yaml
PASS: testemitter-restreaming.test 64 fold.yaml
FAIL: testemitter-restreaming.test 65 global-tag.yaml
PASS: testemitter-restreaming.test 66 invoice.yaml
PASS: testemitter-restreaming.test 67 json.yaml
PASS: testemitter-restreaming.test 68 keyflow.yaml
PASS: testemitter-restreaming.test 69 keykey2.yaml
PASS: testemitter-restreaming.test 70 keykey.yaml
PASS: testemitter-restreaming.test 71 line.yaml
PASS: testemitter-restreaming.test 72 literal1.yaml
PASS: testemitter-restreaming.test 73 literal2.yaml
PASS: testemitter-restreaming.test 74 literal3.yaml
PASS: testemitter-restreaming.test 75 literal4.yaml
PASS: testemitter-restreaming.test 76 literal-endbreaks.yaml
PASS: testemitter-restreaming.test 77 literal.yaml
PASS: testemitter-restreaming.test 78 mapping.yaml
PASS: testemitter-restreaming.test 79 mergekeyspec.yaml
PASS: testemitter-restreaming.test 80 multi-document.yaml
PASS: testemitter-restreaming.test 81 multiline-quoted-key.yaml
PASS: testemitter-restreaming.test 82 multiline-simple-key.yaml
PASS: testemitter-restreaming.test 83 nodeprop2.yaml
PASS: testemitter-restreaming.test 84 nodeprop.yaml
PASS: testemitter-restreaming.test 85 numbers-flow.yaml
PASS: testemitter-restreaming.test 86 numbers.yaml
PASS: testemitter-restreaming.test 87 plainlines.yaml
PASS: testemitter-restreaming.test 88 plain-scalars-with-commas.yaml
PASS: testemitter-restreaming.test 89 plainscalar.yaml
PASS: testemitter-restreaming.test 90 quotedbackslash.yaml
PASS: testemitter-restreaming.test 91 quoted.yaml
PASS: testemitter-restreaming.test 92 scalar-multiline.yaml
PASS: testemitter-restreaming.test 93 scalars2.yaml
PASS: testemitter-restreaming.test 94 scalar-singlequoted.yaml
PASS: testemitter-restreaming.test 95 scalar-space1.yaml
PASS: testemitter-restreaming.test 96 scalar-space.yaml
PASS: testemitter-restreaming.test 97 scalars.yaml
PASS: testemitter-restreaming.test 98 scanner-c-10.yaml
PASS: testemitter-restreaming.test 99 scanner-c-11.yaml
PASS: testemitter-restreaming.test 100 scanner-c-12.yaml
PASS: testemitter-restreaming.test 101 scanner-c-13.yaml
FAIL: testemitter-restreaming.test 102 scanner-c-1.yaml
PASS: testemitter-restreaming.test 103 scanner-c-2.yaml
PASS: testemitter-restreaming.test 104 scanner-c-3.yaml
PASS: testemitter-restreaming.test 105 scanner-c-4.yaml
PASS: testemitter-restreaming.test 106 scanner-c-5.yaml
PASS: testemitter-restreaming.test 107 scanner-c-6.yaml
PASS: testemitter-restreaming.test 108 scanner-c-7.yaml
PASS: testemitter-restreaming.test 109 scanner-c-8-2.yaml
PASS: testemitter-restreaming.test 110 scanner-c-8.yaml
PASS: testemitter-restreaming.test 111 scanner-c-9.yaml
PASS: testemitter-restreaming.test 112 seq1.yaml
PASS: testemitter-restreaming.test 113 seq2.yaml
PASS: testemitter-restreaming.test 114 seq3.yaml
PASS: testemitter-restreaming.test 115 seq4.yaml
PASS: testemitter-restreaming.test 116 seq5.yaml
PASS: testemitter-restreaming.test 117 seq6.yaml
PASS: testemitter-restreaming.test 118 seq.yaml
PASS: testemitter-restreaming.test 119 sets.yaml
PASS: testemitter-restreaming.test 120 simple1.yaml
PASS: testemitter-restreaming.test 121 simple2.yaml
PASS: testemitter-restreaming.test 122 simpleanchor1.yaml
PASS: testemitter-restreaming.test 123 simpleanchor2.yaml
PASS: testemitter-restreaming.test 124 simpleanchor3.yaml
PASS: testemitter-restreaming.test 125 simpleanchor4.yaml
PASS: testemitter-restreaming.test 126 simpleanchor.yaml
PASS: testemitter-restreaming.test 127 simplefolded.yaml
PASS: testemitter-restreaming.test 128 simplekey1.yaml
PASS: testemitter-restreaming.test 129 simplekey2.yaml
PASS: testemitter-restreaming.test 130 simplekey3.yaml
PASS: testemitter-restreaming.test 131 simplekey4.yaml
PASS: testemitter-restreaming.test 132 simplekey5.yaml
PASS: testemitter-restreaming.test 133 simplekey.yaml
PASS: testemitter-restreaming.test 134 simpleliteral.yaml
PASS: testemitter-restreaming.test 135 simpleseq1.yaml
PASS: testemitter-restreaming.test 136 simpleseq.yaml
PASS: testemitter-restreaming.test 137 simple.yaml
PASS: testemitter-restreaming.test 138 singlepairimp2.yaml
PASS: testemitter-restreaming.test 139 singlepairimp.yaml
PASS: testemitter-restreaming.test 140 sqscalarspace.yaml
PASS: testemitter-restreaming.test 141 sqscalar.yaml
PASS: testemitter-restreaming.test 142 strings.yaml
PASS: testemitter-restreaming.test 143 t1.yaml
PASS: testemitter-restreaming.test 144 t2.yaml
PASS: testemitter-restreaming.test 145 t3.yaml
PASS: testemitter-restreaming.test 146 t4.yaml
PASS: testemitter-restreaming.test 147 t5.yaml
PASS: testemitter-restreaming.test 148 tabsmix.yaml
FAIL: testemitter-restreaming.test 149 tagdirective.yaml
FAIL: testemitter-restreaming.test 150 tagesc.yaml
PASS: testemitter-restreaming.test 151 tags-1.yaml
PASS: testemitter-restreaming.test 152 tags.yaml
PASS: testemitter-restreaming.test 153 test1.yaml
PASS: testemitter-restreaming.test 154 test2.yaml
PASS: testemitter-restreaming.test 155 test.yaml
PASS: testemitter-restreaming.test 156 t.yaml
PASS: testemitter-restreaming.test 157 u1.yaml
PASS: testemitter-restreaming.test 158 u2.yaml
PASS: testemitter-restreaming.test 159 u3.yaml
PASS: testemitter-restreaming.test 160 utf8-simple.yaml
PASS: testemitter-restreaming.test 161 utf8.yaml
PASS: testemitter-restreaming.test 162 u.yaml
PASS: testemitter-restreaming.test 163 v1.yaml
PASS: testemitter-restreaming.test 164 v2.yaml
PASS: testemitter-restreaming.test 165 version.yaml
PASS: testemitter-restreaming.test 166 v.yaml
PASS: testemitter-restreaming.test 167 weirdplain.yaml
PASS: testemitter-restreaming.test 168 ws0.yaml
PASS: testemitter-restreaming.test 169 ws1.yaml
PASS: testemitter-restreaming.test 170 ws2.yaml
PASS: testemitter-restreaming.test 171 ws3.yaml
PASS: testemitter-restreaming.test 172 yaml-version.yaml
PASS: testemitter-restreaming.test 173 y.yaml
PASS: testemitter-restreaming.test 174 yy.yaml
PASS: testemitter-restreaming.test 175 zeroexplicit.yaml
============================================================================
Testsuite summary for libfyaml 0.9
============================================================================
# TOTAL: 175
# PASS:  171
# SKIP:  0
# XFAIL: 0
# FAIL:  4
# XPASS: 0
# ERROR: 0
============================================================================
See test/test-suite.log
Please report to pantelis.antoniou@konsulko.com
============================================================================
make[4]: *** [Makefile:1049: test-suite.log] Error 1
make[3]: *** [Makefile:1157: check-TESTS] Error 2
make[2]: *** [Makefile:1223: check-am] Error 2
make[1]: *** [Makefile:579: check-recursive] Error 1
make: *** [Makefile:885: check] Error 2
kdubb commented 1 month ago

I'm not sure what all --debug does but it definitely works without that.

I'm not arguing that it should be relying on an undefined order; trying to figure out how that changes the test.

pantoniou commented 1 month ago

Manually merged this (along with some minor fixes) with 39327405344e61e03f4c5cc318aab8bd30a6e7e7

Please test and verify