Skip to content

Test failures on 32-bit architectures #67

Description

@swt2c

When building on Debian on 32-bit architectures, we're seeing a number of the tests fail:

Running 1 test suites...
Test suite xeno-test: RUNNING...

Xeno.DOM tests
  test 1 [✘]
Xeno.DOM tests
  DOM from bytestring substring [✔]
  Leading whitespace characters are accepted by parse [✔]
  children test [✘]
  attributes [✘]
  xml prologue test [✔]
hexml tests
  "<test id='bob'>here<extra/>there</test>" [✘]
  "<test /><close />" [✘]
  "<test /><!-- comment > --><close />" [✘]
  "<test id=\"bob value\" another-attr=\"test with <\">here </test> more text at the end<close />" [✘]
  "<test></more>" [✔]
  "<test" [✔]
  "<?xml version=\"1.1\"?>\n<greeting>Hello, world!</greeting>" [✔]
  "<some-example/>" [✔]
  "<a numeric1=\"attribute\"/>" [✘]
  "<also.a.dot></also.a.dot>" [✔]
  "<test><![CDATA[Oneliner CDATA.]]></test>" [✔]
  "<test><![CDATA[<strong>This is strong but not XML tags.</strong>]]></test>" [✔]
  "<test><![CDATA[A lonely ], sad isn't it?]]></test>" [✔]
  namespaces [✘]
robust XML tests
  DOM from bytestring substring [✔]
  Leading whitespace characters are accepted by parse [✔]
  children test [✘]
  attributes [✘]
  xml prologue test [✔]
  html doctype test [✔]
  hexml tests
    "<test id='bob'>here<extra/>there</test>" [✘]
    "<test /><close />" [✘]
    "<test /><!-- comment > --><close />" [✘]
    "<test id=\"bob value\" another-attr=\"test with <\">here </test> more text at the end<close />" [✘]
    "<test></more>" [✔]
    "<test" [✔]
    "<?xml version=\"1.1\"?>\n<greeting>Hello, world!</greeting>" [✔]
    "<some-example/>" [✔]
    "<a numeric1=\"attribute\"/>" [✘]
    "<also.a.dot></also.a.dot>" [✔]
    "<test><![CDATA[Oneliner CDATA.]]></test>" [✔]
    "<test><![CDATA[<strong>This is strong but not XML tags.</strong>]]></test>" [✔]
    "<test><![CDATA[A lonely ], sad isn't it?]]></test>" [✔]
    namespaces [✘]
Left (XenoParseError {inputIndex = 2, message = "Expected =, got:   at character index: 2"})
  recovers unclosed tag [✘]
  ignores too many closing tags [✔]
skipDoctype
  strips initial doctype declaration [✔]
  strips doctype after spaces [✔]
  does not strip anything after or inside element [✔]

Failures:

  test/Main.hs:28:11: 
  1) Xeno.DOM tests test 1
       uncaught exception: PatternMatchFail
       test/Main.hs:28:11-33: Non-exhaustive patterns in Right dom

  To rerun use: --match "/Xeno.DOM tests/test 1/" --seed 682294124

  test/Main.hs:183:22: 
  2) Xeno.DOM tests children test
       uncaught exception: ErrorCall
       XenoParseError {inputIndex = 11, message = "Expected =, got:   at character index: 11"}
       CallStack (from HasCallStack):
         error, called at test/Main.hs:183:22 in main:Main

  To rerun use: --match "/Xeno.DOM tests/children test/" --seed 682294124

  test/Main.hs:183:22: 
  3) Xeno.DOM tests attributes
       uncaught exception: ErrorCall
       XenoParseError {inputIndex = 11, message = "Expected =, got:   at character index: 11"}
       CallStack (from HasCallStack):
         error, called at test/Main.hs:183:22 in main:Main

  To rerun use: --match "/Xeno.DOM tests/attributes/" --seed 682294124

  test/Main.hs:68:36: 
  4) hexml tests "<test id='bob'>here<extra/>there</test>"
       expected: True
        but got: False

  To rerun use: --match "/hexml tests/\"<test id='bob'>here<extra/>there</test>\"/" --seed 682294124

  test/Main.hs:68:36: 
  5) hexml tests "<test /><close />"
       expected: True
        but got: False

  To rerun use: --match "/hexml tests/\"<test /><close />\"/" --seed 682294124

  test/Main.hs:68:36: 
  6) hexml tests "<test /><!-- comment > --><close />"
       expected: True
        but got: False

  To rerun use: --match "/hexml tests/\"<test /><!-- comment > --><close />\"/" --seed 682294124

  test/Main.hs:68:36: 
  7) hexml tests "<test id=\"bob value\" another-attr=\"test with <\">here </test> more text at the end<close />"
       expected: True
        but got: False

  To rerun use: --match "/hexml tests/\"<test id=\\\"bob value\\\" another-attr=\\\"test with <\\\">here </test> more text at the end<close />\"/" --seed 682294124

  test/Main.hs:68:36: 
  8) hexml tests "<a numeric1=\"attribute\"/>"
       expected: True
        but got: False

  To rerun use: --match "/hexml tests/\"<a numeric1=\\\"attribute\\\"/>\"/" --seed 682294124

  test/Main.hs:83:26: 
  9) hexml tests namespaces
       expected: True
        but got: False

  To rerun use: --match "/hexml tests/namespaces/" --seed 682294124

  test/Main.hs:183:22: 
  10) robust XML tests children test
       uncaught exception: ErrorCall
       XenoParseError {inputIndex = 11, message = "Expected =, got:   at character index: 11"}
       CallStack (from HasCallStack):
         error, called at test/Main.hs:183:22 in main:Main

  To rerun use: --match "/robust XML tests/children test/" --seed 682294124

  test/Main.hs:183:22: 
  11) robust XML tests attributes
       uncaught exception: ErrorCall
       XenoParseError {inputIndex = 11, message = "Expected =, got:   at character index: 11"}
       CallStack (from HasCallStack):
         error, called at test/Main.hs:183:22 in main:Main

  To rerun use: --match "/robust XML tests/attributes/" --seed 682294124

  test/Main.hs:116:38: 
  12) robust XML tests, hexml tests, "<test id='bob'>here<extra/>there</test>"
       expected: True
        but got: False

  To rerun use: --match "/robust XML tests/hexml tests/\"<test id='bob'>here<extra/>there</test>\"/" --seed 682294124

  test/Main.hs:116:38: 
  13) robust XML tests, hexml tests, "<test /><close />"
       expected: True
        but got: False

  To rerun use: --match "/robust XML tests/hexml tests/\"<test /><close />\"/" --seed 682294124

  test/Main.hs:116:38: 
  14) robust XML tests, hexml tests, "<test /><!-- comment > --><close />"
       expected: True
        but got: False

  To rerun use: --match "/robust XML tests/hexml tests/\"<test /><!-- comment > --><close />\"/" --seed 682294124

  test/Main.hs:116:38: 
  15) robust XML tests, hexml tests, "<test id=\"bob value\" another-attr=\"test with <\">here </test> more text at the end<close />"
       expected: True
        but got: False

  To rerun use: --match "/robust XML tests/hexml tests/\"<test id=\\\"bob value\\\" another-attr=\\\"test with <\\\">here </test> more text at the end<close />\"/" --seed 682294124

  test/Main.hs:116:38: 
  16) robust XML tests, hexml tests, "<a numeric1=\"attribute\"/>"
       expected: True
        but got: False

  To rerun use: --match "/robust XML tests/hexml tests/\"<a numeric1=\\\"attribute\\\"/>\"/" --seed 682294124

  test/Main.hs:126:28: 
  17) robust XML tests, hexml tests, namespaces
       expected: True
        but got: False

  To rerun use: --match "/robust XML tests/hexml tests/namespaces/" --seed 682294124

  test/Main.hs:183:22: 
  18) robust XML tests recovers unclosed tag
       uncaught exception: ErrorCall
       XenoParseError {inputIndex = 2, message = "Expected =, got:   at character index: 2"}
       CallStack (from HasCallStack):
         error, called at test/Main.hs:183:22 in main:Main

  To rerun use: --match "/robust XML tests/recovers unclosed tag/" --seed 682294124

Randomized with seed 682294124

Finished in 0.0821 seconds
45 examples, 18 failures
Test suite xeno-test: FAIL
Test suite logged to: dist-ghc/test/xeno-0.6-xeno-test.log
0 of 1 test suites (0 of 1 test cases) passed.

This compile warning looks possibly relevant:

[4 of 7] Compiling Xeno.SAX         ( src/Xeno/SAX.hs, dist-ghc/build/Xeno/SAX.o, dist-ghc/build/Xeno/SAX.dyn_o )

src/Xeno/SAX.hs:405:24: warning: [GHC-97441] [-Woverflowed-literals]
    Literal 4294977024 is out of the Int range -2147483648..2147483647
    |
405 | isSpaceChar = testBit (0b100000000000000000010011000000000 :: Int) . fromIntegral
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions