GNU bug report logs - #26253
Coreutils 8.26 test failure on arm-linux-gnueabihf

Previous Next

Package: coreutils;

Reported by: ludo <at> gnu.org (Ludovic Courtès)

Date: Sat, 25 Mar 2017 15:46:02 UTC

Severity: important

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Pádraig Brady <P <at> draigBrady.com>
Cc: 26253 <at> debbugs.gnu.org
Subject: Re: bug#26253: tests/misc/cut-huge-range.sh fails on
 arm-linux-gnueabihf
Date: Mon, 27 Mar 2017 11:18:54 +0200
[Message part 1 (text/plain, inline)]
Hi Pádraig,

Pádraig Brady <P <at> draigBrady.com> skribis:

> On 26/03/17 06:41, Ludovic Courtès wrote:

[...]

>> Part of the reason, I think, is that ‘vm’ is computed by simply running
>> ‘cut -b1’:
>> 
>>   vm=$(get_min_ulimit_v_ cut -b1 /dev/null) \
>>     || skip_ "this shell lacks ulimit support"
>> 
>> … but the last couple of tests also run sh within that limit:
>
> Are you saying the returns_ call induces a subshell?
> I suppose it might on some shells, though it doesn't seem to on bash 4.3 here.

I don’t think ‘return_’ spawns a subshell, but the ulimit should account
for memory needed by the shell in addition to what ‘cut’ needs.

>>   # Explicitly disallow values above CUT_MAX
>>   (ulimit -v $vm && returns_ 1 cut -b$SIZE_MAX /dev/null 2>/dev/null) || fail=1
>>   (ulimit -v $vm && returns_ 1 cut -b$SIZE_OFLOW /dev/null 2>/dev/null) || fail=1
>> 
>> It might be more accurate to do something like:
>> 
>>   vm=$(get_min_ulimit_v_ sh -c 'cut -b1 /dev/null')
>
> That give 10004 rather than 5004 on my x86_64 system here.
> Another option might be to use:
>   vm=$(get_min_ulimit_v_ returns_ 0 cut -b1 /dev/null)
>
> Does that give better results for you?

Yes the patch below on top of 8.26 (that is, without vm += 1000) works
for me.

Thanks,
Ludo’.

[Message part 2 (text/x-patch, inline)]
diff --git a/tests/misc/cut-huge-range.sh b/tests/misc/cut-huge-range.sh
index 6b3c5b6ed..eeba33fce 100755
--- a/tests/misc/cut-huge-range.sh
+++ b/tests/misc/cut-huge-range.sh
@@ -20,7 +20,7 @@
 print_ver_ cut
 getlimits_
 
-vm=$(get_min_ulimit_v_ cut -b1 /dev/null) \
+vm=$(get_min_ulimit_v_ returns_ 0 cut -b1 /dev/null) \
   || skip_ "this shell lacks ulimit support"

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

Previous Next


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