-
Notifications
You must be signed in to change notification settings - Fork 3
/
c-junk.m4
226 lines (203 loc) · 4.3 KB
/
c-junk.m4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
# Corrupted cpio files. -*- shell-script -*-
AT_SETUP(cpio usual formats with small corruption)
dnl ----------------------------------------
PREPARE(mix, list-mix, minijunk, cpio-def, cpio-oldc, cpio-newc)
mkdir unmix
AT_CHECK(
[cd unmix
cat ../minijunk ../cpio-def | cpio -idm || exit 1
cd ..
VERIFY_EXACT
CPIO_FILTER
], , ,
[cpio: warning: skipped 5 bytes of junk
NN blocks
])
AT_CHECK(
[cd unmix
cat ../minijunk ../cpio-oldc | cpio -idum -c || exit 1
cd ..
VERIFY_EXACT
CPIO_FILTER
], , ,
[cpio: warning: skipped 5 bytes of junk
NN blocks
])
AT_CHECK(
[cd unmix
cat ../minijunk ../cpio-oldc | cpio -idum || exit 1
cd ..
VERIFY_EXACT
CPIO_FILTER
], , ,
[cpio: warning: skipped 5 bytes of junk
NN blocks
])
dnl FIXME!
dnl AT_CHECK(
dnl [cd unmix
dnl cat ../minijunk ../cpio-newc | cpio -idum -H newc || exit 1
dnl cd ..
dnl VERIFY_EXACT
dnl CPIO_FILTER
dnl ], , ,
dnl [cpio: warning: skipped 5 bytes of junk
dnl NN blocks
dnl ])
AT_CHECK(
[cd unmix
cat ../minijunk ../cpio-oldc | cpio -idum || exit 1
cd ..
VERIFY_EXACT
CPIO_FILTER
], , ,
[cpio: warning: skipped 5 bytes of junk
NN blocks
])
AT_CLEANUP($cleanup unmix)
dnl AT_SETUP(cpio usual formats with bigger corruption)
dnl dnl -----------------------------------------
dnl
dnl PREPARE(mix, list-mix, maxijunk, cpio-oldc)
dnl mkdir unmix
dnl
dnl FIXME!
dnl AT_CHECK(
dnl [cd unmix
dnl cat ../maxijunk ../cpio-oldc | cpio -idm -H newc || exit 1
dnl cd ..
dnl VERIFY_EXACT
dnl CPIO_FILTER
dnl ], , ,
dnl [cpio: warning: skipped 1248 bytes of junk
dnl NN blocks
dnl ])
dnl
dnl FIXME!
dnl AT_CHECK(
dnl [cd unmix
dnl cat ../maxijunk ../cpio-oldc | cpio -idum || exit 1
dnl cd ..
dnl VERIFY_EXACT
dnl CPIO_FILTER
dnl ], , ,
dnl [cpio: warning: skipped 1248 bytes of junk
dnl NN blocks
dnl ])
dnl
dnl AT_CLEANUP($cleanup unmix)
dnl AT_SETUP(cpio CRC format with corruption)
dnl dnl -------------------------------
dnl
dnl PREPARE(mix, list-mix, cpio-crc)
dnl mkdir unmix
dnl
dnl FIXME!
dnl AT_CHECK(
dnl [cd unmix
dnl cat ../minijunk ../cpio-crc | cpio -idmH crc || exit 1
dnl cd ..
dnl VERIFY_EXACT
dnl CPIO_FILTER
dnl ], , ,
dnl [cpio: warning: skipped 5 bytes of junk
dnl NN blocks
dnl ])
dnl
dnl FIXME!
dnl AT_CHECK(
dnl [cd unmix
dnl cat ../minijunk ../cpio-crc | cpio -idum || exit 1
dnl VERIFY_EXACT
dnl CPIO_FILTER
dnl ], , ,
dnl [cpio: warning: skipped 5 bytes of junk
dnl NN blocks
dnl ])
dnl
dnl AT_CLEANUP($cleanup unmix)
AT_SETUP(cpio tar format with corruption)
dnl -------------------------------
PREPARE(mix, list-mix, cpio-tar)
mkdir unmix
AT_CHECK(
[TIME=`echotime`
cd unmix
cat ../minijunk ../cpio-tar | cpio -idH tar || exit 1
cd ..
dnl cat list-mix | fgrep -v -x -f extra1 | \
dnl verify -list -match-dir unmix -mode-match -uid-match -gid-match -size-match -contents-match -mtime-le $TIME | fgrep -v -x -f extra2
VERIFY_NEWER_FILTERED
CPIO_FILTER
], , ,
[cpio: invalid header: checksum error
cpio: warning: skipped 5 bytes of junk
NN blocks
])
AT_CHECK(
[TIME=`echotime`
cd unmix
cat ../minijunk ../cpio-tar | cpio -idu || exit 1
cd ..
dnl cat list-mix | fgrep -v -x -f extra1 | \
dnl verify -list -match-dir unmix -mode-match -uid-match -gid-match -size-match -contents-match -mtime-le $TIME | fgrep -v -x -f extra2
VERIFY_NEWER_FILTERED
CPIO_FILTER
], , ,
[cpio: warning: skipped 5 bytes of junk
NN blocks
])
AT_CLEANUP($cleanup unmix)
AT_SETUP(cpio ustar format with corruption)
dnl ---------------------------------
PREPARE(mix, list-mix, minijunk, maxijunk, cpio-ustar)
mkdir unmix
AT_CHECK(
[TIME=`echotime`
cd unmix
cat ../minijunk ../cpio-ustar | cpio -idH ustar || exit 1
cd ..
VERIFY_NEWER
CPIO_FILTER
], , ,
[cpio: invalid header: checksum error
cpio: warning: skipped 5 bytes of junk
NN blocks
])
AT_CHECK(
[TIME=`echotime`
cd unmix
cat ../minijunk ../cpio-ustar | cpio -idu || exit 1
cd ..
VERIFY_NEWER
CPIO_FILTER
], , ,
[cpio: warning: skipped 5 bytes of junk
NN blocks
])
rm -rf unmix
mkdir unmix
AT_CHECK(
[TIME=`echotime`
cd unmix
cat ../maxijunk ../cpio-ustar | cpio -idH ustar || exit 1
cd ..
VERIFY_NEWER
CPIO_FILTER
], , ,
[cpio: invalid header: checksum error
cpio: warning: skipped 1248 bytes of junk
NN blocks
])
AT_CHECK(
[TIME=`echotime`
cd unmix
cat ../maxijunk ../cpio-ustar | cpio -idu || exit 1
cd ..
VERIFY_NEWER
CPIO_FILTER
], , ,
[cpio: warning: skipped 1248 bytes of junk
NN blocks
])
AT_CLEANUP($cleanup unmix)