If the tools we use call older getdents syscalls where d_type isn't
passed back, or the arch is old (like Alpha) and can't pass back in
either version, make sure we don't fail.

* tests/getdents.awk (d_type_dir, d_type_reg): Accept DT_UNKNOWN.
---
 tests/getdents.awk | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/getdents.awk b/tests/getdents.awk
index f9dc64d..c230e26 100644
--- a/tests/getdents.awk
+++ b/tests/getdents.awk
@@ -11,8 +11,9 @@ BEGIN {
   d_name_1 = "d_name=\"\\.\""
   d_name_2 = "d_name=\"\\.\\.\""
   d_name_3 = "d_name=\"(A\\\\n){127}Z\""
-  d_type_dir = "d_type=DT_DIR"
-  d_type_reg = "d_type=DT_REG"
+  # Some older systems might not pass back d_type at all like Alpha.
+  d_type_dir = "d_type=DT_(DIR|UNKNOWN)"
+  d_type_reg = "d_type=DT_(REG|UNKNOWN)"
 
   dirent_1   = "\\{" d_ino ", " d_off ", " d_reclen ", " d_name_1 ", " 
d_type_dir "\\}"
   dirent_2   = "\\{" d_ino ", " d_off ", " d_reclen ", " d_name_2 ", " 
d_type_dir "\\}"
-- 
2.3.1


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to