~daniel-mehrmann/e2fsprogs/master

« back to all changes in this revision

Viewing changes to tests/f_boundscheck/script

  • Committer: Package Import Robot
  • Author(s): Michael Vogt
  • Date: 2014-10-27 09:44:27 UTC
  • mfrom: (8.4.29 sid)
  • Revision ID: package-import@ubuntu.com-20141027094427-g56dce6sg7pasdgm
Tags: 1.42.12-1ubuntu1
* Merge from Debian unstable.  Remaining changes:
  - debian/rules:
      Block pkg-create-dbgsym from operating on this package.
      Build without dietlibc-dev, which is in universe 
      Use the autotools-dev dh addon to update config.guess/config.sub for new
      ports.
  - debian/control:
      Regenerate with ./debian/rules debian/control

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
FSCK_OPT=-fy
 
4
IMAGE=$test_dir/image.bz2
 
5
 
 
6
bzip2 -d < $IMAGE > $TMPFILE
 
7
#e2label $TMPFILE test_filesys
 
8
 
 
9
# Run fsck to fix things?
 
10
EXP1=$test_dir/expect.1
 
11
OUT1=$test_name.1.log
 
12
rm -rf $test_name.failed $test_name.ok
 
13
 
 
14
$FSCK $FSCK_OPT $TMPFILE 2>&1 | head -n 1000 | tail -n +2 > $OUT1
 
15
echo "Exit status is $?" >> $OUT1
 
16
 
 
17
# Run a second time
 
18
EXP2=$test_dir/expect.2
 
19
OUT2=$test_name.2.log
 
20
 
 
21
$FSCK $FSCK_OPT $TMPFILE 2>&1 | head -n 1000 | tail -n +2 > $OUT2
 
22
echo "Exit status is $?" >> $OUT2
 
23
 
 
24
# Figure out what happened
 
25
if cmp -s $EXP1 $OUT1 && cmp -s $EXP2 $OUT2; then
 
26
        echo "$test_name: $test_description: ok"
 
27
        touch $test_name.ok
 
28
else
 
29
        echo "$test_name: $test_description: failed"
 
30
        diff -u $EXP1 $OUT1 >> $test_name.failed
 
31
        diff -u $EXP2 $OUT2 >> $test_name.failed
 
32
fi