mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-12-21 08:39:46 +08:00
571cf6b933
ret: https://github.com/Unidata/netcdf-c/issues/1162 The test nc_test/run_diskless2.sh fails when LARGE_FILE_TESTS is enabled. Since the goal of the test was to test out diskless+persist on a reasonably large file, I fixed by just limiting the file size to 1000000000L bytes.
58 lines
992 B
Bash
Executable File
58 lines
992 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
|
|
. ../test_common.sh
|
|
|
|
set -e
|
|
|
|
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
|
|
. ../test_common.sh
|
|
|
|
# Get the target OS and CPU
|
|
CPU=`uname -p`
|
|
OS=`uname`
|
|
|
|
# Test diskless on a reasonably large file size
|
|
|
|
# Try a large in-memory file
|
|
SIZE=1000000000
|
|
|
|
FILE4=tst_diskless4.nc
|
|
|
|
# Uncomment to get timing
|
|
#TIME=time
|
|
|
|
# Create the reference ncdump output for tst_diskless4
|
|
rm -fr ref_tst_diskless4.cdl
|
|
cat >ref_tst_diskless4.cdl <<EOF
|
|
netcdf tst_diskless4 {
|
|
dimensions:
|
|
dim = 1000000000 ;
|
|
variables:
|
|
byte var0(dim) ;
|
|
}
|
|
EOF
|
|
|
|
echo ""
|
|
rm -f $FILE4
|
|
$TIME ./tst_diskless4 $SIZE create
|
|
# Validate it
|
|
${NCDUMP} -h $FILE4 |diff -w - ref_tst_diskless4.cdl
|
|
|
|
echo ""
|
|
rm -f $FILE4
|
|
$TIME ./tst_diskless4 $SIZE creatediskless
|
|
# Validate it
|
|
${NCDUMP} -h $FILE4 |diff -w - ref_tst_diskless4.cdl
|
|
|
|
echo ""
|
|
$TIME ./tst_diskless4 $SIZE open
|
|
|
|
echo ""
|
|
$TIME ./tst_diskless4 $SIZE opendiskless
|
|
|
|
# cleanup
|
|
rm -f $FILE4 tst_diskless4.cdl ref_tst_diskless4.cdl
|
|
|
|
exit
|