Sfoglia il codice sorgente

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 anni fa
parent
commit
8729c1bcfa
2 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  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.
     - Skip test cases when there is no c++filt available.
     - Add test cases for Dpkg::Conf and Dpkg::Checksums.
     - Add test cases for Dpkg::Conf and Dpkg::Checksums.
     - Handle libtool executables in progname unit test.
     - 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:
   * Build system:
     - Bump gettext version to 0.19:
     - Bump gettext version to 0.19:
       + Use --add-location=file in msgmerge and xgettext commands.
       + 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',
 $pid = spawn(exec => 'cat',
 	     from_file => $tmp1_name,
 	     from_file => $tmp1_name,
 	     to_file => $tmp2_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
 open $tmp_fh, '<', $tmp2_name
     or die "cannot open $tmp2_name: $!";
     or die "cannot open $tmp2_name: $!";