1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
Description: Avoid random failure of BISTs involving timeout
The "assert(timeout,*,*)" commands have been put in a xtest block.
This was causing FTBFS on the build servers.
Author: Rafael Laboissière <rafael@debian.org>
Forwarded: not-needed
Last-Update: 2022-12-09
--- octave-sockets-1.4.0.orig/src/socket.cc
+++ octave-sockets-1.4.0/src/socket.cc
@@ -1626,25 +1626,6 @@ See the @command{shutdown} man pages for
%! assert(wdfs, [sock]);
%! assert(edfs, []);
%!
-%! start = tic;
-%! [ret, rdfs, wdfs, edfs] = select(sock+1, [sock], [], [], 1);
-%! timeout = toc(start);
-%! assert(ret, 0);
-%! assert(rdfs, []);
-%! assert(wdfs, []);
-%! assert(edfs, []);
-%! assert(timeout, 1, 0.01);
-%!
-%! timeout = struct ("tv_sec", 2, "tv_usec", 0);
-%! start = tic;
-%! [ret, rdfs, wdfs, edfs] = select(sock+1, [sock], [], [], timeout);
-%! timeout = toc(start);
-%! assert(ret, 0);
-%! assert(rdfs, []);
-%! assert(wdfs, []);
-%! assert(edfs, []);
-%! assert(timeout, 2, 0.01);
-%!
%! msg = "Hello socket-land!";
%! addrinfo = struct ("addr", "127.0.0.1", "port", 9001);
%! rc = sendto (sock, msg, 0, addrinfo);
@@ -1669,5 +1650,30 @@ See the @command{shutdown} man pages for
%! assert(edfs, []);
%!
%! assert (disconnect (sock), 0);
+%!
+%!xtest
+%! sock = socket (AF_INET, SOCK_DGRAM, 0);
+%! assert (sock >= 0);
+%!
+%! start = tic;
+%! [ret, rdfs, wdfs, edfs] = select(sock+1, [sock], [], [], 1);
+%! timeout = toc(start);
+%! assert(ret, 0);
+%! assert(rdfs, []);
+%! assert(wdfs, []);
+%! assert(edfs, []);
+%! assert(timeout, 1, 0.01);
+%!
+%! timeout = struct ("tv_sec", 2, "tv_usec", 0);
+%! start = tic;
+%! [ret, rdfs, wdfs, edfs] = select(sock+1, [sock], [], [], timeout);
+%! timeout = toc(start);
+%! assert(ret, 0);
+%! assert(rdfs, []);
+%! assert(wdfs, []);
+%! assert(edfs, []);
+%! assert(timeout, 2, 0.01);
+%!
+%! assert (disconnect (sock), 0);
*/
|