mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
added test that activates classic library bug
This commit is contained in:
parent
882b48f017
commit
8559e6f976
@ -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));
|
nc4_chunk_cache_size, nc4_chunk_cache_nelems, nc4_chunk_cache_preemption));
|
||||||
#endif /* USE_PARALLEL */
|
#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)
|
if (H5Pset_libver_bounds(fapl_id, H5F_LIBVER_18, H5F_LIBVER_18) < 0)
|
||||||
BAIL(NC_EHDFERR);
|
BAIL(NC_EHDFERR);
|
||||||
|
|
||||||
|
/* Create the property list. */
|
||||||
if ((fcpl_id = H5Pcreate(H5P_FILE_CREATE)) < 0)
|
if ((fcpl_id = H5Pcreate(H5P_FILE_CREATE)) < 0)
|
||||||
BAIL(NC_EHDFERR);
|
BAIL(NC_EHDFERR);
|
||||||
#ifdef EXTRA_TESTS
|
#ifdef EXTRA_TESTS
|
||||||
num_plists++;
|
num_plists++;
|
||||||
#endif
|
#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 |
|
if (H5Pset_link_creation_order(fcpl_id, (H5P_CRT_ORDER_TRACKED |
|
||||||
H5P_CRT_ORDER_INDEXED)) < 0)
|
H5P_CRT_ORDER_INDEXED)) < 0)
|
||||||
BAIL(NC_EHDFERR);
|
BAIL(NC_EHDFERR);
|
||||||
|
@ -16,6 +16,10 @@ tst_*.nc t_nc.nc large_files.nc quick_large_files.nc
|
|||||||
# These are the tests which are always run.
|
# These are the tests which are always run.
|
||||||
TESTPROGRAMS = t_nc tst_small nc_test tst_misc tst_norm tst_names
|
TESTPROGRAMS = t_nc tst_small nc_test tst_misc tst_norm tst_names
|
||||||
|
|
||||||
|
if EXTRA_TESTS
|
||||||
|
TESTPROGRAMS += tst_nofill
|
||||||
|
endif
|
||||||
|
|
||||||
if USE_NETCDF4
|
if USE_NETCDF4
|
||||||
TESTPROGRAMS += tst_atts
|
TESTPROGRAMS += tst_atts
|
||||||
endif
|
endif
|
||||||
|
@ -1,16 +1,29 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# This shell script runs the backward compatibility tests.
|
# 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
|
set -e
|
||||||
echo ""
|
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..."
|
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
|
./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 $srcdir/ref_nc_test_netcdf4.cdl > tmp.cdl
|
||||||
tail -n +2 tst_nc_test_netcdf4_4_0.cdl > tmp_4_0.cdl
|
tail -n +2 tst_nc_test_netcdf4_4_0.cdl > tmp_4_0.cdl
|
||||||
diff -w tmp.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!"
|
echo "*** All backward compatibility tests passed!"
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user