summaryrefslogtreecommitdiffstats
path: root/tools/testing/ktest
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/ktest')
-rwxr-xr-xtools/testing/ktest/ktest.pl7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 29470b554711..0c006a2f165d 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -1904,11 +1904,12 @@ sub wait_for_input
1904 1904
1905 # copy data from stdin to the console 1905 # copy data from stdin to the console
1906 if (vec($rout, fileno(\*STDIN), 1) == 1) { 1906 if (vec($rout, fileno(\*STDIN), 1) == 1) {
1907 sysread(\*STDIN, $buf, 1000); 1907 $nr = sysread(\*STDIN, $buf, 1000);
1908 syswrite($fp, $buf, 1000); 1908 syswrite($fp, $buf, $nr) if ($nr > 0);
1909 next;
1910 } 1909 }
1911 1910
1911 next if (vec($rout, fileno($fp), 1) != 1);
1912
1912 $line = ""; 1913 $line = "";
1913 1914
1914 # try to read one char at a time 1915 # try to read one char at a time