From: Pádraig Brady
Date: Fri, 31 Oct 2014 02:25:02 +0000 (+0000) Subject: tests: ln/hard-to-sym FAIL rather than ERROR when ln fails X-Git-Tag: v8.24~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1aa71d96332ec210a8c954cc924d43655f2b369f;p=thirdparty%2Fcoreutils.git tests: ln/hard-to-sym FAIL rather than ERROR when ln fails * tests/ln/hard-to-sym.sh: Only call framework_failure_ when ln returns success. --- diff --git a/tests/ln/hard-to-sym.sh b/tests/ln/hard-to-sym.sh index 1e507f4ef5..edcee6600c 100755 --- a/tests/ln/hard-to-sym.sh +++ b/tests/ln/hard-to-sym.sh @@ -29,24 +29,30 @@ ln -s -L -P symlink2 symlink3 || fail=1 # =================================================== # ensure that -L follows symlinks, and overrides -P -ln -P -L symlink3 hard-to-a || fail=1 -ls=$(ls -lG hard-to-a)x -case "$ls" in - *'hard-to-ax') ;; - *'hard-to-a -> '*x) fail=1 ;; - *) framework_failure_ ;; -esac +if ln -P -L symlink3 hard-to-a; then + ls=$(ls -lG hard-to-a)x + case "$ls" in + *'hard-to-ax') ;; + *'hard-to-a -> '*x) fail=1 ;; + *) framework_failure_ ;; + esac +else + fail=1 +fi # =================================================== # ensure that -P links (or at least duplicates) symlinks, and overrides -L -ln -L -P symlink3 hard-to-3 || fail=1 -ls=$(ls -lG hard-to-3)x -case "$ls" in - *'hard-to-3 -> symlink2x') ;; - *'hard-to-3x') fail=1 ;; - *'hard-to-3 -> '*x) fail=1 ;; - *) framework_failure_ ;; -esac +if ln -L -P symlink3 hard-to-3; then + ls=$(ls -lG hard-to-3)x + case "$ls" in + *'hard-to-3 -> symlink2x') ;; + *'hard-to-3x') fail=1 ;; + *'hard-to-3 -> '*x) fail=1 ;; + *) framework_failure_ ;; + esac +else + fail=1 +fi # =================================================== # Create a hard link to a dangling symlink.