GNU bug report logs - #6768
ls: fix a test failure that should have been skipped

Previous Next

Package: coreutils;

Reported by: dsh <at> linux.ucla.edu

Date: Sat, 31 Jul 2010 14:35:02 UTC

Severity: normal

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6768 in the body.
You can then email your comments to 6768 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#6768; Package coreutils. (Sat, 31 Jul 2010 14:35:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to dsh <at> linux.ucla.edu:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Sat, 31 Jul 2010 14:35:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: dsh <at> linux.ucla.edu
To: bug-coreutils <at> gnu.org
Subject: ls: fix a test failure that should have been skipped
Date: Fri, 30 Jul 2010 18:49:02 -0700
Hi,

I just ran into this one test failure while building the latest sources.  The
test didn't really fail, but the exit via the function invoked in $() doesn't
terminate the test script, it simply terminates the substitution command.

Here are the bits where it failed:

++ inode_via_readdir /home/dsh/.gvfs
++ mount_point=/home/dsh/.gvfs
+++ basename /home/dsh/.gvfs
++ base=.gvfs
++ case $base in
++ skip_test_ 'mount point component starts with "."'
...
++ exit 77
+ readdir_inode=
++ env stat --format=%i /home/dsh/.gvfs
+ stat_inode=1
+ case $stat_inode in
+ test '' = 1
+ fail=1

This simple patch checks for a skipped test status and continues to the next
test.

From d76e0dbf81798e209ad958fa9582c975452b36ab Mon Sep 17 00:00:00 2001
From: Dan Hipschman <dsh <at> linux.ucla.edu>
Date: Fri, 30 Jul 2010 18:33:33 -0700
Subject: [PATCH] ls: fix a test failure that should have been skipped

* tests/ls/readdir-mountpoint-inode: Check to see if skip_test_ is
called in a helper function via $() instead of mistakenly failing.
---
 tests/ls/readdir-mountpoint-inode |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/tests/ls/readdir-mountpoint-inode b/tests/ls/readdir-mountpoint-inode
index 2285e92..63378b6 100755
--- a/tests/ls/readdir-mountpoint-inode
+++ b/tests/ls/readdir-mountpoint-inode
@@ -64,6 +64,7 @@ inode_via_readdir()
 
 for dir in $mount_points; do
   readdir_inode=$(inode_via_readdir $dir)
+  test $? = 77 && continue
   stat_inode=$(env stat --format=%i $dir)
   # If stat fails or says the inode is 0, skip $dir.
   case $stat_inode in 0|'') continue;; esac
-- 
1.7.1





Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#6768; Package coreutils. (Mon, 09 Aug 2010 14:56:03 GMT) Full text and rfc822 format available.

Message #8 received at 6768 <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: 6768 <at> debbugs.gnu.org
Subject: Re: bug#6768: ls: fix a test failure that should have been skipped
Date: Mon, 09 Aug 2010 08:54:44 -0600
[Message part 1 (text/plain, inline)]
On 07/30/2010 07:49 PM, dsh <at> linux.ucla.edu wrote:
> Hi,
> 
> I just ran into this one test failure while building the latest sources.  The
> test didn't really fail, but the exit via the function invoked in $() doesn't
> terminate the test script, it simply terminates the substitution command.
> 
> Here are the bits where it failed:
> 
> ++ case $base in
> ++ skip_test_ 'mount point component starts with "."'
> ...
> ++ exit 77
> + readdir_inode=
> ++ env stat --format=%i /home/dsh/.gvfs

Thanks; applied.

> Subject: [PATCH] ls: fix a test failure that should have been skipped
> 
> * tests/ls/readdir-mountpoint-inode: Check to see if skip_test_ is
> called in a helper function via $() instead of mistakenly failing.

>  for dir in $mount_points; do
>    readdir_inode=$(inode_via_readdir $dir)
> +  test $? = 77 && continue

-- 
Eric Blake   eblake <at> redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]

Reply sent to Jim Meyering <jim <at> meyering.net>:
You have taken responsibility. (Sun, 07 Aug 2011 15:41:04 GMT) Full text and rfc822 format available.

Notification sent to dsh <at> linux.ucla.edu:
bug acknowledged by developer. (Sun, 07 Aug 2011 15:41:05 GMT) Full text and rfc822 format available.

Message #13 received at 6768-done <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: Eric Blake <eblake <at> redhat.com>
Cc: 6768-done <at> debbugs.gnu.org
Subject: Re: bug#6768: ls: fix a test failure that should have been skipped
Date: Sun, 07 Aug 2011 17:38:59 +0200
Eric Blake wrote:

> On 07/30/2010 07:49 PM, dsh <at> linux.ucla.edu wrote:
>> Hi,
>>
>> I just ran into this one test failure while building the latest sources.  The
>> test didn't really fail, but the exit via the function invoked in $() doesn't
>> terminate the test script, it simply terminates the substitution command.
>>
>> Here are the bits where it failed:
>>
>> ++ case $base in
>> ++ skip_test_ 'mount point component starts with "."'
>> ...
>> ++ exit 77
>> + readdir_inode=
>> ++ env stat --format=%i /home/dsh/.gvfs
>
> Thanks; applied.
>
>> Subject: [PATCH] ls: fix a test failure that should have been skipped

Thanks.
Closing this issue.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 05 Sep 2011 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 8 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.