Re: Testcase for cd -@ / O_XATTR

2013-11-08 Thread Joshuah Hurst
On Thu, Nov 7, 2013 at 8:53 PM, Chet Ramey  wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On 11/6/13 10:34 PM, Chris Down wrote:
>> On 2013-11-06 22:23:41 -0500, Chet Ramey wrote:
>>> I'll think about it.  I generally don't like to add test cases for features
>>> that are available on so few platforms.
>>
>> Why? Surely that is the place where such test cases would be most
>> valuable?
>
> Sure.  It just generates spurious results on platforms that don't support
> the feature.

Why? You could test whether a platform supports the cd -@ option based
on the cd --help output and only run the test if -@ is a supported
option.

Josh



Weird process substitution behavior

2013-11-08 Thread John Dawson
The following surprised me. I thought line 4 of the output, and certainly
line 5 of the output, should have said "0 /dev/fd/63" too. Is this behavior
a bug?

$ cat bug1.bash
#!/bin/bash
count_lines()
{
wc -l $1
wc -l $1
wc -l $1
true | wc -l $1
wc -l $1
}
count_lines <(date)

$ ./bug1.bash
1 /dev/fd/63
0 /dev/fd/63
0 /dev/fd/63
wc: /dev/fd/63: No such file or directory
wc: /dev/fd/63: No such file or directory


I ran this on Bash 4.2.37(1)-release on Fedora Linux.

-- 
John Dawson