"Fossies" - the Fresh Open Source Software Archive

Member "afio-2.5.2/regtest/regtest2gb" (30 Nov 2018, 944 Bytes) of package /linux/misc/afio-2.5.2.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/sh
    2 
    3 #set -x
    4 
    5 echo "Doing >2GB file support regression test"
    6 
    7 echo " * Testing on: `uname -a`"
    8 echo " * OS version: `cat -v /etc/issue`"
    9 echo " * gcc version: `gcc -v 2>&1`"
   10 echo " * Afio shared libraries: `ldd ../afio`"
   11 
   12 echo " * Test is done by making a 4.000001GB sparse file and trying to pack+verify it."
   13 
   14 rm -rf t
   15 mkdir t
   16 cd t
   17 echo bla bla bla >bla
   18 cp bla 4.1gb
   19 if ! ../makesparse 4.1gb; then
   20  cd ..
   21  ls -l t/*
   22  echo "2GB regression test FAILED, looks like no >2GB support in compiler and/or kernel"
   23  rm -rf t
   24  exit 1
   25 fi
   26 
   27 echo wox wox wox > wox
   28 echo wuxta wuxta wuxta >wuxta
   29 
   30 cd ..
   31 ls -l t/*
   32 echo "running afio -o | afio -r"
   33 
   34 if ! find t | ../afio -ozZf -L t.log -1C -s50g - | ../afio -rvzZ - ; then
   35  echo ">2GB regression test FAILED!"
   36  rm -rf t t.log
   37  exit 1
   38 else
   39  if grep ERROR t.log >/dev/null; then
   40   echo ">2GB regression test FAILED!"
   41   rm -rf t t.log
   42   exit 1
   43  else
   44   echo ">2GB regression test OK!"
   45   rm -rf t t.log
   46  fi
   47 fi