From 9fa2d0883a4e373cb44ccb475a5bd53255bad795 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net> Date: Tue, 14 Apr 1998 11:56:24 -0700 Subject: [PATCH] more debug added Rev: src/modules/files/socktest.pike:1.10 Rev: src/modules/files/testsuite.in:1.15 --- src/modules/files/socktest.pike | 6 +++--- src/modules/files/testsuite.in | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/modules/files/socktest.pike b/src/modules/files/socktest.pike index 623689a911..425c667041 100755 --- a/src/modules/files/socktest.pike +++ b/src/modules/files/socktest.pike @@ -1,6 +1,6 @@ #!/usr/local/bin/pike -/* $Id: socktest.pike,v 1.9 1998/04/06 04:34:05 hubbe Exp $ */ +/* $Id: socktest.pike,v 1.10 1998/04/14 18:56:23 hubbe Exp $ */ import Stdio; import String; @@ -311,14 +311,14 @@ int main() { if(!port1::bind(0, accept_callback)) { - werror("Bind failed.\n"); + werror("Bind failed. (%d)\n",port1::errno()); exit(1); } sscanf(port1::query_address(),"%*s %d",portno1); if(!port2::bind(0)) { - werror("Bind failed.\n"); + werror("Bind failed. (%d)\n",port2::errno()); exit(1); } diff --git a/src/modules/files/testsuite.in b/src/modules/files/testsuite.in index 54f8bff264..b3aa004b0c 100644 --- a/src/modules/files/testsuite.in +++ b/src/modules/files/testsuite.in @@ -19,16 +19,16 @@ test_true(rm("conftest")) test_eq(file_stat("conftest"),0) // - file->write -test_any(int e; object o=clone(Stdio.File); if(!o->open("conftest","wct")) return -3; e=o->write("sune"); if(!o->close()) return -2; return e,4) +test_any(int e; object o=clone(Stdio.File); if(!o->open("conftest","wct")) return "open"+o->errno(); e=o->write("sune"); if(!o->close()) return "close"+o->errno(); return e,4) // - file->read -test_any(string s; object o=clone(Stdio.File); if(!o->open("conftest","r")) return -1; s=o->read(4); if(!o->close()) return -1; return s,"sune") +test_any(string s; object o=clone(Stdio.File); if(!o->open("conftest","r")) return "open"+o->errno(); s=o->read(4); if(!o->close()) return "close"+o->errno(); return s,"sune") -test_any(string s; object o=clone(Stdio.File); if(!o->open("conftest","r")) return -1; s=o->read(999999); if(!o->close()) return -1; return s,"sune") +test_any(string s; object o=clone(Stdio.File); if(!o->open("conftest","r")) return "open"+o->errno(); s=o->read(999999); if(!o->close()) return "close"+o->errno(); return s,"sune") -test_any(int e; object o=clone(Stdio.File); if(!o->open("conftest","wct")) return -1; e=o->write(sprintf("%'+-*'100000s","")); if(!o->close()) return -1; return e,100000) +test_any(int e; object o=clone(Stdio.File); if(!o->open("conftest","wct")) return "open"+o->errno(); e=o->write(sprintf("%'+-*'100000s","")); if(!o->close()) return "close"+o->errno(); return e,100000) -test_any(string s; object o=clone(Stdio.File); if(!o->open("conftest","r")) return -1; s=o->read(9999999); if(!o->close()) return -1; return s,sprintf("%'+-*'100000s","")) +test_any(string s; object o=clone(Stdio.File); if(!o->open("conftest","r")) return "open"+o->errno(); s=o->read(9999999); if(!o->close()) return "close"+o->errno(); return s,sprintf("%'+-*'100000s","")) // - file->seek // - file->tell -- GitLab