Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failed on OpenBSD for vlib/os/os_stat_test.v #22123

Closed
lcheylus opened this issue Aug 28, 2024 · 3 comments · Fixed by #22124
Closed

Test failed on OpenBSD for vlib/os/os_stat_test.v #22123

lcheylus opened this issue Aug 28, 2024 · 3 comments · Fixed by #22124
Labels
Bug This tag is applied to issues which reports bugs.

Comments

@lcheylus
Copy link
Contributor

lcheylus commented Aug 28, 2024

Describe the bug

With the latest version ov V on OpenBSD current/amd64 (future version 7.6), tests failed for vlib/os/os_stat_test.v.

Reproduction Steps

  • Build V on OpenBSD current/amd64 with clang
  • Run tests for vlib/os/os_stat_test.v: ./v test vlib/os/os_stat_test.v

Expected Behavior

No error when running tests for vlib/os/os_stat_test.v

Current Behavior

Error when running tests for vlib/os/os_stat_test.v:

./v test vlib/os/os_stat_test.v
---- Testing... ----
 FAIL     7.932 ms vlib/os/os_stat_test.v
         retry: 1
      comp_cmd: '/home/fox/dev/vlang.git/v' -skip-running   -o '/tmp/v_1000/tsession_54077d236f8_01J6BWGGSW5RFWPYYZ2Y7H3SE3/0_0/os_stat_test' '/home/fox/dev/vlang.git/vlib/os/os_stat_test.v'
       run_cmd: '/tmp/v_1000/tsession_54077d236f8_01J6BWGGSW5RFWPYYZ2Y7H3SE3/0_0/os_stat_test'
failure code: 1; foutput.len: 706; failure output:
---------------------------------------------------------------------------------------------------- retry: 0 ; max_retry: 0 ; r.exit_code: 1 ; trimmed_output.len: 538
/home/fox/dev/vlang.git/vlib/os/os_stat_test.v:24, main.test_stat
 |  start_time: 1724828370
 |    end_time: 1724828372
 | fstat.ctime: 1724828372
 | fstat.mtime: 1724828372
/home/fox/dev/vlang.git/vlib/os/os_stat_test.v:60: ✗ fn test_stat
   > assert fstat.rdev == dstat.rdev, 'File and directory should have same device ID'
     Left value: 1247457
    Right value: 1247456
        Message: File and directory should have same device ID
----
Failed command 1:    '/home/fox/dev/vlang.git/v' -skip-running   -o '/tmp/v_1000/tsession_54077d236f8_01J6BWGGSW5RFWPYYZ2Y7H3SE3/0_0/os_stat_test' '/home/fox/dev/vlang.git/vlib/os/os_stat_test.v'
Summary for all V _test.v files: 1 failed, 1 total. Elapsed time: 2611 ms, on 1 job. Comptime: 2565 ms. Runtime: 7 ms.

Possible Solution

In vlib/os/os_stat_test.v, line 58, add an exception for OpenBSD (Conditionnal compilation for OS), same as for FreeBSD: $if !freebsd && !openbsd

I will post a PR ASAP to fix this issue.

V version

V 0.4.7 1085f45

Environment details (OS name and version, etc.)

V full version: V 0.4.7 7baff15
OS: openbsd, 7.6, GENERIC.MP#279
Processor: 2 cpus, 64bit, little endian

getwd: /home/fox/dev/vlang.git
vexe: /home/fox/dev/vlang.git/v
vexe mtime: 2024-08-27 13:57:26

vroot: OK, value: /home/fox/dev/vlang.git
VMODULES: OK, value: /home/fox/.vmodules
VTMP: OK, value: /tmp/v_1000

Git version: git version 2.46.0
Git vroot status: weekly.2024.34-49-g05c7aa2c-dirty
.git/config present: true

CC version: OpenBSD clang version 16.0.6
thirdparty/tcc status: thirdparty-unknown-unknown de82a13

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

@lcheylus lcheylus added the Bug This tag is applied to issues which reports bugs. label Aug 28, 2024
lcheylus added a commit to lcheylus/v that referenced this issue Aug 28, 2024
@spytheman
Copy link
Member

@internet-person are you ok?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
@spytheman @lcheylus and others