Lines Matching defs:fail
61 fail() {
63 echo FAIL: $testname
110 run_command $WORK_DIR/applypatch && fail
113 run_command $WORK_DIR/applypatch -l | grep -q -i copyright || fail
121 run_command $WORK_DIR/applypatch -c $WORK_DIR/old.file $OLD_SHA1 || fail
124 run_command $WORK_DIR/applypatch -c $WORK_DIR/old.file $BAD1_SHA1 $OLD_SHA1 $BAD2_SHA1|| fail
127 run_command $WORK_DIR/applypatch -c $WORK_DIR/old.file $BAD2_SHA1 $BAD1_SHA1 && fail
131 run_command dd if=/dev/urandom of=$WORK_DIR/old.file count=100 bs=1024 || fail
134 run_command $WORK_DIR/applypatch -c $WORK_DIR/old.file $OLD_SHA1 || fail
137 run_command $WORK_DIR/applypatch -c $WORK_DIR/old.file $BAD1_SHA1 $OLD_SHA1 $BAD2_SHA1|| fail
140 run_command $WORK_DIR/applypatch -c $WORK_DIR/old.file $BAD2_SHA1 $BAD1_SHA1 && fail
146 run_command $WORK_DIR/applypatch -c $WORK_DIR/old.file $OLD_SHA1 || fail
149 run_command $WORK_DIR/applypatch -c $WORK_DIR/old.file $BAD1_SHA1 $OLD_SHA1 $BAD2_SHA1|| fail
152 run_command $WORK_DIR/applypatch -c $WORK_DIR/old.file $BAD2_SHA1 $BAD1_SHA1 && fail
178 run_command $WORK_DIR/applypatch $WORK_DIR/old.file - $NEW_SHA1 $NEW_SIZE $BAD1_SHA1:$WORK_DIR/foo $OLD_SHA1:$WORK_DIR/patch.bsdiff || fail
180 diff -q $DATA_DIR/new.file $tmpdir/patched || fail
183 run_command $WORK_DIR/applypatch $WORK_DIR/old.file - $NEW_SHA1 $NEW_SIZE $BAD1_SHA1:$WORK_DIR/foo $OLD_SHA1:$WORK_DIR/patch.bsdiff || fail
185 diff -q $DATA_DIR/new.file $tmpdir/patched || fail
212 run_command $WORK_DIR/applypatch $WORK_DIR/old.file $WORK_DIR/new.file $NEW_SHA1 $NEW_SIZE $BAD1_SHA1:$WORK_DIR/foo $OLD_SHA1:$WORK_DIR/patch.bsdiff || fail
214 diff -q $DATA_DIR/new.file $tmpdir/patched || fail
217 run_command $WORK_DIR/applypatch $WORK_DIR/old.file $WORK_DIR/new.file $NEW_SHA1 $NEW_SIZE $BAD1_SHA1:$WORK_DIR/foo $OLD_SHA1:$WORK_DIR/patch.bsdiff || fail
219 diff -q $DATA_DIR/new.file $tmpdir/patched || fail
223 run_command dd if=/dev/urandom of=$WORK_DIR/old.file count=100 bs=1024 || fail
226 run_command $WORK_DIR/applypatch $WORK_DIR/old.file $WORK_DIR/new.file $NEW_SHA1 $NEW_SIZE $OLD_SHA1:$WORK_DIR/patch.bsdiff $BAD1_SHA1:$WORK_DIR/foo || fail
228 diff -q $DATA_DIR/new.file $tmpdir/patched || fail
231 run_command dd if=/dev/urandom of=$CACHE_TEMP_SOURCE count=100 bs=1024 || fail
235 run_command $WORK_DIR/applypatch $WORK_DIR/old.file $WORK_DIR/new.file $NEW_SHA1 $NEW_SIZE $OLD_SHA1:$WORK_DIR/patch.bsdiff $BAD1_SHA1:$WORK_DIR/foo && fail
238 run_command dd if=/dev/urandom of=$WORK_DIR/new.file count=100 bs=1024 || fail
241 run_command $WORK_DIR/applypatch $WORK_DIR/old.file $WORK_DIR/new.file $NEW_SHA1 $NEW_SIZE $OLD_SHA1:$WORK_DIR/patch.bsdiff $BAD1_SHA1:$WORK_DIR/foo && fail
250 echo run_command dd if=/dev/zero of=$WORK_DIR/bloat.dat count=$((free_kb-512)) bs=1024 || fail
251 run_command dd if=/dev/zero of=$WORK_DIR/bloat.dat count=$((free_kb-512)) bs=1024 || fail
256 run_command $WORK_DIR/applypatch $WORK_DIR/old.file - $NEW_SHA1 $NEW_SIZE $BAD1_SHA1:$WORK_DIR/foo $OLD_SHA1:$WORK_DIR/patch.bsdiff || fail
258 diff -q $DATA_DIR/new.file $tmpdir/patched || fail
261 run_command $WORK_DIR/applypatch $WORK_DIR/old.file - $NEW_SHA1 $NEW_SIZE $BAD1_SHA1:$WORK_DIR/foo $OLD_SHA1:$WORK_DIR/patch.bsdiff || fail
263 diff -q $DATA_DIR/new.file $tmpdir/patched || fail
281 run_command dd if=/dev/zero of=/cache/bloat_small.dat count=128 bs=1024 || fail
282 run_command dd if=/dev/zero of=/cache/bloat_large.dat count=$((free_kb-640)) bs=1024 || fail
290 # size check should fail even though it deletes some stuff
291 run_command $WORK_DIR/applypatch -s $NEW_SIZE && fail
292 run_command ls /cache/bloat_small.dat && fail # was deleted
293 run_command ls /cache/a.file && fail # was deleted
294 run_command ls /cache/recovery/otatest/b.file && fail # was deleted
295 run_command ls /cache/bloat_large.dat || fail # wasn't deleted because it was open
296 run_command ls /cache/subdir/a.file || fail # wasn't deleted because it's in a subdir
297 run_command ls $CACHE_TEMP_SOURCE || fail # wasn't deleted because it's the source file copy
299 # should fail; not enough files can be deleted
300 run_command $WORK_DIR/applypatch $WORK_DIR/old.file - $NEW_SHA1 $NEW_SIZE $BAD1_SHA1:$WORK_DIR/foo $OLD_SHA1:$WORK_DIR/patch.bsdiff && fail
301 run_command ls /cache/bloat_large.dat || fail # wasn't deleted because it was open
302 run_command ls /cache/subdir/a.file || fail # wasn't deleted because it's in a subdir
303 run_command ls $CACHE_TEMP_SOURCE || fail # wasn't deleted because it's the source file copy
310 run_command $WORK_DIR/applypatch -s $NEW_SIZE || fail
311 run_command ls /cache/bloat_large.dat && fail # was deleted
312 run_command ls /cache/subdir/a.file || fail # still wasn't deleted because it's in a subdir
313 run_command ls $CACHE_TEMP_SOURCE || fail # wasn't deleted because it's the source file copy
316 run_command $WORK_DIR/applypatch $WORK_DIR/old.file - $NEW_SHA1 $NEW_SIZE $BAD1_SHA1:$WORK_DIR/foo $OLD_SHA1:$WORK_DIR/patch.bsdiff || fail
318 diff -q $DATA_DIR/new.file $tmpdir/patched || fail
319 run_command ls /cache/subdir/a.file || fail # still wasn't deleted because it's in a subdir
320 run_command ls $CACHE_TEMP_SOURCE && fail # was deleted because patching overwrote it, then deleted it
326 run_command dd if=/dev/urandom of=$WORK_DIR/old.file count=100 bs=1024 || fail
329 run_command $WORK_DIR/applypatch $WORK_DIR/old.file - $NEW_SHA1 $NEW_SIZE $BAD1_SHA1:$WORK_DIR/foo $OLD_SHA1:$WORK_DIR/patch.bsdiff || fail
331 diff -q $DATA_DIR/new.file $tmpdir/patched || fail
338 run_command $WORK_DIR/applypatch $WORK_DIR/old.file - $NEW_SHA1 $NEW_SIZE $BAD1_SHA1:$WORK_DIR/foo $OLD_SHA1:$WORK_DIR/patch.bsdiff || fail
340 diff -q $DATA_DIR/new.file $tmpdir/patched || fail