[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, non-fatal-io-2, updated. gawk-4.1.0-1140
From: |
Andrew J. Schorr |
Subject: |
[gawk-diffs] [SCM] gawk branch, non-fatal-io-2, updated. gawk-4.1.0-1140-g9fa41fc |
Date: |
Sat, 28 Feb 2015 20:27:52 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".
The branch, non-fatal-io-2 has been updated
via 9fa41fc2c183d5920d64e6f34f8a6bb325188443 (commit)
from 9adb80ce25def725ddd98d63f62e35a27e04c570 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=9fa41fc2c183d5920d64e6f34f8a6bb325188443
commit 9fa41fc2c183d5920d64e6f34f8a6bb325188443
Author: Andrew J. Schorr <address@hidden>
Date: Sat Feb 28 15:26:40 2015 -0500
Improve testing for nonfatal socket connection attempts.
diff --git a/ChangeLog b/ChangeLog
index a0d233f..654c96b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-02-28 Andrew J. Schorr <address@hidden>
+
+ * io.c (pty_vs_pipe): Remove check for NULL PROCINFO_node, since
+ this is now checked inside in_PROCINFO.
+
2015-02-27 Andrew J. Schorr <address@hidden>
* io.c (socketopen): New parameter hard_error; set it if
diff --git a/io.c b/io.c
index af963a8..162fb4e 100644
--- a/io.c
+++ b/io.c
@@ -3704,8 +3704,10 @@ pty_vs_pipe(const char *command)
#ifdef HAVE_TERMIOS_H
NODE *val;
- if (PROCINFO_node == NULL)
- return false;
+ /*
+ * N.B. No need to check for NULL PROCINFO_node, since the
+ * in_PROCINFO function now checks that for us.
+ */
val = in_PROCINFO(command, "pty", NULL);
if (val) {
if ((val->flags & MAYBE_NUM) != 0)
diff --git a/test/ChangeLog b/test/ChangeLog
index 3b9f494..5ece087 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,14 @@
+2015-02-28 Andrew J. Schorr <address@hidden>
+
+ * Makefile.am (EXTRA_DIST): Add nonfatal3.{awk,ok}.
+ (GAWK_EXT_TESTS): Add nonfatal3.
+ * nonfatal1.awk: Replace "ti10/357" with "local:host/25", since
+ "local:host" should be a universally bad hostname due to the
+ invalid ":" character.
+ * nonfatal1.ok: Update.
+ * nonfatal3.{awk,ok}: New test for connecting to a TCP port where
+ nobody is listening.
+
2015-02-27 Arnold D. Robbins <address@hidden>
* nonfatal1.ok: Update after code changes.
diff --git a/test/Makefile.am b/test/Makefile.am
index 1d652ec..15656ce 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -603,6 +603,8 @@ EXTRA_DIST = \
nonfatal1.ok \
nonfatal2.awk \
nonfatal2.ok \
+ nonfatal3.awk \
+ nonfatal3.ok \
nonl.awk \
nonl.ok \
noparms.awk \
@@ -1051,7 +1053,7 @@ GAWK_EXT_TESTS = \
lint lintold lintwarn \
manyfiles match1 match2 match3 mbstr1 \
nastyparm next nondec nondec2 \
- nonfatal1 nonfatal2 \
+ nonfatal1 nonfatal2 nonfatal3 \
patsplit posix printfbad1 printfbad2 printfbad3 printfbad4 printhuge
procinfs \
profile0 profile1 profile2 profile3 profile4 profile5 profile6 profile7
\
profile8 pty1 \
diff --git a/test/Makefile.in b/test/Makefile.in
index 65fd461..87f9bf5 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -860,6 +860,8 @@ EXTRA_DIST = \
nonfatal1.ok \
nonfatal2.awk \
nonfatal2.ok \
+ nonfatal3.awk \
+ nonfatal3.ok \
nonl.awk \
nonl.ok \
noparms.awk \
@@ -1307,7 +1309,7 @@ GAWK_EXT_TESTS = \
lint lintold lintwarn \
manyfiles match1 match2 match3 mbstr1 \
nastyparm next nondec nondec2 \
- nonfatal1 nonfatal2 \
+ nonfatal1 nonfatal2 nonfatal3 \
patsplit posix printfbad1 printfbad2 printfbad3 printfbad4 printhuge
procinfs \
profile0 profile1 profile2 profile3 profile4 profile5 profile6 profile7
\
profile8 pty1 \
@@ -3651,6 +3653,11 @@ nonfatal2:
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden >_$@ 2>&1 || echo EXIT
CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+nonfatal3:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f address@hidden >_$@ 2>&1 || echo EXIT
CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
patsplit:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden >_$@ 2>&1 || echo EXIT
CODE: $$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index c9e6a84..a293745 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -1162,6 +1162,11 @@ nonfatal2:
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden >_$@ 2>&1 || echo EXIT
CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+nonfatal3:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f address@hidden >_$@ 2>&1 || echo EXIT
CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
patsplit:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden >_$@ 2>&1 || echo EXIT
CODE: $$? >>_$@
diff --git a/test/nonfatal1.awk b/test/nonfatal1.awk
index bf821d4..1eb85b1 100644
--- a/test/nonfatal1.awk
+++ b/test/nonfatal1.awk
@@ -1,5 +1,6 @@
BEGIN {
PROCINFO["NONFATAL"]
- print |& "/inet/tcp/0/ti10/357"
+ # note that ":" is not a valid hostname character
+ print |& "/inet/tcp/0/local:host/25"
print ERRNO
}
diff --git a/test/nonfatal1.ok b/test/nonfatal1.ok
index b22393b..04fd705 100644
--- a/test/nonfatal1.ok
+++ b/test/nonfatal1.ok
@@ -1,2 +1,2 @@
-gawk: nonfatal1.awk:3: warning: remote host and port information (ti10, 357)
invalid
-Connection timed out
+gawk: nonfatal1.awk:4: warning: remote host and port information (local:host,
25) invalid
+No such file or directory
diff --git a/test/nonfatal3.awk b/test/nonfatal3.awk
new file mode 100644
index 0000000..eace9ae
--- /dev/null
+++ b/test/nonfatal3.awk
@@ -0,0 +1,6 @@
+BEGIN {
+ PROCINFO["NONFATAL"]
+ # valid host but bogus port
+ print |& "/inet/tcp/0/localhost/0"
+ print ERRNO
+}
diff --git a/test/nonfatal3.ok b/test/nonfatal3.ok
new file mode 100644
index 0000000..5d5be35
--- /dev/null
+++ b/test/nonfatal3.ok
@@ -0,0 +1 @@
+Connection refused
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 +++++
io.c | 6 ++++--
test/ChangeLog | 11 +++++++++++
test/Makefile.am | 4 +++-
test/Makefile.in | 9 ++++++++-
test/Maketests | 5 +++++
test/nonfatal1.awk | 3 ++-
test/nonfatal1.ok | 4 ++--
test/nonfatal3.awk | 6 ++++++
test/nonfatal3.ok | 1 +
10 files changed, 47 insertions(+), 7 deletions(-)
create mode 100644 test/nonfatal3.awk
create mode 100644 test/nonfatal3.ok
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, non-fatal-io-2, updated. gawk-4.1.0-1140-g9fa41fc,
Andrew J. Schorr <=