mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-12-27 08:49:16 +08:00
d62a9e623c
re: github issue https://github.com/Unidata/netcdf-c/issues/1111 One of the less common use cases for the in-memory feature is apparently failing with HDF5-1.10.x. The fix is complicated and requires significant changes to libhdf5/nc4memcb.c. The current setup is detailed in the file docs/inmeminternal.dox. Additionally, it was discovered that the program nc_test/tst_inmemory.c, which is invoked by nc_test/run_inmemory.sh, actually was failing because of the above problem. But the failure is not detected since the script does not return non-zero value. Other Changes: 1. Fix nc_test_tst_inmemory to return errors correctly. 2. Make ncdap_tests/findtestserver.c and dap4_tests/findtestserver4.c be generated from ncdap_test/findtestserver.c.in. 3. Make LOG() print output to stderr instead of stdout to avoid contaminating e.g. ncdump output. 4. Modify the handling of NC_INMEMORY and NC_DISKLESS flags to properly handle that NC_DISKLESS => NC_INMEMORY. This affects a number of code pieces, especially memio.c.
49 lines
1.0 KiB
Bash
Executable File
49 lines
1.0 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
|
|
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
|
|
. ../test_common.sh
|
|
|
|
set -e
|
|
|
|
# Get the target OS and CPU
|
|
CPU=`uname -p`
|
|
OS=`uname`
|
|
|
|
#Constants
|
|
FILE3=tst_inmemory3
|
|
CREATE3=tst_inmemory3_create
|
|
FILE4=tst_inmemory4
|
|
CREATE4=tst_inmemory4_create
|
|
|
|
# For tst_open_mem
|
|
OMEMFILE=f03tst_open_mem.nc
|
|
|
|
echo ""
|
|
echo "*** Testing in-memory operations"
|
|
|
|
HASNC4=`${top_builddir}/nc-config --has-nc4`
|
|
|
|
# Execute the core of the inmemory tests
|
|
${execdir}/tst_inmemory
|
|
exit
|
|
${execdir}/tst_open_mem ${srcdir}/${OMEMFILE}
|
|
|
|
echo "**** Test ncdump of the resulting inmemory data"
|
|
${NCDUMP} -n "${FILE3}" ${FILE3}.nc > ${FILE3}.cdl
|
|
${NCDUMP} -n "${FILE3}" ${CREATE3}.nc > ${CREATE3}.cdl
|
|
diff -wb ${FILE3}.cdl ${CREATE3}.cdl
|
|
|
|
if test "x$HASNC4" = "xyes" ; then
|
|
${NCDUMP} ${FILE4}.nc > ${FILE4}.cdl
|
|
${NCDUMP} ${CREATE4}.nc > ${CREATE4}.cdl
|
|
diff -wb ${FILE4}.cdl ${CREATE4}.cdl
|
|
|
|
# cleanup
|
|
rm -f ${FILE3}.nc ${FILE4}.nc ${CREATE3}.nc ${CREATE4}.nc
|
|
rm -f ${FILE3}.cdl ${FILE4}.cdl ${CREATE3}.cdl ${CREATE4}.cdl
|
|
|
|
echo "PASS: all inmemory tests"
|
|
|
|
exit 0
|