Commits

Anonymous committed af5b983

Linux doesn't let you set SO_SNDLOWAT, so don't test for it. Fix some
error messages to refer to the correct test number.

  • Participants
  • Parent commits 11abf7a

Comments (0)

Files changed (1)

File cf/t/t_cf.ml

             let lhost, lport = laddr in
             let rhost, rport = raddr in
             if lhost <> rhost then
-                failwith "T11 error: host a#getpeername <> b#getsockname";
+                failwith "T12 error: host a#getpeername <> b#getsockname";
             if lport <> rport then
-                failwith "T11 error: port a#getpeername <> b#getsockname";
+                failwith "T12 error: port a#getpeername <> b#getsockname";
             let laddr = a#getsockname and raddr = b#getpeername in
             let lhost, lport = laddr in
             let rhost, rport = raddr in
             if lhost <> rhost then
-                failwith "T11 error: host a#getsockname <> b#getpeername";
+                failwith "T12 error: host a#getsockname <> b#getpeername";
             if lport <> rport then
-                failwith "T11 error: port a#getsockname <> b#getpeername";
+                failwith "T12 error: port a#getsockname <> b#getpeername";
             let tx = String.make len 'x' and rx = String.create len in
             let n = a#send tx 0 len in
-            if n <> len then failwith "T11 error: tx incomplete!";
+            if n <> len then failwith "T12 error: tx incomplete!";
             let n = b#recv rx 0 len in
-            if n <> len then failwith "T11 error: rx incomplete!";
-            if tx <> rx then failwith "T11 error: tx <> rx!";
+            if n <> len then failwith "T12 error: rx incomplete!";
+            if tx <> rx then failwith "T12 error: tx <> rx!";
             a#close;
             b#close;
             listen#close
         with
         | Unix.Unix_error (e, fn, _) ->
-            failwith (Printf.sprintf "T11 error: %s in %s.\n"
+            failwith (Printf.sprintf "T12 error: %s in %s.\n"
                 (Unix.error_message e) fn)
 end
 
             let b = new Cf_tcp6_socket.endpoint (active#socket) in
             a#setsockopt Cf_ip_common.tcp_nodelay true;
             b#setsockopt Cf_ip_common.tcp_nodelay true;
-            a#setsockopt Cf_socket.so_sndlowat 1;
-            b#setsockopt Cf_socket.so_sndlowat 1;
             let laddr = a#getpeername and raddr = b#getsockname in
             let lhost, lport, lscope = laddr in
             let rhost, rport, rscope = raddr in
             if lhost <> rhost then
-                failwith "T12 error: host a#getpeername <> b#getsockname";
+                failwith "T13 error: host a#getpeername <> b#getsockname";
             if lport <> rport then
-                failwith "T12 error: port a#getpeername <> b#getsockname";
+                failwith "T13 error: port a#getpeername <> b#getsockname";
             if lscope <> rscope then
-                failwith "T12 error: port a#getpeername <> b#getsockname";
+                failwith "T13 error: port a#getpeername <> b#getsockname";
             let laddr = a#getsockname and raddr = b#getpeername in
             let lhost, lport, lscope = laddr in
             let rhost, rport, rscope = raddr in
             if lhost <> rhost then
-                failwith "T12 error: host a#getsockname <> b#getpeername";
+                failwith "T13 error: host a#getsockname <> b#getpeername";
             if lport <> rport then
-                failwith "T12 error: port a#getsockname <> b#getpeername";
+                failwith "T13 error: port a#getsockname <> b#getpeername";
             if lscope <> rscope then
-                failwith "T12 error: port a#getsockname <> b#getpeername";
+                failwith "T13 error: port a#getsockname <> b#getpeername";
             let tx = String.make len 'x' and rx = String.create len in
             let n = a#send tx 0 len in
-            if n <> len then failwith "T12 error: tx incomplete!";
+            if n <> len then failwith "T13 error: tx incomplete!";
             let n = b#recv rx 0 len in
-            if n <> len then failwith "T12 error: rx incomplete!";
-            if tx <> rx then failwith "T12 error: tx <> rx!";
+            if n <> len then failwith "T13 error: rx incomplete!";
+            if tx <> rx then failwith "T13 error: tx <> rx!";
             a#close;
             b#close;
             listen#close
         with
         | Unix.Unix_error (e, fn, _) ->
-            failwith (Printf.sprintf "T12 error: %s in %s.\n"
+            failwith (Printf.sprintf "T13 error: %s in %s.\n"
                 (Unix.error_message e) fn)
 end