The hash field for phony dimensions was not being set
(in nc4hdf.c). Also added test case (nc_test4/?).
Note that I searched for other similar failures and
did not find any, but I may have missed them.
This commit is contained in:
Dennis Heimbigner 2016-05-24 18:52:24 -06:00
parent 4d037a1f62
commit 8c1f8f57ee
7 changed files with 34 additions and 7 deletions

4
cf
View File

@ -1,11 +1,11 @@
#!/bin/bash
#NB=1
DB=1
#DB=1
#X=-x
#FAST=1
HDF5=1
#DAP=1
DAP=1
#PNETCDF=1
#PAR4=1

View File

@ -1,4 +1,4 @@
# -*- Autoconf -*-
M# -*- Autoconf -*-
## Process this file with autoconf to produce a configure script.
# This is part of Unidata's netCDF package. Copyright 2005-2012, see
@ -799,8 +799,7 @@ test "x$enable_diskless" = xno || enable_diskless=yes
AC_MSG_RESULT($enable_diskless)
# Check for enable DAP
if test "x$enable_dap" = "xyes"; then
enable_diskless=yes
if test "x$enable_dap" = "xyes" -a "xenable_diskless" = xno ; then
AC_MSG_NOTICE([--enable-dap requires --enable-diskless])
AC_MSG_NOTICE([dap support disabled])
fi

View File

@ -3710,6 +3710,7 @@ nc4_rec_match_dimscales(NC_GRP_INFO_T *grp)
return NC_ENOMEM;
}
dim->len = h5dimlen[d];
dim->hash = hash_fast(phony_dim_name, strlen(phony_dim_name));
if (h5dimlenmax[d] == H5S_UNLIMITED)
dim->unlimited = NC_TRUE;
}

View File

@ -22,6 +22,7 @@ add_sh_test(nc_test4 run_grp_rename)
BUILD_BIN_TEST(tst_empty_vlen_unlim)
ADD_SH_TEST(nc_test4 run_empty_vlen_test)
ADD_SH_TEST(nc_test4 tst_misc.sh)
IF(NOT MSVC)
SET(NC4_TESTS ${NC4_TESTS} tst_interops5 tst_camrun)

View File

@ -33,7 +33,7 @@ endif
TESTS = $(NC4_TESTS)
TESTS += run_grp_rename.sh run_empty_vlen_test.sh
TESTS += run_grp_rename.sh run_empty_vlen_test.sh tst_misc.sh
# If the v2 API was built, add its test program.
if BUILD_V2
@ -125,7 +125,7 @@ run_grp_rename.sh tst_formatx_hdf4.sh \
run_chunk_hdf4.sh contiguous.hdf4 chunked.hdf4 \
tst_h5_endians.c tst_h4_lendian.c tst_atts_string_rewrite.c \
tst_put_vars_two_unlim_dim.c tst_empty_vlen_unlim.c run_empty_vlen_test.sh \
ref_hdf5_compat1.nc ref_hdf5_compat2.nc ref_hdf5_compat3.nc
ref_hdf5_compat1.nc ref_hdf5_compat2.nc ref_hdf5_compat3.nc tst_misc.sh tdset.h5
CLEANFILES = tst_mpi_parallel.bin cdm_sea_soundings.nc bm_chunking.nc \
bm_radar.nc bm_radar1.nc radar_3d_compression_test.txt \

BIN
nc_test4/tdset.h5 Normal file

Binary file not shown.

26
nc_test4/tst_misc.sh Normal file
View File

@ -0,0 +1,26 @@
#!/bin/sh
if test "x$builddir" = "x"; then builddir=`pwd`; fi
if test "x$srcdir" = "x"; then srcdir=`dirname $0`; fi
# Make buildir absolute
cd $builddir
builddir=`pwd`
set -e
echo "*** Testing phony dimension creation on pure h5 file"
rm -f ./tmp
if ../ncdump/ncdump -K ${srcdir}/tdset.h5 >./tmp ; then
echo "*** Pass: phony dimension creation"
ECODE=0
else
echo "*** Fail: phony dimension creation"
ECODE=1
fi
rm -f tmp
exit $ECODE