Merge pull request #1930 from DennisHeimbigner/unmismatch.dmh

Make fillmismatch the default for DAP2 and DAP4
This commit is contained in:
Ward Fisher 2021-01-08 16:07:25 -07:00 committed by GitHub
commit af8fd51a37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 18 deletions

View File

@ -7,6 +7,7 @@ This file contains a high-level description of this package's evolution. Release
## 4.8.0 - TBD
* [Bug Fixes] Make fillmismatch the default for DAP2 and DAP4; too many servers ignore this requirement.
* [Bug Fixes] Fix some memory leaks in NCZarr, fix a bug with long strides in NCZarr. See [Github #1913](https://github.com/Unidata/netcdf-c/pull/1913) for more information.
* [Enhancement] Add some optimizations to NCZarr, dosome cleanup of code cruft, add some NCZarr test cases, add a performance test to NCZarr. See [Github #1908](https://github.com/Unidata/netcdf-c/pull/1908) for more information.
* [Bug Fix] Implement a better chunk cache system for NCZarr. The cache now uses extendible hashing plus a linked list for provide a combination of expandibility, fast access, and LRU behavior. See [Github #1887](https://github.com/Unidata/netcdf-c/pull/1887) for more information.

View File

@ -3,9 +3,10 @@
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
. ../test_common.sh
set -e
. ${srcdir}/d4test_common.sh
set -e
echo "test_fillmismatch.sh:"
F="test_fillmismatch.nc"
@ -13,17 +14,17 @@ F="test_fillmismatch.nc"
URL='[dap4]file://'
URL="${URL}${srcdir}/misctestfiles/$F"
# First check that without [fillmismatch], we get a failure
# First check that with [nofillmismatch], we get a failure
rm -f ./tmp_dap4_mismatch
if ${NCDUMP} -h "${URL}" > ./tmp_dap4_mismatch 2>&1 ; then
echo "*** Fail: ${NCDUMP} ${URL} passed"
URLNO="[nofillmismatch]$URL"
if ${NCDUMP} -h "${NOURL}" > ./tmp_dap4_mismatch 2>&1 ; then
echo "*** Fail: ${NCDUMP} ${NOURL} passed"
exit 1
else
echo "*** XFail: ${NCDUMP} ${URL} failed"
echo "*** XFail: ${NCDUMP} ${NOURL} failed"
fi
# Now check that with [fillmismatch], we get success
URL="[fillmismatch]${URL}"
# Now check that with [fillmismatch] (default), we get success
rm -f ./tmp_dap4_mismatch
if ${NCDUMP} -h "${URL}" > ./tmp_dap4_mismatch ; then
echo "*** Pass: ${NCDUMP} ${URL} passed"
@ -36,4 +37,3 @@ fi
diff -w ${srcdir}/baselineraw/$F.dmp ./tmp_dap4_mismatch
#cleanup
rm -f ./tmp_dap4_mismatch
exit

View File

@ -43,7 +43,7 @@ typedef unsigned int NCFLAGS;
#define NCF_COLUMBIA (0x80000000) /* Hack for columbia server */
/* Define all the default on flags */
#define DFALT_ON_FLAGS (NCF_CACHE|NCF_PREFETCH)
#define DFALT_ON_FLAGS (NCF_CACHE|NCF_PREFETCH|NCF_FILLMISMATCH)
typedef struct NCCONTROLS {
NCFLAGS flags;

View File

@ -819,13 +819,13 @@ fprintf(stderr,"\n");
if(val) free(val);
nclistpush(unsignedatt->values,strdup("false"));
} else if(att->etype != var->etype) {/* other mismatches */
/* Log a message */
nclog(NCLOGWARN,"_FillValue/Variable type mismatch: variable=%s",var->ncbasename);
/* See if mismatch is allowed */
if(FLAGSET(dapcomm->controls,NCF_FILLMISMATCH)) {
/* Forcibly change the attribute type to match */
att->etype = var->etype;
} else {
/* Log a message */
nclog(NCLOGWARN,"_FillValue/Variable type mismatch: variable=%s",var->ncbasename);
ncstat = NC_EBADTYPE; /* fail */
goto done;
}

View File

@ -5,23 +5,25 @@
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
. ../test_common.sh
set -e
F="fillmismatch.nc"
EXPECTED="${srcdir}/expected3"
URL='file://'
URL="${URL}${srcdir}/testdata3/$F"
# First check that without [fillmismatch], we get a failure
# First check that with [nofillmismatch], we get a failure
rm -f ./tmp_tst_mismatch
if ${NCDUMP} "${URL}" > ./tmp_tst_mismatch 2>&1 ; then
echo "*** Fail: ${NCDUMP} ${URL} passed"
NOURL="[nofillmismatch]$URL"
if ${NCDUMP} "${NOURL}" > ./tmp_tst_mismatch 2>&1 ; then
echo "*** Fail: ${NCDUMP} ${NOURL} passed"
exit 1
else
echo "*** XFail: ${NCDUMP} ${URL} failed"
echo "*** XFail: ${NCDUMP} ${NOURL} failed"
fi
# Now check that with [fillmismatch], we get success
URL="[fillmismatch]${URL}"
# Now check that with [fillmismatch] (default), we get success
rm -f ./tmp_tst_mismatch
if ${NCDUMP} "${URL}" > ./tmp_tst_mismatch ; then
echo "*** Pass: ${NCDUMP} ${URL} passed"
@ -34,4 +36,4 @@ fi
diff -w ${EXPECTED}/$F.dmp ./tmp_tst_mismatch
#cleanup
rm -f ./tmp_tst_mismatch
exit