bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

possible patch for coreutils-7.2 tests/mv/i-3 test failure


From: John Stanley
Subject: possible patch for coreutils-7.2 tests/mv/i-3 test failure
Date: Sat, 11 Apr 2009 01:51:31 -0400
User-agent: Thunderbird 2.0.0.21 (X11/20090302)

Hi,
I just attempted to build coreutils-7.2 (GNU/Linux i686, linux-2.6.29.1) for my home linux system(s) and found 1 test failure (tests/mv/i-3) which did not occur in version 7.1 because the test was skipped (line 29: skip_test_ FIXME: skip, until portability of trap ... TTIN is assured). In version 7.2 the test is not skipped but line 38:

mv f g < /dev/stdin > out 2>&1 & pid=$!

gives the error: /dev/stdin: Permission denied

and line 40:

kill $pid

gives the error: kill: ($pid) - No such process

$pid being the process id from line 38.

Below is a diff which appears to resolve the problem. I was wondering if anyone else has come across this issue, and if the patch below is an acceptable solution.

thanks much,
John

*** coreutils-7.2.orig/tests/mv/i-3     2009-03-12 05:23:47.000000000 -0400
--- coreutils-7.2/tests/mv/i-3  2009-04-10 22:08:12.158696490 -0400
***************
*** 35,43 ****
 ls /dev/stdin >/dev/null 2>&1 \
   || skip_test_ 'there is no /dev/stdin file'

! mv f g < /dev/stdin > out 2>&1 & pid=$!
 sleep 1
! kill $pid

 # Make sure out contains the prompt.
 case "`cat out`" in
--- 35,58 ----
 ls /dev/stdin >/dev/null 2>&1 \
   || skip_test_ 'there is no /dev/stdin file'

! # A non-privileged user may not have read permission on /dev/stdin
! # (giving error: /dev/stdin: Permission denied), so use a "dummy"
! # file here instead; also, modify "mv" to "mv -i" to get desired
! # prompt:
!
! #mv f g < /dev/stdin > out 2>&1 & pid=$!
!
! touch dummy
! mv -i f g < dummy > out 2>&1 & pid=$!
! rm -f dummy
!
! # Not sure why the "sleep" and "kill" are needed here, as the
! # pid is gone at this point whenever I run the test (giving
! # error: kill: ($pid) - No such process); so redirect "kill"
! # error output:
!
 sleep 1
! kill $pid >/dev/null 2>&1

 # Make sure out contains the prompt.
 case "`cat out`" in









reply via email to

[Prev in Thread] Current Thread [Next in Thread]