help-octave
[Top][All Lists]
Advanced

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

Re: 5th anniversary of buggy system/popepn/popen2


From: mirek
Subject: Re: 5th anniversary of buggy system/popepn/popen2
Date: Tue, 16 Nov 2004 14:06:48 +0100
User-agent: Mutt/1.5.6+20040907i

On Tue, Nov 16, 2004 at 10:32:28AM +0100, David Bateman wrote:
> Hi,
> 
> Yeah I'd love to get this problem fixed as well. The fact is an easier
> way to demonstrate it is with "ls",

Yes, I rember your msg about it. But ls gives lower failure rate (on my
machine) then my popen example.

Failure test of octave (2.1.61) 4*ls (dots=passed tests, number=length of OK
sequence):

-........... 11
.................... 20
.. 2
........................ 24
............................................ 44
...... 6
.......... 10
.............. 14
.............. 14
.... 4
.......... 10


File: test_ls.sh 
-------------------------------------------------
#!/bin/bash

# http://www.octave.org/octave-lists/archive/bug-octave.2004/msg00167.html
# Comment: one or two ls <-> low failure rate,
# four ls give funny result

#set -x
set -e

D=/usr/bin
LS="ls $D"
LS="$LS;$LS;$LS;$LS;"; # four ls
cmd='"$LS"|octave -q'

while true;do
  eval echo $cmd >ls0
  eval echo $cmd >ls1
  cmp -s ls0 ls1 && break
  echo -n '-'
done

while true; do
 n=0
 cp ls0 ls1
 while cmp -s ls0 ls1; do
   n=$[n+1]
   eval echo $cmd >ls1
   echo -n .
 done
 echo " $n"
 [ $n = 0 ] && sleep 1
done
-------------------------------------------------



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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