disable CDF5 tests when size_t is less than 8 bytes

This commit is contained in:
Wei-keng Liao 2017-09-16 17:35:52 -05:00
parent e67cbed81c
commit f7ee463119
3 changed files with 16 additions and 12 deletions

View File

@ -892,8 +892,8 @@ $SLEEPCMD
AC_CHECK_SIZEOF(size_t)
$SLEEPCMD
AC_CHECK_SIZEOF(unsigned long long)
$SLEEPCMD
AC_CHECK_SIZEOF(unsigned long long)
AM_CONDITIONAL(ENABLE_CDF5, [test "$ac_cv_sizeof_size_t" -ge "8"])
$SLEEPCMD
if test "$ac_cv_type_uchar" = yes ; then

View File

@ -15,9 +15,8 @@ CLEANFILES = nc_test_classic.nc nc_test_64bit.nc nc_test_netcdf4.nc \
tst_*.nc t_nc.nc large_files.nc quick_large_files.nc \
tst_diskless.nc tst_diskless2.nc \
tst_diskless3.nc tst_diskless3_file.cdl tst_diskless3_memory.cdl \
tst_diskless4.cdl tst_diskless4.nc tst_formatx.nc nc_test_cdf5.nc \
unlim.nc tst_inq_type.nc tst_elatefill.nc tst_global_fillval.nc \
tst_large_cdf5.nc tst_cdf5_begin.nc
tst_diskless4.cdl tst_diskless4.nc tst_formatx.nc \
unlim.nc tst_inq_type.nc tst_elatefill.nc tst_global_fillval.nc
check_PROGRAMS =
@ -46,7 +45,7 @@ AM_CPPFLAGS += -I$(top_builddir)/liblib -I$(top_builddir)/include -I$(top_srcdir
# If the user asked for large file tests, then add them.
if LARGE_FILE_TESTS
TESTPROGRAMS += quick_large_files tst_big_var6 tst_big_var2 \
tst_big_rvar tst_big_var tst_large large_files tst_large_cdf5 tst_cdf5_begin
tst_big_rvar tst_big_var tst_large large_files
endif # LARGE_FILE_TESTS
if BUILD_BENCHMARKS
@ -105,11 +104,16 @@ test_read.m4 test_write.m4
# ref_tst_diskless2.cdl is for diff comparison and to produce tst_diskless2.c
EXTRA_DIST += ref_tst_diskless2.cdl tst_diskless5.cdl CMakeLists.txt
# bad_cdf5_begin.nc is a CDF-5 file with bad variable starting file offsets.
# It is to be used by tst_open_cdf5.c to see if it can report NC_ENOTNC.
EXTRA_DIST += bad_cdf5_begin.nc run_cdf5.sh
TESTS += run_cdf5.sh
check_PROGRAMS += tst_open_cdf5
if ENABLE_CDF5
# bad_cdf5_begin.nc is a corrupted CDF-5 file with bad variable starting
# file offsets. It is to be used by tst_open_cdf5.c to check if it can
# detect and report error code NC_ENOTNC.
TESTS += run_cdf5.sh
check_PROGRAMS += tst_open_cdf5
TESTPROGRAMS += tst_large_cdf5 tst_cdf5_begin
CLEANFILES += nc_test_cdf5.nc tst_large_cdf5.nc tst_cdf5_begin.nc
endif
# Only clean these on maintainer-clean, because they require m4 to
# regenerate.

View File

@ -5,8 +5,8 @@
/* When using NetCDF 4.4.1 ad prior to create a CDF-5 file and defining a small
* variable after a big variable (> 2^32-3 bytes), the file starting offset of
* the small variable (and all variables defined after the big variable) is
* calculated incorrectly. This test program detects this big by checks the
* contents of the overlapped.
* calculated incorrectly. This test program detects this bug by checking the
* contents of the possible overlaps between the two variables.
*/
#define ERR {if(err!=NC_NOERR){printf("Error at line %d in %s: %s\n", __LINE__,__FILE__, nc_strerror(err));nerrs++;}}