/[cvs]/ccvs/src/sanity.sh
ViewVC logotype

Diff of /ccvs/src/sanity.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1095 by dprice, Wed Oct 5 02:40:05 2005 UTC revision 1.1096 by dprice, Fri Oct 28 15:10:02 2005 UTC
# Line 1735  if test x"$*" = x; then Line 1735  if test x"$*" = x; then
1735          tests="${tests} ignore ignore-on-branch binfiles binfiles2 binfiles3"          tests="${tests} ignore ignore-on-branch binfiles binfiles2 binfiles3"
1736          tests="${tests} mcopy binwrap binwrap2"          tests="${tests} mcopy binwrap binwrap2"
1737          tests="${tests} binwrap3 mwrap info taginfo posttag"          tests="${tests} binwrap3 mwrap info taginfo posttag"
1738          tests="$tests config config2 config3 config4"          tests="$tests config config2 config3 config4 compression"
1739          tests="${tests} serverpatch log log2 logopt ann ann-id"          tests="${tests} serverpatch log log2 logopt ann ann-id"
1740          # Repository Storage (RCS file format, CVS lock files, creating          # Repository Storage (RCS file format, CVS lock files, creating
1741          # a repository without "cvs init", &c).          # a repository without "cvs init", &c).
# Line 20440  $SPROG commit: Rebuilding administrative Line 20440  $SPROG commit: Rebuilding administrative
20440            ;;            ;;
20441    
20442    
20443    
20444            compression)
20445              # Try to reproduce some old compression buffer problems.
20446    
20447              # No point in testing compression effects in local mode.
20448              if $remote; then :; else
20449                remoteonly config2
20450                continue
20451              fi
20452    
20453              mkdir compression; cd compression
20454              dotest compression-init1 "$testcvs -z6 -Q co -l -d toplevel ."
20455              cd toplevel
20456              mkdir compression
20457              dotest compression-init2 "$testcvs -z6 -Q add compression"
20458              cd ..
20459    
20460              dotest compression-init3 "$testcvs -z6 -q co compression"
20461              cd compression
20462    
20463              # Want a big file
20464              cat >big_file <<EOF
20465    a lot of data on a line to make a really big file once it is copied, copied,
20466    copied, the digital equivalent of a mile.
20467    EOF
20468              for a in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16; do
20469                cat big_file >>tmp
20470                cat big_file >>tmp
20471                mv tmp big_file
20472              done
20473    
20474              dotest compression-1 "$testcvs -z6 -Q add big_file"
20475    
20476              # The following command hung due to a bug in CVS 1.12.13.  This was
20477              # because the command that grabbed more data to uncompress from the
20478              # underlying buffer in zlib.c:compress_buffer_input would try to read
20479              # the amount of data actually needed by the caller, even though this
20480              # should be shorter in the underlying buffer (since it is
20481              # compressed).  e.g., if the caller wanted 5 bytes, there may only be
20482              # 3 bytes in the underlying buffer though it will uncompress to 5
20483              # bytes, and a blocking read looking for 5 bytes will block
20484              # indefinitely since the data will never become available.
20485              #
20486              # The only odd thing is that it worked at all, sometimes.  For
20487              # example, I needed big_file to be at least 1MB in size to reproduce
20488              # this here (for a in 1..14 - I used 1..16 just for good measure).
20489              # My guess is that this has something to do with the amount the file
20490              # gets compressed and how much other data preceded it in the data
20491              # stream - the current buffer read will read as much data as is
20492              # available, up to the system page size, in blocking or nonblocking
20493              # modes.  So, when the compressed data is much less than the system
20494              # page size, it is cached in full from previous reads and the
20495              # blocking read request for more than the available data is never
20496              # made.  The smallest file I could reproduce this with above
20497              # compressed to just under 7k, on a system with a 4k page size.  In
20498              # this case, the call to compress_buffer_input decompressed all the
20499              # available buffered data, causing a read request for maybe half a
20500              # megabyte, with only 3k left to read, and the server blocked
20501              # waiting for the nonexistent data.  The same could happen with a
20502              # smaller file if its compressed data happened to cross a page
20503              # boundry or if timing issues caused a similar effect.
20504              dotest compression-2 "$testcvs -z6 -q ci -mForce-zerror." \
20505    "$CVSROOT_DIRNAME/compression/big_file,v  <--  big_file
20506    initial revision: 1\.1"
20507    
20508              dokeep
20509              cd ../..
20510              rm -r compression
20511              modify_repo rm -rf $CVSROOT_DIRNAME/compression
20512              ;;
20513    
20514    
20515    
20516          serverpatch)          serverpatch)
20517            # Test remote CVS handling of unpatchable files.  This isn't            # Test remote CVS handling of unpatchable files.  This isn't

Legend:
Removed from v.1.1095  
changed lines
  Added in v.1.1096

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26