Pārlūkot izejas kodu

scripts/t: Do not use a timeout when testing cat I/O

While a 5 seconds timeout should be usually safe, it pretty much depends
on the system being fast enough, and not being under any other load.

This also ties unrelated checks together, and unnecessarily slows down
the test suite.
Guillem Jover 11 gadi atpakaļ
vecāks
revīzija
8729c1bcfa
2 mainītis faili ar 3 papildinājumiem un 3 dzēšanām
  1. 1 0
      debian/changelog
  2. 2 3
      scripts/t/Dpkg_IPC.t

+ 1 - 0
debian/changelog

@@ -115,6 +115,7 @@ dpkg (1.18.0) UNRELEASED; urgency=low
     - Skip test cases when there is no c++filt available.
     - Add test cases for Dpkg::Conf and Dpkg::Checksums.
     - Handle libtool executables in progname unit test.
+    - Do not use a timeout when testing cat I/O, speeds up test suite by 5s.
   * Build system:
     - Bump gettext version to 0.19:
       + Use --add-location=file in msgmerge and xgettext commands.

+ 2 - 3
scripts/t/Dpkg_IPC.t

@@ -62,10 +62,9 @@ is($string2, $string1, '{from,to}_handle');
 $pid = spawn(exec => 'cat',
 	     from_file => $tmp1_name,
 	     to_file => $tmp2_name,
-	     wait_child => 1,
-	     timeout => 5);
+	     wait_child => 1);
 
-ok($pid, 'execute cat program, I/O to filenames, wait and timeout');
+ok($pid, 'execute cat program, I/O to filenames and wait');
 
 open $tmp_fh, '<', $tmp2_name
     or die "cannot open $tmp2_name: $!";