[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, master, updated. edce216d276505437c9cc15
From: |
Andrew J. Schorr |
Subject: |
[gawk-diffs] [SCM] gawk branch, master, updated. edce216d276505437c9cc156f0db4fa586639d76 |
Date: |
Tue, 15 Jan 2013 14:55:55 +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, master has been updated
via edce216d276505437c9cc156f0db4fa586639d76 (commit)
from 74f4ac827622e938bb43d079dcaa87f1db749c63 (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=edce216d276505437c9cc156f0db4fa586639d76
commit edce216d276505437c9cc156f0db4fa586639d76
Author: Andrew J. Schorr <address@hidden>
Date: Tue Jan 15 09:55:30 2013 -0500
Patch readdir test to protect against failure on filesystems lacking type
info.
diff --git a/test/ChangeLog b/test/ChangeLog
index 822b1db..1501555 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,12 @@
+2013-01-15 Andrew J. Schorr <address@hidden>
+
+ * Makefile.am (readdir): Try to protect against failure on filesystems
+ lacking type information by invoking readdir.awk before readdir0.awk
+ and passing the results of readdir to readdir0 for inspection.
+ * readdir0.awk: Analyze the results of the readdir extension.
+ If all file types are set to "u", we infer that this filesystem lacks
+ type information.
+
2013-01-14 Arnold D. Robbins <address@hidden>
* Makefile.am (rand): Let Gentests create the test.
diff --git a/test/Makefile.am b/test/Makefile.am
index 593013b..b82b604 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1723,10 +1723,9 @@ testext::
@-$(CMP) $(srcdir)/address@hidden _$@ && rm -f _$@ testext.awk
readdir:
- @echo This test can fail on some filesystems.
@echo $@
- @ls -fli $(top_srcdir) | sed 1d | $(AWK) -f $(srcdir)/readdir0.awk >
address@hidden
@$(AWK) -f $(srcdir)/readdir.awk $(top_srcdir) > _$@
+ @ls -fli $(top_srcdir) | sed 1d | $(AWK) -f $(srcdir)/readdir0.awk -v
extout=_$@ > address@hidden
@-$(CMP) address@hidden _$@ && rm -f address@hidden _$@
fts:
diff --git a/test/Makefile.in b/test/Makefile.in
index d205248..edc472c 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -2104,10 +2104,9 @@ testext::
@-$(CMP) $(srcdir)/address@hidden _$@ && rm -f _$@ testext.awk
readdir:
- @echo This test can fail on some filesystems.
@echo $@
- @ls -fli $(top_srcdir) | sed 1d | $(AWK) -f $(srcdir)/readdir0.awk >
address@hidden
@$(AWK) -f $(srcdir)/readdir.awk $(top_srcdir) > _$@
+ @ls -fli $(top_srcdir) | sed 1d | $(AWK) -f $(srcdir)/readdir0.awk -v
extout=_$@ > address@hidden
@-$(CMP) address@hidden _$@ && rm -f address@hidden _$@
fts:
diff --git a/test/readdir0.awk b/test/readdir0.awk
index 54306f1..c98ac67 100644
--- a/test/readdir0.awk
+++ b/test/readdir0.awk
@@ -1,3 +1,16 @@
+BEGIN {
+ while ((getline x < extout) > 0) {
+ numrec++
+ if ((split(x, f, "/") == 3) && (f[3] == "u"))
+ num_unknown++
+ }
+ close(extout)
+ if ((numrec > 0) && (num_unknown == numrec)) {
+ print "Notice: this filesystem does not appear to support file
type information" > "/dev/stderr"
+ ftype_unknown = 1
+ }
+}
+
{
ino = $1
name = $NF
@@ -5,5 +18,5 @@
if (type == "-")
type = "f"
- printf "%s/%s/%s\n", ino, name, type
+ printf "%s/%s/%s\n", ino, name, (ftype_unknown ? "u" : type)
}
-----------------------------------------------------------------------
Summary of changes:
test/ChangeLog | 9 +++++++++
test/Makefile.am | 3 +--
test/Makefile.in | 3 +--
test/readdir0.awk | 15 ++++++++++++++-
4 files changed, 25 insertions(+), 5 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, master, updated. edce216d276505437c9cc156f0db4fa586639d76,
Andrew J. Schorr <=