[llvm] [llvm-ar] Enable failed testacase on FreeBSD (PR #192612)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 18 20:39:11 PDT 2026
https://github.com/aokblast updated https://github.com/llvm/llvm-project/pull/192612
>From b58a2f178cd612afea0cde401665a2fa347574ad Mon Sep 17 00:00:00 2001
From: ShengYi Hung <aokblast at FreeBSD.org>
Date: Fri, 17 Apr 2026 16:34:04 +0800
Subject: [PATCH] [llvm-ar] Enable failed testacase on FreeBSD
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
FreeBSD used to allow the read system call on directory file descriptors
(dirfd). In those cases, it returned the internal file data structure
instead of failing. This caused the llvm-ar test— which expects a
failure when attempting to read a directory— to pass incorrectly.
This behavior existed for compatibility with older Unix implementations,
but it was removed in commit dcef4f65ae3978c50eab745f67364db4660a9f43.
The change applies to FreeBSD 13 and later. Since FreeBSD 12 has also
reached end-of-life, the outdated behavior is no longer relevant.
As a result, the test now behaves as intended and can be safely
re-enabled.
---
llvm/test/tools/llvm-ar/error-opening-directory.test | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/llvm/test/tools/llvm-ar/error-opening-directory.test b/llvm/test/tools/llvm-ar/error-opening-directory.test
index a11600c2bb5a4..776ed08eeb7bb 100644
--- a/llvm/test/tools/llvm-ar/error-opening-directory.test
+++ b/llvm/test/tools/llvm-ar/error-opening-directory.test
@@ -1,6 +1,5 @@
-## Unsupported on AIX and FreeBSD as AIX and FreeBSD 12 and earlier allow
-## reading directories by default.
-# UNSUPPORTED: system-freebsd, system-aix
+## Unsupported on AIX as AIX allow reading directories by default.
+# UNSUPPORTED: system-aix
# RUN: rm -rf %t && mkdir -p %t
More information about the llvm-commits
mailing list