Eric Blake wrote: > According to Jim Meyering on 9/10/2009 6:24 AM: >> >> Currently, we're at gnulib (v0.0-2549-g2c90f1a) for the submodule. >> None of the patches since then seemed to be essential to coreutils >> on non-mingw/cygwin systems. Let me know if you'd like to use >> a newer version. > > Updating to v0.0-2560-g7a3196b would allow working around a Solaris 10 bug > where link("a","b/") succeeds and creates a file "b", rather than failing > because the directory "b/" does not exist. This fixes behavior visible in > "ln -T a b/".
That's tempting. I've confirmed the problem, and wrote a test to exercise the bug/fix. I'm testing this now... >From 44c8a83eebf52a523ada123dab826e7955523490 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyer...@redhat.com> Date: Thu, 10 Sep 2009 16:48:05 +0200 Subject: [PATCH] tests: test for Solaris 10 link-related work-around * tests/ln/slash-decorated-nonexistent-dest: New test. * tests/Makefile.am (TESTS): Add it. --- tests/Makefile.am | 1 + tests/ln/slash-decorated-nonexistent-dest | 34 +++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 0 deletions(-) create mode 100755 tests/ln/slash-decorated-nonexistent-dest diff --git a/tests/Makefile.am b/tests/Makefile.am index 1de53bf..7a20e0c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -345,6 +345,7 @@ TESTS = \ ln/hard-backup \ ln/misc \ ln/sf-1 \ + ln/slash-decorated-nonexistent-dest \ ln/target-1 \ ls/abmon-align \ ls/color-clear-to-eol \ diff --git a/tests/ln/slash-decorated-nonexistent-dest b/tests/ln/slash-decorated-nonexistent-dest new file mode 100755 index 0000000..afbbd06 --- /dev/null +++ b/tests/ln/slash-decorated-nonexistent-dest @@ -0,0 +1,34 @@ +#!/bin/sh +# ensure that touch f; ln -T f no-such-file/ does not mistakenly succeed + +# Copyright (C) 2009 Free Software Foundation, Inc. + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +if test "$VERBOSE" = yes; then + set -x + ln --version +fi + +. $srcdir/test-lib.sh + +touch f || framework_failure + +fail=0 + +# Before coreutils-7.6, this would mistakenly create the file on Solaris 10 +ln -T f no-such-file/ && fail=1 +test -e no-such-file && fail=1 + +Exit $fail -- 1.6.5.rc0.164.g5f6b0