]> Cypherpunks repositories - gostls13.git/commit
cmd/link: in TestFallocate, only check number of blocks on Darwin
authorCherry Mui <cherryyz@google.com>
Sat, 11 Oct 2025 14:36:49 +0000 (10:36 -0400)
committerCherry Mui <cherryyz@google.com>
Sat, 11 Oct 2025 15:51:54 +0000 (08:51 -0700)
commit8aa1efa223d7bd39faaabdfbf85882ed3942a6f4
tree376e81921e640d44f704255948690960a259eb56
parentb497a29d25b0f6f29bedaa92ac1d40a1ee5c0956
cmd/link: in TestFallocate, only check number of blocks on Darwin

The number-of-blocks check was introduced when fixing a Darwin-
specific bug. On Darwin, the file allocation syscall is a bit
tricky. On Linux and BSDs, it is more straightforward and unlikely
to go wrong.

The test itself, on the other hand, is less reliable on Linux (and
perhaps BSDs), as it is considered less portable and is an
implementation detail of the file system.

Given these two reasons, only check it on Darwin.

Fixes #75795.

Change-Id: I3da891fd60a141c3eca5d0f5ec20c2cad65b8862
Reviewed-on: https://go-review.googlesource.com/c/go/+/711095
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/link/internal/ld/fallocate_test.go