File: regtest2gb

package info (click to toggle)
afio 2.5-5
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 616 kB
  • ctags: 475
  • sloc: ansic: 4,678; sh: 535; makefile: 127; awk: 19
file content (47 lines) | stat: -rw-r--r-- 944 bytes parent folder | download | duplicates (7)
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
#!/bin/sh

#set -x

echo "Doing >2GB file support regression test"

echo " * Testing on: `uname -a`"
echo " * OS version: `cat -v /etc/issue`"
echo " * gcc version: `gcc -v 2>&1`"
echo " * Afio shared libraries: `ldd ../afio`"

echo " * Test is done by making a 4.000001GB sparse file and trying to pack+verify it."

rm -rf t
mkdir t
cd t
echo bla bla bla >bla
cp bla 4.1gb
if ! ../makesparse 4.1gb; then
 cd ..
 ls -l t/*
 echo "2GB regression test FAILED, looks like no >2GB support in compiler and/or kernel"
 rm -rf t
 exit 1
fi

echo wox wox wox > wox
echo wuxta wuxta wuxta >wuxta

cd ..
ls -l t/*
echo "running afio -o | afio -r"

if ! find t | ../afio -ozZf -L t.log -1C -s50g - | ../afio -rvzZ - ; then
 echo ">2GB regression test FAILED!"
 rm -rf t t.log
 exit 1
else
 if grep ERROR t.log >/dev/null; then
  echo ">2GB regression test FAILED!"
  rm -rf t t.log
  exit 1
 else
  echo ">2GB regression test OK!"
  rm -rf t t.log
 fi
fi