From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9566 invoked by alias); 23 Nov 2014 08:24:51 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 33769 Received: (qmail 7701 invoked from network); 23 Nov 2014 08:24:49 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-Biglobe-Sender: Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: Confirming X02zlevi test failures From: "Jun T." In-Reply-To: <141122193250.ZM15938@torch.brasslantern.com> Date: Sun, 23 Nov 2014 16:44:59 +0900 Content-Transfer-Encoding: 7bit Message-Id: <21240C97-F8F1-45F7-8F15-4454D4066276@kba.biglobe.ne.jp> References: <141119085006.ZM18951@torch.brasslantern.com> <11014.1416438322@quattro> <141119222019.ZM2717@torch.brasslantern.com> <5A1A98B7-42E0-4EE1-9468-32E2D6434246@kba.biglobe.ne.jp> <141120091803.ZM3693@torch.brasslantern.com> <2D312191-3B6F-49BE-9289-95DDA6DAC1F4@kba.biglobe.ne.jp> <141122193250.ZM15938@torch.brasslantern.com> To: zsh-workers@zsh.org X-Mailer: Apple Mail (2.1878.6) X-Biglobe-Spnum: 53309 2014/11/23 12:3, Bart Schaefer wrote: > OK, so maybe what we needed all along instead of those zpty_flush calls > was to have a timeout delay. Sorry, my post was not clear enough. I need BOTH zpty_flush and '-t 0.02' to get 1000/1000 success. With zpty_flush only, I got 998/1000 success on Mac (1000/1000 on FreeBSD). So this is a kind of yet another workaround. But the result supports your guess that clearing the buffer of the slave tty would be important. diff --git a/Test/comptest b/Test/comptest index c67237a..5964114 100644 --- a/Test/comptest +++ b/Test/comptest @@ -34,7 +34,7 @@ comptestinit () { "fpath=( $fpath )" \ "bindkey -$comptest_keymap" \ 'LISTMAX=10000000 -stty 38400 columns 80 rows 24 werase undef tabs +stty 38400 columns 80 rows 24 tabs -icanon -iexten TERM=vt100 KEYTIMEOUT=1 setopt zle @@ -162,9 +162,9 @@ comptest () { zletest () { local first=0 for input; do + zpty_flush Before zletest # sleep for $KEYTIMEOUT - (( first++ )) && read -t 0.011 -k 1 < /dev/null - # zpty_flush Before zletest + (( first++ )) && read -t 0.02 -k 1 < /dev/null zpty -n -w zsh "$input" done zpty -n -w zsh $'\C-X' @@ -172,6 +172,6 @@ zletest () { print "failed to invoke finish widget." return 1 } - # zpty_flush After zletest + zpty_flush After zletest print -lr "${(@)${(@ps:\r\n:)log##*}[2,-2]}" }