added test that activates classic library bug

This commit is contained in:
Ed Hartnett 2011-04-25 17:09:14 +00:00
parent 882b48f017
commit 8559e6f976
3 changed files with 26 additions and 6 deletions

View File

@ -269,16 +269,19 @@ nc4_create_file(const char *path, int cmode, MPI_Comm comm, MPI_Info info,
nc4_chunk_cache_size, nc4_chunk_cache_nelems, nc4_chunk_cache_preemption));
#endif /* USE_PARALLEL */
/* Set latest_format in access propertly list and
* H5P_CRT_ORDER_TRACKED in the creation property list. This turns
* on HDF5 creation ordering. */
if (H5Pset_libver_bounds(fapl_id, H5F_LIBVER_18, H5F_LIBVER_18) < 0)
BAIL(NC_EHDFERR);
/* Create the property list. */
if ((fcpl_id = H5Pcreate(H5P_FILE_CREATE)) < 0)
BAIL(NC_EHDFERR);
#ifdef EXTRA_TESTS
num_plists++;
#endif
/* Set latest_format in access propertly list and
* H5P_CRT_ORDER_TRACKED in the creation property list. This turns
* on HDF5 creation ordering. */
if (H5Pset_link_creation_order(fcpl_id, (H5P_CRT_ORDER_TRACKED |
H5P_CRT_ORDER_INDEXED)) < 0)
BAIL(NC_EHDFERR);

View File

@ -16,6 +16,10 @@ tst_*.nc t_nc.nc large_files.nc quick_large_files.nc
# These are the tests which are always run.
TESTPROGRAMS = t_nc tst_small nc_test tst_misc tst_norm tst_names
if EXTRA_TESTS
TESTPROGRAMS += tst_nofill
endif
if USE_NETCDF4
TESTPROGRAMS += tst_atts
endif

View File

@ -1,16 +1,29 @@
#!/bin/sh
# This shell script runs the backward compatibility tests.
# $Id: run_back_comp_tests.sh,v 1.1 2010/03/09 00:23:44 ed Exp $
set -e
echo ""
echo "*** Testing backward compatibility."
echo "*** Testing that this version can read data produced by old versions of netCDF."
echo "*** checking ref_nc_test_netcdf4_4_0.nc..."
./ncdump $srcdir/ref_nc_test_netcdf4_4_0.nc > tst_nc_test_netcdf4_4_0.cdl
tail -n +2 $srcdir/ref_nc_test_netcdf4.cdl > tmp.cdl
tail -n +2 tst_nc_test_netcdf4_4_0.cdl > tmp_4_0.cdl
diff -w tmp.cdl tmp_4_0.cdl
echo "*** Testing that old versions can read data produced by this version of netCDF."
echo "*** checking version 4.0..."
../ncgen/ncgen -b -o tst_nc_test_netcdf4 -k 4 $srcdir/ref_nc_test_netcdf4.cdl
/machine/local_4.0/bin/ncdump tst_nc_test_netcdf4.nc > tst_nc_test_netcdf4.cdl
tail -n +2 $srcdir/ref_nc_test_netcdf4.cdl > tmp.cdl
tail -n +2 tst_nc_test_netcdf4.cdl > tmp_4_0.cdl
diff -w tmp.cdl tmp_4_0.cdl
echo "*** checking version 4.1.1..."
../ncgen/ncgen -b -o tst_nc_test_netcdf4 -k 4 $srcdir/ref_nc_test_netcdf4.cdl
/machine/local_4.1.1/bin/ncdump tst_nc_test_netcdf4.nc > tst_nc_test_netcdf4.cdl
tail -n +2 $srcdir/ref_nc_test_netcdf4.cdl > tmp.cdl
tail -n +2 tst_nc_test_netcdf4.cdl > tmp_4_0.cdl
diff -w tmp.cdl tmp_4_0.cdl
echo "*** All backward compatibility tests passed!"
exit 0