Skip to content

std lib tests failing on arm 32-bit #3289

Closed

Description

@andrewrk
316/1221 fmt.parse_float.test "std-arm-linux-none-Debug-bare-multi fmt.parseFloat"...qemu: uncaught target signal 4 (Illegal instruction) - core dumped

Tests failed. Use the following command to reproduce the failure:
/home/andy/dev/zig/zig-cache/o/IeIFkTyM_4eX5VwOLuC_6kygDea91Ir46YZKjmfvWuSFFvebBdbDgTjao_Q1X2Hi/test
The following command exited with error code 255:
/home/andy/dev/zig/build/zig test /home/andy/dev/zig/std/std.zig --test-name-prefix std-arm-linux-none-Debug-bare-multi  --cache-dir /home/andy/dev/zig/zig-cache --name test -target armv8_5a-linux-none --test-cmd qemu-arm --test-cmd-bin --override-std-dir /home/andy/dev/zig/std 

Activity

  1. added
    bug
    contributor friendly
    standard library
    arch-arm
    on Sep 22, 2019
  2. added this to the 0.6.0 milestone on Sep 22, 2019
  3. LemonBoy commented on Sep 22, 2019

    @LemonBoy
    Contributor

    Cannot reproduce locally, the std test suite completes successfully.

  4. added a commit that references this issue on Sep 22, 2019
  5. andrewrk commented on Sep 25, 2019

    @andrewrk
    MemberAuthor

    Cannot reproduce locally, the std test suite completes successfully.

    Just double checking, you removed the if here and tried it?

    zig/std/fmt/parse_float.zig

    Lines 385 to 388 in dc3c419

    if (@import("builtin").arch == .arm) {
    // TODO https://github.com/ziglang/zig/issues/3289
    return error.SkipZigTest;
    }

  6. andrewrk commented on Sep 25, 2019

    @andrewrk
    MemberAuthor

    Another issue, I suspect we have a problem with compiler-rt when hard-float enabled:

    52/1227 fmt.test "std-arm-linux-musleabihf-Debug-c-multi filesize"...integer part of floating point value out of bounds
    /home/andy/dev/zig/std/math/pow.zig:148:13: 0x4f5c47 in math.pow.pow (test)
        var i = @floatToInt(@IntType(true, T.bit_count), yi);
                ^
    /home/andy/dev/zig/std/fmt.zig:820:55: 0x4e9053 in fmt.formatBytes (test)
        const new_value = lossyCast(f64, value) / math.pow(f64, lossyCast(f64, radix), lossyCast(f64, magnitude));
                                                          ^
    /home/andy/dev/zig/std/fmt.zig:439:27: 0x2b5af3 in fmt.formatValue (test)
            return formatBytes(value, options, 1024, context, Errors, output);
                              ^
    /home/andy/dev/zig/std/fmt.zig:295:31: 0x22f4a3 in fmt.formatType (test)
                return formatValue(value, fmt, options, context, Errors, output);
                                  ^
    /home/andy/dev/zig/std/fmt.zig:164:35: 0x22f3d7 in fmt.format (test)
                        try formatType(
                                      ^
    /home/andy/dev/zig/std/fmt.zig:1065:15: 0x22f217 in fmt.bufPrint (test)
        try format(&context, error{BufferTooSmall}, bufPrintWrite, fmt, args);
                  ^
    /home/andy/dev/zig/std/fmt.zig:1468:32: 0x1b00ab in fmt.testFmt (test)
        const result = try bufPrint(buf[0..], template, args);
                                   ^
    /home/andy/dev/zig/std/fmt.zig:1236:16: 0xd4567 in fmt.test "std-arm-linux-musleabihf-Debug-c-multi filesize" (test)
        try testFmt("file size: 63MiB\n", "file size: {Bi}\n", usize(63 * 1024 * 1024));
                   ^
    /home/andy/dev/zig/std/special/test_runner.zig:13:25: 0x7b3f33 in std.special.main (test)
            if (test_fn.func()) |_| {
                            ^
    /home/andy/dev/zig/std/special/start.zig:189:37: 0x7b3ceb in std.special.main (test)
                const result = root.main() catch |err| {
    
    
    755/1227 math.pow.test "std-arm-linux-musleabihf-Debug-c-multimath.pow"...integer part of floating point value out of bounds
    /home/andy/dev/zig/std/math/pow.zig:148:13: 0x5695eb in math.pow.pow (test)
        var i = @floatToInt(@IntType(true, T.bit_count), yi);
                ^
    /home/andy/dev/zig/std/math/pow.zig:197:34: 0x16a44b in math.pow.test "std-arm-linux-musleabihf-Debug-c-multimath.pow" (test)
        expect(math.approxEq(f64, pow(f64, 0.8923, 3.3), 0.686572, epsilon));
                                     ^
    /home/andy/dev/zig/std/special/test_runner.zig:13:25: 0x744fd3 in std.special.main (test)
            if (test_fn.func()) |_| {
                            ^
    /home/andy/dev/zig/std/special/start.zig:189:37: 0x74455b in std.special.posixCallMainAndExit (test)
                const result = root.main() catch |err| {
                                        ^
    /home/andy/dev/zig/std/special/start.zig:87:5: 0x74440b in std.special._start (test)
        @noInlineCall(posixCallMainAndExit);
        ^
    

    I'm disabling a lot of the math tests for armv8-linux-musleabihf.

  7. SamTebbs33 commented on Oct 1, 2019

    @SamTebbs33
    Contributor

    The parseFloat failure is fixed and the math and filesize tests are still failing. Command used: zig test lib/std/std.zig -target armv8_5a-linux-musleabihf --test-cmd qemu-arm --test-cmd-bin --override-lib-dir lib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    arch-armbugcontributor friendlystandard library

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions