GNU bug report logs - #8532
FAIL: cp/sparse-fiemap

Previous Next

Package: coreutils;

Reported by: dclarke <at> blastwave.org

Date: Thu, 21 Apr 2011 17:38:01 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 8532 in the body.
You can then email your comments to 8532 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#8532; Package coreutils. (Thu, 21 Apr 2011 17:38:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to dclarke <at> blastwave.org:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Thu, 21 Apr 2011 17:38:01 GMT) Full text and rfc822 format available.

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

From: Dennis Clarke <dclarke <at> blastwave.org>
To: bug-coreutils <at> gnu.org
Subject: FAIL: cp/sparse-fiemap
Date: Thu, 21 Apr 2011 13:30:10 -0400 (EDT)
FAIL: cp/sparse-fiemap

.
.
.

======================================
1 of 388 tests failed
(64 tests were not run)
See tests/test-suite.log
Please report to bug-coreutils <at> gnu.org
======================================


said file reports :


==============================================
   GNU coreutils 8.11: tests/test-suite.log
==============================================

1 of 388 tests failed.  (64 tests were not run).

.. contents:: :depth: 2

.
.
.

FAIL: cp/sparse-fiemap (exit: 1)
================================

++ initial_cwd_=/home/dclarke/build/coreutils-8.11.001/tests
++ fail=0
+++ testdir_prefix_
+++ printf gt
++ pfx_=gt
+++ mktempd_ /home/dclarke/build/coreutils-8.11.001/tests
gt-sparse-fiemap.XXXX
+++ case $# in
+++ destdir_=/home/dclarke/build/coreutils-8.11.001/tests
+++ template_=gt-sparse-fiemap.XXXX
+++ MAX_TRIES_=4
+++ case $destdir_ in
+++ case $template_ in
++++ unset TMPDIR
++++ mktemp -d -t -p /home/dclarke/build/coreutils-8.11.001/tests
gt-sparse-fiemap.XXXX
+++ d=/home/dclarke/build/coreutils-8.11.001/tests/gt-sparse-fiemap.FrbL
+++ case $d in
+++ test -d
/home/dclarke/build/coreutils-8.11.001/tests/gt-sparse-fiemap.FrbL
++++ tr S -
++++ ls -dgo
/home/dclarke/build/coreutils-8.11.001/tests/gt-sparse-fiemap.FrbL
+++ perms='drwx------ 2 4096 Apr 21 17:19
/home/dclarke/build/coreutils-8.11.001/tests/gt-sparse-fiemap.FrbL'
+++ case $perms in
+++ test 0 = 0
+++ echo /home/dclarke/build/coreutils-8.11.001/tests/gt-sparse-fiemap.FrbL
+++ return
++
test_dir_=/home/dclarke/build/coreutils-8.11.001/tests/gt-sparse-fiemap.FrbL
++ cd /home/dclarke/build/coreutils-8.11.001/tests/gt-sparse-fiemap.FrbL
++ gl_init_sh_nl_='
'
++ IFS='
'
++ for sig_ in 1 2 3 13 15
+++ expr 1 + 128
++ eval 'trap '\''Exit 129'\'' 1'
+++ trap 'Exit 129' 1
++ for sig_ in 1 2 3 13 15
+++ expr 2 + 128
++ eval 'trap '\''Exit 130'\'' 2'
+++ trap 'Exit 130' 2
++ for sig_ in 1 2 3 13 15
+++ expr 3 + 128
++ eval 'trap '\''Exit 131'\'' 3'
+++ trap 'Exit 131' 3
++ for sig_ in 1 2 3 13 15
+++ expr 13 + 128
++ eval 'trap '\''Exit 141'\'' 13'
+++ trap 'Exit 141' 13
++ for sig_ in 1 2 3 13 15
+++ expr 15 + 128
++ eval 'trap '\''Exit 143'\'' 15'
+++ trap 'Exit 143' 15
++ trap remove_tmp_ 0
+ path_prepend_ ../src
+ test 1 '!=' 0
+ path_dir_=../src
+ case $path_dir_ in
++ cd /home/dclarke/build/coreutils-8.11.001/tests/../src
++ echo /home/dclarke/build/coreutils-8.11.001/src
+ abs_path_dir_=/home/dclarke/build/coreutils-8.11.001/src
+ case $abs_path_dir_ in
+
PATH=/home/dclarke/build/coreutils-8.11.001/src:/home/dclarke/build/coreutils-8.11.001/src:/usr/local/bin:/usr/bin:/sbin:/bin:/usr/sbin:/opt/schily/bin
+ create_exe_shims_ /home/dclarke/build/coreutils-8.11.001/src
+ case $EXEEXT in
+ return 0
+ shift
+ test 0 '!=' 0
+ export PATH
+ print_ver_ cp
+ test yes = yes
+ local i
+ for i in '$*'
+ env cp --version
cp (GNU coreutils) 8.11
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Torbj"orn Granlund, David MacKenzie, and Jim Meyering.
+ perl -e 1
+ touch fiemap_chk
+ fiemap_capable_ fiemap_chk
+ python
+ python /home/dclarke/build/coreutils-8.11.001/tests/fiemap-capable
fiemap_chk
+ df -t ext3 .
df: no file systems processed
+ :
++ seq 1 2 21
+ for i in '$(seq 1 2 21)'
+ for j in 1 2 31 100
+ perl -e 'BEGIN { $n = 1 * 1024; *F = *STDOUT }' -e 'for (1..1) { sysseek
(*F, $n, 1)' -e '&& syswrite (*F, chr($_)x$n) or die "$!"}'
+ cp --sparse=always j1 j2
+ cmp j1 j2
+ grep -F extent
+ filefrag -vs j1
+ filefrag -v j1
+ filefrag -vs j2
+ perl /home/dclarke/build/coreutils-8.11.001/tests/filefrag-extent-compare
+ f ff1
+ awk '/^ *[0-9]/ {printf "%d %d ", $2 ,NF < 5 ? $NF : $5 } END {print ""}'
awk: cmd. line:1: /^ *[0-9]/ {printf "%d %d ", $2 ,NF < 5 ? $NF : $5 } END
{print ""}
awk: cmd. line:1:                                     ^ syntax error
+ sed 's/ [a-z,][a-z,]*$//' ff1
+ f ff2
+ awk '/^ *[0-9]/ {printf "%d %d ", $2 ,NF < 5 ? $NF : $5 } END {print ""}'
+ sed 's/ [a-z,][a-z,]*$//' ff2
awk: cmd. line:1: /^ *[0-9]/ {printf "%d %d ", $2 ,NF < 5 ? $NF : $5 } END
{print ""}
awk: cmd. line:1:                                     ^ syntax error
filefrag-extent-compare: expected exactly two input lines; got 0
+ fail=1
+ test 1 = 1
+ break 2
+ Exit 1
+ set +e
+ exit 1
+ exit 1
+ remove_tmp_
+ __st=1
+ cleanup_
+ :
+ cd /home/dclarke/build/coreutils-8.11.001/tests
+ chmod -R u+rwx
/home/dclarke/build/coreutils-8.11.001/tests/gt-sparse-fiemap.FrbL
+ rm -rf /home/dclarke/build/coreutils-8.11.001/tests/gt-sparse-fiemap.FrbL
+ exit 1


-- 
Dennis Clarke
dclarke <at> opensolaris.ca  <- Email related to the open source Solaris
dclarke <at> blastwave.org   <- Email related to open source for Solaris






Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#8532; Package coreutils. (Thu, 21 Apr 2011 18:50:03 GMT) Full text and rfc822 format available.

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

From: Jim Meyering <jim <at> meyering.net>
To: dclarke <at> blastwave.org
Cc: 8532 <at> debbugs.gnu.org
Subject: Re: bug#8532: FAIL: cp/sparse-fiemap
Date: Thu, 21 Apr 2011 20:49:00 +0200
Dennis Clarke wrote:
> FAIL: cp/sparse-fiemap
...
> + awk '/^ *[0-9]/ {printf "%d %d ", $2 ,NF < 5 ? $NF : $5 } END {print ""}'
> awk: cmd. line:1: /^ *[0-9]/ {printf "%d %d ", $2 ,NF < 5 ? $NF : $5 } END
> {print ""}
> awk: cmd. line:1:                                     ^ syntax error
> + sed 's/ [a-z,][a-z,]*$//' ff1

Thank you for the report.
What awk program and version are you using?
I.e., awk --version might help.
Also, what distribution are you using?

BTW, that syntax works for me using the latest gawk with or without -W compat,
and with the mawk and nawk programs from debian unstable.




Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#8532; Package coreutils. (Thu, 21 Apr 2011 20:13:02 GMT) Full text and rfc822 format available.

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

From: Dennis Clarke <dclarke <at> blastwave.org>
To: 8532 <at> debbugs.gnu.org
Subject: What awk program and version are you using?
Date: Thu, 21 Apr 2011 16:12:34 -0400 (EDT)
> Thank you for the report.
> What awk program and version are you using?

aster $ which awk
/usr/local/bin/awk
aster $ which gawk
/usr/local/bin/gawk
aster $
aster $ ls -lapin /usr/local/bin/awk /usr/local/bin/gawk
2796264 lrwxrwxrwx 1 16411 1002      4 Mar  3 01:48 /usr/local/bin/awk ->
gawk
2796230 -rwxrwxr-x 2 16411 1002 279270 Dec 26 18:54 /usr/local/bin/gawk

aster $ awk --version
GNU Awk 3.0.1
Copyright (C) 1989, 1991-1996 Free Software Foundation.

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 2 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, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
aster $


> Also, what distribution are you using?

aster $ cat /proc/version
Linux version 2.6.32-5-amd64 (Debian 2.6.32-31) (ben <at> decadent.org.uk) (gcc
version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Mon Mar 7 21:35:22 UTC 2011

Debian Linux stable ( squeeze ) on Sun Ultra 20 workstation hardware, 8G
memory and the usual bits.

Let me know if I can help in any way on this.

-- 
Dennis Clarke
dclarke <at> opensolaris.ca  <- Email related to the open source Solaris
dclarke <at> blastwave.org   <- Email related to open source for Solaris






Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#8532; Package coreutils. (Thu, 21 Apr 2011 20:44:02 GMT) Full text and rfc822 format available.

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

From: "Alan Curry" <pacman-cu <at> kosh.dhis.org>
To: jim <at> meyering.net (Jim Meyering)
Cc: 8532 <at> debbugs.gnu.org, dclarke <at> blastwave.org
Subject: Re: bug#8532: FAIL: cp/sparse-fiemap
Date: Thu, 21 Apr 2011 15:43:41 -0500 (GMT+5)
Jim Meyering writes:
> 
> Dennis Clarke wrote:
> > FAIL: cp/sparse-fiemap
> ...
> > + awk '/^ *[0-9]/ {printf "%d %d ", $2 ,NF < 5 ? $NF : $5 } END {print ""}'
> > awk: cmd. line:1: /^ *[0-9]/ {printf "%d %d ", $2 ,NF < 5 ? $NF : $5 } END
> > {print ""}
> > awk: cmd. line:1:                                     ^ syntax error
> > + sed 's/ [a-z,][a-z,]*$//' ff1
> 
> Thank you for the report.
> What awk program and version are you using?
> I.e., awk --version might help.
> Also, what distribution are you using?

I can't figure out what version he's using, but Mr. Kernighan's awk doesn't
like that syntax either. Notice that if you changed the '<' to a '>' it would
be an output redirection for the printf. Using the '<' as a comparison
operator in the same position is awfully fragile.

Parenthesizing the ternary expression makes it happy again.

> 
> BTW, that syntax works for me using the latest gawk with or without -W compat,
> and with the mawk and nawk programs from debian unstable.

apt-get install original-awk

-- 
Alan Curry




Reply sent to Jim Meyering <jim <at> meyering.net>:
You have taken responsibility. (Fri, 22 Apr 2011 09:16:02 GMT) Full text and rfc822 format available.

Notification sent to dclarke <at> blastwave.org:
bug acknowledged by developer. (Fri, 22 Apr 2011 09:16:02 GMT) Full text and rfc822 format available.

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

From: Jim Meyering <jim <at> meyering.net>
To: "Alan Curry" <pacman-cu <at> kosh.dhis.org>
Cc: 8532-done <at> debbugs.gnu.org, dclarke <at> blastwave.org
Subject: Re: bug#8532: FAIL: cp/sparse-fiemap
Date: Fri, 22 Apr 2011 11:15:06 +0200
Alan Curry wrote:
> Jim Meyering writes:
>>
>> Dennis Clarke wrote:
>> > FAIL: cp/sparse-fiemap
>> ...
>> > + awk '/^ *[0-9]/ {printf "%d %d ", $2 ,NF < 5 ? $NF : $5 } END {print ""}'
>> > awk: cmd. line:1: /^ *[0-9]/ {printf "%d %d ", $2 ,NF < 5 ? $NF : $5 } END
>> > {print ""}
>> > awk: cmd. line:1:                                     ^ syntax error
>> > + sed 's/ [a-z,][a-z,]*$//' ff1
>>
>> Thank you for the report.
>> What awk program and version are you using?
>> I.e., awk --version might help.
>> Also, what distribution are you using?
>
> I can't figure out what version he's using, but Mr. Kernighan's awk doesn't
> like that syntax either. Notice that if you changed the '<' to a '>' it would
> be an output redirection for the printf. Using the '<' as a comparison
> operator in the same position is awfully fragile.
>
> Parenthesizing the ternary expression makes it happy again.
>
>> BTW, that syntax works for me using the latest gawk with or without -W compat,
>> and with the mawk and nawk programs from debian unstable.
>
> apt-get install original-awk

Thanks.
This patch fixes it, and I've closed the ticket.

Alan, I'll wait for you to "ack" before pushing it,
since I've listed you as the author.

From 302cfcaeab531138d59e4835ef77020a750e71f9 Mon Sep 17 00:00:00 2001
From: Alan Curry <pacman-cu <at> kosh.dhis.org>
Date: Fri, 22 Apr 2011 11:08:50 +0200
Subject: [PATCH] tests: sparse-fiemap: adjust syntax to accommodate older awk

* tests/cp/sparse-fiemap: Parenthesize ternary expression used
as an argument to awk's printf.  Otherwise, gawk 3.0.1 and the
one from debian stable's original-awk would get a syntax error.
Reported by Dennis Clarke.

Copyright note: tiny change
---
 THANKS.in              |    1 +
 tests/cp/sparse-fiemap |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/THANKS.in b/THANKS.in
index bd8645f..342a52c 100644
--- a/THANKS.in
+++ b/THANKS.in
@@ -151,6 +151,7 @@ Deepak Goel                         deego <at> gnufans.org
 Denis Excoffier                     denis.excoffier <at> airbus.com
 Denis McKeon                        dmckeon <at> swcp.com
 Dennis Henriksen                    opus <at> flamingo.osrl.dk
+Dennis Clarke                       dclarke <at> blastwave.org
 Dennis Smit                         ds <at> nerds-incorporated.org
 Derek Clegg                         dclegg <at> next.com
 Dick Streefland                     dick_streefland <at> tasking.com
diff --git a/tests/cp/sparse-fiemap b/tests/cp/sparse-fiemap
index 1394060..64668ed 100755
--- a/tests/cp/sparse-fiemap
+++ b/tests/cp/sparse-fiemap
@@ -64,7 +64,7 @@ fi
 f()
 {
   sed 's/ [a-z,][a-z,]*$//' $@ \
-    | awk '/^ *[0-9]/ {printf "%d %d ", $2 ,NF < 5 ? $NF : $5 } END {print ""}'
+    | awk '/^ *[0-9]/ {printf "%d %d ", $2, (NF<5 ? $NF : $5) } END {print ""}'
 }

 for i in $(seq 1 2 21); do
--
1.7.5.rc3.291.g63e4e




Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#8532; Package coreutils. (Fri, 22 Apr 2011 09:44:01 GMT) Full text and rfc822 format available.

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

From: "Alan Curry" <pacman-cu <at> kosh.dhis.org>
To: jim <at> meyering.net (Jim Meyering)
Cc: 8532 <at> debbugs.gnu.org, dclarke <at> blastwave.org
Subject: Re: bug#8532: FAIL: cp/sparse-fiemap
Date: Fri, 22 Apr 2011 04:43:33 -0500 (GMT+5)
Jim Meyering writes:
> 
> Alan Curry wrote:
> >
> > Parenthesizing the ternary expression makes it happy again.
> >
> >> BTW, that syntax works for me using the latest gawk with or without -W c=
> ompat,
> >> and with the mawk and nawk programs from debian unstable.
> >
> > apt-get install original-awk
> 
> Thanks.
> This patch fixes it, and I've closed the ticket.
> 
> Alan, I'll wait for you to "ack" before pushing it,
> since I've listed you as the author.

Yeah, it looks right.

I looked over the POSIX grammar for awk and I believe it requires some
parentheses here, either around the whole ternary expression or around the
comparison part of it. The key is the difference between non_unary_expr and
non_unary_print_expr. The "print" version is in effect wherever a
redirection operator might appear, and it doesn't have any of the 6
comparison operators < = > <= >= !=

The ability to do a comparison (other than '>') without parentheses in
an argument to print is an extension. From a quick peek at the gawk
ChangeLog I'd guess that it happened here:

Sun Feb  2 15:32:42 2003  Stepan Kasal  <kasal <at> math.cas.cz>
[...]
        The redirection of print statements reworked.  The idea comes from
        mawk-1.3.3; much thanks to Michael Brennan!

which puts it between gawk 3.1.1 and 3.1.2.

I noticed that Dennis Clarke reports he's using gawk 3.0.1 out of
/usr/local/bin on a Debian squeeze system, which should have gawk 3.1.7
in /usr/bin. Seems like an odd thing to do. Installed the local version
a long time ago and forgot to remove it when the version in /usr/bin
surpassed it? Something like that has happened to me at least once
before.

-- 
Alan Curry




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

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

Previous Next


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