1BEGIN { 2 i = "[0-9]+" 3 len = "[1-9]" i 4 5 d_ino = "d_ino=" i 6 d_off = "d_off=" i 7 d_reclen = "d_reclen=" len 8 d_name_1 = "d_name=\"\\.\"" 9 d_name_2 = "d_name=\"\\.\\.\"" 10 d_name_3 = "d_name=\"(A\\\\n){127}Z\"" 11 # Some older systems might not pass back d_type at all like Alpha. 12 d_type_dir = "d_type=DT_(DIR|UNKNOWN)" 13 d_type_reg = "d_type=DT_(REG|UNKNOWN)" 14 15 dirent_1 = "\\{" d_ino ", " d_off ", " d_reclen ", " d_name_1 ", " d_type_dir "\\}" 16 dirent_2 = "\\{" d_ino ", " d_off ", " d_reclen ", " d_name_2 ", " d_type_dir "\\}" 17 dirent_3 = "\\{" d_ino ", " d_off ", " d_reclen ", " d_name_3 ", " d_type_reg "\\}" 18 19 dirent64_1 = "\\{" d_ino ", " d_off ", " d_reclen ", " d_type_dir ", " d_name_1 "\\}" 20 dirent64_2 = "\\{" d_ino ", " d_off ", " d_reclen ", " d_type_dir ", " d_name_2 "\\}" 21 dirent64_3 = "\\{" d_ino ", " d_off ", " d_reclen ", " d_type_reg ", " d_name_3 "\\}" 22 23 d_123 = dirent_1 " " dirent_2 " " dirent_3 24 d_213 = dirent_2 " " dirent_1 " " dirent_3 25 d_132 = dirent_1 " " dirent_3 " " dirent_2 26 d_321 = dirent_3 " " dirent_2 " " dirent_1 27 d_231 = dirent_2 " " dirent_3 " " dirent_1 28 d_312 = dirent_3 " " dirent_1 " " dirent_2 29 30 d64_123 = dirent64_1 " " dirent64_2 " " dirent64_3 31 d64_213 = dirent64_2 " " dirent64_1 " " dirent64_3 32 d64_132 = dirent64_1 " " dirent64_3 " " dirent64_2 33 d64_321 = dirent64_3 " " dirent64_2 " " dirent64_1 34 d64_231 = dirent64_2 " " dirent64_3 " " dirent64_1 35 d64_312 = dirent64_3 " " dirent64_1 " " dirent64_2 36 37 dents = "\\{(" d_123 "|" d_213 "|" d_132 "|" d_321 "|" d_231 "|" d_312 ")\\}" 38 dents64 = "\\{(" d64_123 "|" d64_213 "|" d64_132 "|" d64_321 "|" d64_231 "|" d64_312 ")\\}" 39 40 getdents = "getdents\\(" i ", " dents ", " len "\\)" 41 getdents64 = "getdents64\\(" i ", " dents64 ", " len "\\)" 42 43 r[1] = "^(" getdents "|" getdents64 ") += " len "$" 44 r[2] = "^getdents(64)?\\([0-9]+, \\{\\}, [1-9][0-9]+\\) += 0$" 45 s[3] = "+++ exited with 0 +++" 46 47 lines = 3 48 fail = 0 49} 50 51@include "match.awk" 52