bug-coreutils
[Top][All Lists]
Advanced

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

Re: BTRFS file clone support for cp


From: Jim Meyering
Subject: Re: BTRFS file clone support for cp
Date: Thu, 30 Jul 2009 17:34:54 +0200

Pádraig Brady wrote:
> Jim Meyering wrote:
>> diff --git a/tests/tail-2/pid b/tests/tail-2/pid
>>
>> +# Ensure that tail --pid=PID exits successfully when PID is dead.
>> +# Use an unlikely-to-be-live PID: 2^31-1
>> +getlimits_
>> +tail --pid=$INT_MAX -f /dev/null || fail=1
>
> Probably should use $PID_T_MAX

Definitely.

> You could speed up the test with -s.1 also

Yes, indeed.  Good one.

> (after separate fix I'm sending applied).
> Also could protect with timeout incase $PID_T_MAX does exist.
> So something like:
>
> getlimits_
> timeout 1 tail -s.1 --pid=$PID_T_MAX -f /dev/null
> ret=$?
> test $ret = 124 && skip_test_ "pid $PID_T_MAX present"
> ! test $ret = 0 && fail=1

Clearly better.
Thanks!

> cheers,
> Pádraig.
>
> p.s. A lot of these tests could be changed to
> using timeout I think. I'll have a look at that
> at some stage.




reply via email to

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