From c7398c508d7e0222c1d7a74c14d93b23bf57fe05 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sat, 18 May 2024 17:34:09 -0700 Subject: [PATCH] dup3: Update documentation and expected test results. * doc/glibc-functions/dup3.texi: Mention NetBSD bug fixed by the Gnulib implementation after the previous commit. * modules/dup3-tests (Depends-on): Remove test-xfail. (Makefile.am): Don't expect test-dup3 to fail on NetBSD. --- ChangeLog | 6 ++++++ doc/glibc-functions/dup3.texi | 5 +++++ modules/dup3-tests | 5 ----- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 71a111ee7d..fc2c42283c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-05-18 Collin Funk + dup3: Update documentation and expected test results. + * doc/glibc-functions/dup3.texi: Mention NetBSD bug fixed by the Gnulib + implementation after the previous commit. + * modules/dup3-tests (Depends-on): Remove test-xfail. + (Makefile.am): Don't expect test-dup3 to fail on NetBSD. + dup3: Fix behavior for equal file descriptors on NetBSD. * lib/dup3.c (dup3) [__NetBSD__]: Check for equal file descriptors upon a successful call to dup3. If they are equal fail with errno == EINVAL. diff --git a/doc/glibc-functions/dup3.texi b/doc/glibc-functions/dup3.texi index dfe47b4725..c04e6bd7a4 100644 --- a/doc/glibc-functions/dup3.texi +++ b/doc/glibc-functions/dup3.texi @@ -15,6 +15,11 @@ glibc 2.8, macOS 11.1, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5. @item This function can crash on some platforms: Cygwin 1.7.25. + +@item +This function mistakenly succeeds when given two equal file descriptors on some platforms: +@c https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=58266 +NetBSD 10.0. @end itemize Portability problems not fixed by Gnulib: diff --git a/modules/dup3-tests b/modules/dup3-tests index eff2e21307..7d52771730 100644 --- a/modules/dup3-tests +++ b/modules/dup3-tests @@ -8,14 +8,9 @@ getdtablesize msvc-nothrow open close -test-xfail configure.ac: Makefile.am: TESTS += test-dup3 check_PROGRAMS += test-dup3 - -if OS_IS_NETBSD -XFAIL_TESTS += test-dup3 -endif -- 2.39.5