bug-coreutils
[Top][All Lists]
Advanced

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

elusive failure in tests/stty/basic-1 on HP-UX


From: Bob Proulx
Subject: elusive failure in tests/stty/basic-1 on HP-UX
Date: Fri, 30 Jun 2006 02:33:25 -0600
User-agent: Mutt/1.5.9i

For a while now I have been seeing intermittent failures of the
tests/stty/basic-1 test on HP-UX 11.11.  They are most
frustratingly^Winterestingly not repeatable.  Most of the time the
test passes.  But sometimes, every so often, the test fails with this
output:

  stty: missing argument to `rows'
  Try `stty --help' for more information.

Finally I was able to capture the failure with VERBOSE=yes set and see
what is happening.  Here is the test code.  It looks reasonable to me.
(However once sed is used I would probably go the entire way and do it
all with sed instead of the longer pipeline.  :-)

  # Build a list of all boolean options stty accepts on this system.
  options=`stty -a|tail -n +2|tr ';' '\n'|sed '/ = /d;s/^ //;s/-//g'`

First, here is the successful output:

  + + stty -a
  + tail -n +2
  + sed / = /d;s/^ //;s/-//g
  + tr ; \n
  options=


  parenb parodd cs8 hupcl cstopb cread clocal
  ignbrk brkint ignpar parmrk inpck istrip inlcr igncr icrnl ixon ixoff
  iuclc ixany imaxbel
  opost olcuc ocrnl onlcr onocr onlret ofill ofdel nl0 cr0 tab3 bs0 vt0 ff0
  isig icanon iexten echo echoe echok echonl noflsh xcase tostop echoprt
  echoctl echoke
  + test parenb = parenb
  + continue

However the failing output is much different:

  + + stty -a
  + tail -n +2
  + tr ; \n
  + sed / = /d;s/^ //;s/-//g
  options=rows 0
  columns 0

















  parenb
  parodd
  cs8
  hupcl
  cstopb
  cread
  clocal
  ignbrk
  brkint
  ignpar
  parmrk
  inpck
  istrip
  inlcr
  igncr
  icrnl
  ixon
  ixoff
  iuclc
  ixany
  imaxbel
  opost
  olcuc
  ocrnl
  onlcr
  onocr
  onlret
  ofill
  ofdel
  nl0
  cr0
  tab3
  bs0
  vt0
  ff0
  isig
  icanon
  iexten
  echo
  echoe
  echok
  echonl
  noflsh
  xcase
  tostop
  echoprt
  echoctl
  echoke
  + test rows = parenb
  + stty rows
  stty: missing argument to `rows'
  Try `stty --help' for more information.
  + fail=1

Of course that looks to be impossible output given the script.  But
that is the result so it must have happened.  The stty command must
have produced more output than was expected by the tail -n +2 pushing
the first line into the third line.  But I have no idea how.

Is it reasonable to change that test code to something like this?  I
think it would react better in this case.

  stty -a | sed '/speed/d;/rows/d;/columns/d;/ = /d;s/-//g'

And then the failing extra unknown output, that is currently getting
deleted by tail -n +2, should show up and be observed.  It should fail
the test and we would capture that problem.

What do you think?

Bob




reply via email to

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