diff options
author | Jim Meyering <meyering@redhat.com> | 2008-01-07 14:21:34 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-01-07 14:21:34 +0100 |
commit | 2deb4bd589701dbfeeb2fcd6552d21b9f11e11b4 (patch) | |
tree | b4cf351a864ff6a83f50013a878c5ccbf5864015 /tests/misc/tty-eof | |
parent | ab1c9b54b173312c132c9452eff6080a5b4cf6e7 (diff) | |
download | coreutils-2deb4bd589701dbfeeb2fcd6552d21b9f11e11b4.tar.xz |
Make a racy test failure less likely to happen.
* tests/misc/tty-eof: Uncomment a debug "warn".
This change happens to make this test far less likely to fail.
With that statement commented out, this test would fail about
20% of the time on my desktop. Now, it's gone 100 iterations
in a row with no failure.
Diffstat (limited to 'tests/misc/tty-eof')
-rwxr-xr-x | tests/misc/tty-eof | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/misc/tty-eof b/tests/misc/tty-eof index 8cd2921fc..086f19cd6 100755 --- a/tests/misc/tty-eof +++ b/tests/misc/tty-eof @@ -2,7 +2,7 @@ # -*- perl -*- # Test whether programs exit upon a single EOF from a tty. -# Copyright (C) 2003, 2006, 2007 Free Software Foundation, Inc. +# Copyright (C) 2003, 2006, 2007, 2008 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -92,7 +92,7 @@ $@ and (warn "$ME: this script requires Perl's Expect package >=1.11\n"), $exp->send("\cD"); # This is Control-D. FIXME: what if that's not EOF? $exp->expect (0, '-re', "^a b\\r?\$"); my $found = $exp->expect (1, '-re', "^.+\$"); - # $found and warn "F: $found: " . $exp->exp_match () . "\n"; + $found and warn "F: $found: " . $exp->exp_match () . "\n"; $exp->expect(1, 'eof'); # Expect no output from cut, since we gave it no input. defined $found || $cmd =~ /^cut/ |