crypto/x509: skip TestReadUniqueDirectoryEntries if symlinks unsupported

Test TestReadUniqueDirectoryEntries requires symbolic links, which
are not supported on all platforms. Use testenv.MustHaveSymlink to
skip the test on those platforms.

Fixes #79516

Change-Id: Iea650022c985c396af6653e3391173cb17bcee20
Reviewed-on: https://go-review.googlesource.com/c/go/+/779642
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
This commit is contained in:
Richard Miller 2026-05-20 08:51:42 +01:00 committed by Gopher Robot
parent 7eeacc9cce
commit a40c232e81

View file

@ -320,6 +320,7 @@ func TestLoadSystemCertsLoadColonSeparatedDirs(t *testing.T) {
}
func TestReadUniqueDirectoryEntries(t *testing.T) {
testenv.MustHaveSymlink(t)
baseTmpDir := t.TempDir()
path := func(base string) string { return filepath.Join(baseTmpDir, base) }
if f, err := os.Create(path("file")); err != nil {