|
From: | Pádraig Brady |
Subject: | Re: coreutils-8.3: test failed: ls/stat-dtype and touch/no-dereference |
Date: | Fri, 08 Jan 2010 17:13:07 +0000 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 |
On 08/01/10 16:18, Eric Blake wrote:
According to Voelker, Bernhard on 1/8/2010 7:40 AM:FAIL: touch/no-dereference (exit: 1) ==================================== + grep '^#define HAVE_UTIMENSAT' /home/berny/depot/coreutils-8.3/lib/config.h + touch -h dangling touch: setting times of `dangling': Function not implementedThe test is assuming that because glibc declared utimensat, that it will work. But obviously it doesn't, because your kernel is too old. I don't know of any better way to filter out this test, other than to add logic that skips (rather than fails) if touch dies with ENOSYS.
Yes we should skip in this case, and there are probably lots of other tests that would need skipping on unsupported operations also. Detecting "unsupported" generally though may be tricky as I'm not sure can we depend on particular error numbers. Perhaps we could map the names using something like: not_supported() { errnos=$( echo "#include <errno.h>" | cpp -dD | grep -E "#define E(NOSYS|OPNOTSUPP|NOTSUP|NOTTY)" | tr -cd '[:digit:]\n' | tr '\n' '|' | sed 's/|*$//' ) eval "case $1 in $errnos) return 0 ;; esac" return 1 } Though that depends on cpp and errno.h being present, and is too hacky/slow. Probably a perl snippet using Errno is more appropriate. cheers, Pádraig.
[Prev in Thread] | Current Thread | [Next in Thread] |