Skip to content

Commit

Permalink
os: don't check rdev equality on FreeBSD, inside vlib/os/os_stat_test…
Browse files Browse the repository at this point in the history
….v (#20885)
  • Loading branch information
kimshrier committed Feb 22, 2024
1 parent 667f65b commit 10c2f9e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion vlib/os/os_stat_test.v
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,11 @@ fn test_stat() {
dstat := os.stat(temp_dir)!
assert dstat.get_filetype() == .directory
assert fstat.dev == dstat.dev, 'File and directory should be created on same device'
assert fstat.rdev == dstat.rdev, 'File and directory should have same device ID'
$if !freebsd {
assert fstat.rdev == dstat.rdev, 'File and directory should have same device ID'
} $else {
// On FreeBSD, the rdev values are not necessarily the same for non-devices
// such as regular files and directories.
assert fstat.rdev != dstat.rdev, 'File and directory should not have same device ID'
}
}

0 comments on commit 10c2f9e

Please sign in to comment.