|
2 | 2 | import sys
|
3 | 3 |
|
4 | 4 | # TODO: Add more commands to test here
|
5 |
| -libctest_baseline = """""" |
| 5 | +libctest_baseline = """ |
| 6 | +========== START entry-static.exe argv ========== |
| 7 | +Pass! |
| 8 | +========== END entry-static.exe argv ========== |
| 9 | +========== START entry-static.exe basename ========== |
| 10 | +Pass! |
| 11 | +========== END entry-static.exe basename ========== |
| 12 | +========== START entry-static.exe dirname ========== |
| 13 | +Pass! |
| 14 | +========== END entry-static.exe dirname ========== |
| 15 | +========== START entry-static.exe env ========== |
| 16 | +Pass! |
| 17 | +========== END entry-static.exe env ========== |
| 18 | +========== START entry-static.exe fdopen ========== |
| 19 | +Pass! |
| 20 | +========== END entry-static.exe fdopen ========== |
| 21 | +========== START entry-static.exe inet_pton ========== |
| 22 | +Pass! |
| 23 | +========== END entry-static.exe inet_pton ========== |
| 24 | +========== START entry-static.exe memstream ========== |
| 25 | +Pass! |
| 26 | +========== END entry-static.exe memstream ========== |
| 27 | +========== START entry-static.exe random ========== |
| 28 | +Pass! |
| 29 | +========== END entry-static.exe random ========== |
| 30 | +========== START entry-static.exe search_hsearch ========== |
| 31 | +Pass! |
| 32 | +========== END entry-static.exe search_hsearch ========== |
| 33 | +========== START entry-static.exe search_insque ========== |
| 34 | +Pass! |
| 35 | +========== END entry-static.exe search_insque ========== |
| 36 | +========== START entry-static.exe search_lsearch ========== |
| 37 | +Pass! |
| 38 | +========== END entry-static.exe search_lsearch ========== |
| 39 | +========== START entry-static.exe search_tsearch ========== |
| 40 | +Pass! |
| 41 | +========== END entry-static.exe search_tsearch ========== |
| 42 | +========== START entry-static.exe snprintf ========== |
| 43 | +Pass! |
| 44 | +========== END entry-static.exe snprintf ========== |
| 45 | +========== START entry-static.exe string ========== |
| 46 | +Pass! |
| 47 | +========== END entry-static.exe string ========== |
| 48 | +========== START entry-static.exe string_memcpy ========== |
| 49 | +Pass! |
| 50 | +========== END entry-static.exe string_memcpy ========== |
| 51 | +========== START entry-static.exe string_memmem ========== |
| 52 | +Pass! |
| 53 | +========== END entry-static.exe string_memmem ========== |
| 54 | +========== START entry-static.exe string_memset ========== |
| 55 | +Pass! |
| 56 | +========== END entry-static.exe string_memset ========== |
| 57 | +========== START entry-static.exe string_strchr ========== |
| 58 | +Pass! |
| 59 | +========== END entry-static.exe string_strchr ========== |
| 60 | +========== START entry-static.exe string_strcspn ========== |
| 61 | +Pass! |
| 62 | +========== END entry-static.exe string_strcspn ========== |
| 63 | +========== START entry-static.exe string_strstr ========== |
| 64 | +Pass! |
| 65 | +========== END entry-static.exe string_strstr ========== |
| 66 | +========== START entry-static.exe strptime ========== |
| 67 | +Pass! |
| 68 | +========== END entry-static.exe strptime ========== |
| 69 | +========== START entry-static.exe strtod ========== |
| 70 | +Pass! |
| 71 | +========== END entry-static.exe strtod ========== |
| 72 | +========== START entry-static.exe strtod_simple ========== |
| 73 | +Pass! |
| 74 | +========== END entry-static.exe strtod_simple ========== |
| 75 | +========== START entry-static.exe strtof ========== |
| 76 | +Pass! |
| 77 | +========== END entry-static.exe strtof ========== |
| 78 | +========== START entry-static.exe strtold ========== |
| 79 | +Pass! |
| 80 | +========== END entry-static.exe strtold ========== |
| 81 | +========== START entry-static.exe tgmath ========== |
| 82 | +Pass! |
| 83 | +========== END entry-static.exe tgmath ========== |
| 84 | +========== START entry-static.exe time ========== |
| 85 | +Pass! |
| 86 | +========== END entry-static.exe time ========== |
| 87 | +========== START entry-static.exe tls_align ========== |
| 88 | +Pass! |
| 89 | +========== END entry-static.exe tls_align ========== |
| 90 | +Pass! |
| 91 | +========== START entry-static.exe udiv ========== |
| 92 | +Pass! |
| 93 | +========== END entry-static.exe udiv ========== |
| 94 | +========== START entry-static.exe wcsstr ========== |
| 95 | +Pass! |
| 96 | +========== END entry-static.exe wcsstr ========== |
| 97 | +========== START entry-static.exe fgets_eof ========== |
| 98 | +Pass! |
| 99 | +========== END entry-static.exe fgets_eof ========== |
| 100 | +========== START entry-static.exe inet_ntop_v4mapped ========== |
| 101 | +Pass! |
| 102 | +========== END entry-static.exe inet_ntop_v4mapped ========== |
| 103 | +========== START entry-static.exe inet_pton_empty_last_field ========== |
| 104 | +Pass! |
| 105 | +========== END entry-static.exe inet_pton_empty_last_field ========== |
| 106 | +========== START entry-static.exe iswspace_null ========== |
| 107 | +Pass! |
| 108 | +========== END entry-static.exe iswspace_null ========== |
| 109 | +========== START entry-static.exe lrand48_signextend ========== |
| 110 | +Pass! |
| 111 | +========== END entry-static.exe lrand48_signextend ========== |
| 112 | +========== START entry-static.exe malloc_0 ========== |
| 113 | +Pass! |
| 114 | +========== END entry-static.exe malloc_0 ========== |
| 115 | +========== START entry-static.exe mbsrtowcs_overflow ========== |
| 116 | +Pass! |
| 117 | +========== END entry-static.exe mbsrtowcs_overflow ========== |
| 118 | +========== START entry-static.exe memmem_oob_read ========== |
| 119 | +Pass! |
| 120 | +========== END entry-static.exe memmem_oob_read ========== |
| 121 | +========== START entry-static.exe memmem_oob ========== |
| 122 | +Pass! |
| 123 | +========== END entry-static.exe memmem_oob ========== |
| 124 | +========== START entry-static.exe mkdtemp_failure ========== |
| 125 | +Pass! |
| 126 | +========== END entry-static.exe mkdtemp_failure ========== |
| 127 | +========== START entry-static.exe mkstemp_failure ========== |
| 128 | +Pass! |
| 129 | +========== END entry-static.exe mkstemp_failure ========== |
| 130 | +========== START entry-static.exe printf_1e9_oob ========== |
| 131 | +Pass! |
| 132 | +========== END entry-static.exe printf_1e9_oob ========== |
| 133 | +========== START entry-static.exe printf_fmt_g_round ========== |
| 134 | +Pass! |
| 135 | +========== END entry-static.exe printf_fmt_g_round ========== |
| 136 | +========== START entry-static.exe printf_fmt_g_zeros ========== |
| 137 | +Pass! |
| 138 | +========== END entry-static.exe printf_fmt_g_zeros ========== |
| 139 | +========== START entry-static.exe printf_fmt_n ========== |
| 140 | +Pass! |
| 141 | +========== END entry-static.exe printf_fmt_n ========== |
| 142 | +========== START entry-static.exe putenv_doublefree ========== |
| 143 | +Pass! |
| 144 | +========== END entry-static.exe putenv_doublefree ========== |
| 145 | +========== START entry-static.exe regex_backref_0 ========== |
| 146 | +Pass! |
| 147 | +========== END entry-static.exe regex_backref_0 ========== |
| 148 | +========== START entry-static.exe regex_bracket_icase ========== |
| 149 | +Pass! |
| 150 | +========== END entry-static.exe regex_bracket_icase ========== |
| 151 | +========== START entry-static.exe regex_negated_range ========== |
| 152 | +Pass! |
| 153 | +========== END entry-static.exe regex_negated_range ========== |
| 154 | +========== START entry-static.exe regexec_nosub ========== |
| 155 | +Pass! |
| 156 | +========== END entry-static.exe regexec_nosub ========== |
| 157 | +========== START entry-static.exe scanf_bytes_consumed ========== |
| 158 | +Pass! |
| 159 | +========== END entry-static.exe scanf_bytes_consumed ========== |
| 160 | +========== START entry-static.exe scanf_match_literal_eof ========== |
| 161 | +Pass! |
| 162 | +========== END entry-static.exe scanf_match_literal_eof ========== |
| 163 | +========== START entry-static.exe scanf_nullbyte_char ========== |
| 164 | +Pass! |
| 165 | +========== END entry-static.exe scanf_nullbyte_char ========== |
| 166 | +========== START entry-static.exe sigprocmask_internal ========== |
| 167 | +Pass! |
| 168 | +========== END entry-static.exe sigprocmask_internal ========== |
| 169 | +========== START entry-static.exe sscanf_eof ========== |
| 170 | +Pass! |
| 171 | +========== END entry-static.exe sscanf_eof ========== |
| 172 | +========== START entry-static.exe strverscmp ========== |
| 173 | +Pass! |
| 174 | +========== END entry-static.exe strverscmp ========== |
| 175 | +========== START entry-static.exe syscall_sign_extend ========== |
| 176 | +Pass! |
| 177 | +========== END entry-static.exe syscall_sign_extend ========== |
| 178 | +========== START entry-static.exe uselocale_0 ========== |
| 179 | +Pass! |
| 180 | +========== END entry-static.exe uselocale_0 ========== |
| 181 | +========== START entry-static.exe wcsncpy_read_overflow ========== |
| 182 | +Pass! |
| 183 | +========== END entry-static.exe wcsncpy_read_overflow ========== |
| 184 | +========== START entry-static.exe wcsstr_false_negative ========== |
| 185 | +Pass! |
| 186 | +========== END entry-static.exe wcsstr_false_negative ========== |
| 187 | +""" |
6 | 188 |
|
7 | 189 | def parse_libctest(output):
|
8 | 190 | ans = {}
|
9 | 191 | key = ""
|
10 | 192 | for line in output.split("\n"):
|
| 193 | + line = line.replace('\n', '').replace('\r', '') |
11 | 194 | if "START entry-static.exe" in line:
|
12 | 195 | key = "libctest static " + line.split(" ")[3]
|
13 | 196 | elif "START entry-dynamic.exe" in line:
|
|
0 commit comments