Skip to content

Commit

Permalink
Merge branch 'master' into newhash1.dmh
Browse files Browse the repository at this point in the history
  • Loading branch information
WardF committed Mar 5, 2018
2 parents 686304e + 04be884 commit c359a0e
Show file tree
Hide file tree
Showing 19 changed files with 43 additions and 311 deletions.
17 changes: 0 additions & 17 deletions configure.ac
Expand Up @@ -171,14 +171,6 @@ if test "x$enable_jna" = xyes ; then
AC_DEFINE([JNA], [1], [if true, include jna bug workaround code])
fi

# Does the user want to run extra tests with valgrind?
AC_MSG_CHECKING([whether extra valgrind tests should be run])
AC_ARG_ENABLE([valgrind-tests],
[AS_HELP_STRING([--enable-valgrind-tests],
[build with valgrind-tests (valgrind is required, static builds only)])])
test "x$enable_valgrind_tests" = xyes || enable_valgrind_tests=no
AC_MSG_RESULT($enable_valgrind_tests)

# Does the user want to build netcdf-4?
AC_MSG_CHECKING([whether we should build netCDF-4])
AC_ARG_ENABLE([netcdf-4], [AS_HELP_STRING([--disable-netcdf-4],
Expand Down Expand Up @@ -669,14 +661,6 @@ AC_MSG_NOTICE([setting up libtool])
LT_PREREQ([2.2])
LT_INIT()

# Valgrind tests don't work with shared builds because of some libtool
# weirdness.
if test "x$enable_shared" = xyes; then
if test $enable_valgrind_tests = yes; then
AC_MSG_ERROR([No valgrind tests with shared libraries])
fi
fi

AC_MSG_NOTICE([finding other utilities])

# Is m4 installed? If not, bail.
Expand Down Expand Up @@ -1214,7 +1198,6 @@ AM_CONDITIONAL(USE_SZIP, [test "x$ac_cv_func_H5Z_SZIP" = xyes])
AM_CONDITIONAL(USE_PNETCDF_DIR, [test ! "x$PNETCDFDIR" = x])
AM_CONDITIONAL(USE_LOGGING, [test "x$enable_logging" = xyes])
AM_CONDITIONAL(CROSS_COMPILING, [test "x$cross_compiling" = xyes])
AM_CONDITIONAL(USE_VALGRIND_TESTS, [test "x$enable_valgrind_tests" = xyes])
AM_CONDITIONAL(USE_NETCDF4, [test x$enable_netcdf_4 = xyes])
AM_CONDITIONAL(USE_HDF4, [test x$enable_hdf4 = xyes])
AM_CONDITIONAL(USE_HDF4_FILE_TESTS, [test x$enable_hdf4_file_tests = xyes])
Expand Down
14 changes: 1 addition & 13 deletions examples/C/Makefile.am
Expand Up @@ -48,22 +48,10 @@ if USE_NETCDF4
TESTS += run_examples4.sh
endif #USE_NETCDF4

# This will run a bunch of the test programs with valgrind, the memory
# checking tool. (Valgrind must be present for this to work.)
if USE_VALGRIND_TESTS
TESTS += run_valgrind_tests.sh
endif # USE_VALGRIND_TESTS
if USE_NETCDF4
if USE_VALGRIND_TESTS
TESTS += run_nc4_valgrind_tests.sh
endif # USE_VALGRIND_TESTS
endif # USE_NETCDF4

# These files are created by the tests.
CLEANFILES = *.nc

EXTRA_DIST = run_valgrind_tests.sh run_nc4_valgrind_tests.sh \
CMakeLists.txt run_examples.sh run_examples4.sh
EXTRA_DIST = CMakeLists.txt run_examples.sh run_examples4.sh

if ENABLE_FILTER_TESTING # => shared and netcdf-4
BUILT_SOURCES = findplugin.sh
Expand Down
24 changes: 0 additions & 24 deletions examples/C/run_nc4_valgrind_tests.sh

This file was deleted.

24 changes: 0 additions & 24 deletions examples/C/run_valgrind_tests.sh

This file was deleted.

13 changes: 3 additions & 10 deletions h5_test/Makefile.am
Expand Up @@ -38,17 +38,10 @@ check_PROGRAMS += tst_h_par
TESTS += run_par_tests.sh
endif

# This will run a bunch of the test programs with valgrind, the memory
# checking tool. (Valgrind must be present for this to work.)
if USE_VALGRIND_TESTS
TESTS += run_valgrind_tests.sh
endif # USE_VALGRIND_TESTS

# We must include these files in the distribution.
EXTRA_DIST = run_par_tests.sh run_valgrind_tests.sh \
ref_tst_h_compounds.h5 ref_tst_h_compounds2.h5 run_par_tests.sh \
run_valgrind_tests.sh ref_tst_compounds.nc h5_err_macros.h \
CMakeLists.txt
EXTRA_DIST = run_par_tests.sh ref_tst_h_compounds.h5 \
ref_tst_h_compounds2.h5 run_par_tests.sh ref_tst_compounds.nc \
h5_err_macros.h CMakeLists.txt

# Clean up test results.
CLEANFILES = tst_h_*.h5
29 changes: 0 additions & 29 deletions h5_test/run_valgrind_tests.sh

This file was deleted.

2 changes: 1 addition & 1 deletion include/onstack.h
Expand Up @@ -37,7 +37,7 @@
# define alloca __builtin_alloca
# endif
#else
# if HAVE_ALLOCA_H
# ifdef HAVE_ALLOCA_H
# include <alloca.h>
# elif defined(_AIX)
# pragma alloca
Expand Down
5 changes: 5 additions & 0 deletions libdispatch/nclistmgr.c
Expand Up @@ -88,6 +88,11 @@ find_in_NCList(int ext_ncid)
unsigned int ncid = ((unsigned int)ext_ncid) >> ID_SHIFT;
if(numfiles > 0 && nc_filelist != NULL && ncid < NCFILELISTLENGTH)
f = nc_filelist[ncid];

/* for classic files, ext_ncid must be a multiple of (1<<ID_SHIFT) */
if (f != NULL && f->model == NC_FORMATX_NC3 && (ext_ncid % (1<<ID_SHIFT)))
return NULL;

return f;
}

Expand Down
18 changes: 3 additions & 15 deletions nc_test/Makefile.am
Expand Up @@ -83,23 +83,11 @@ if USE_PNETCDF
TESTS += run_pnetcdf_test.sh
endif

# This will run a bunch of the test programs with valgrind, the memory
# checking tool. (Valgrind must be present for this to work.)
if USE_VALGRIND_TESTS
if USE_NETCDF4
TESTS_ENVIRONMENT = USE_NETCDF4=1
else
TESTS_ENVIRONMENT = USE_NETCDF4=0
endif
TESTS += run_valgrind_tests.sh
endif # USE_VALGRIND_TESTS

# Distribute the .c files so that m4 isn't required on the users
# machine.
EXTRA_DIST = test_get.m4 test_put.m4 run_valgrind_tests.sh \
run_diskless.sh run_diskless2.sh run_diskless5.sh run_mmap.sh \
run_pnetcdf_test.sh test_read.m4 test_write.m4 ref_tst_diskless2.cdl \
tst_diskless5.cdl CMakeLists.txt
EXTRA_DIST = test_get.m4 test_put.m4 run_diskless.sh run_diskless2.sh \
run_diskless5.sh run_mmap.sh run_pnetcdf_test.sh test_read.m4 \
test_write.m4 ref_tst_diskless2.cdl tst_diskless5.cdl CMakeLists.txt

# These files are created by the tests.
CLEANFILES = nc_test_classic.nc nc_test_64bit.nc nc_test_netcdf4.nc \
Expand Down
29 changes: 0 additions & 29 deletions nc_test/run_valgrind_tests.sh

This file was deleted.

15 changes: 11 additions & 4 deletions nc_test/tst_names.c
Expand Up @@ -24,8 +24,8 @@
#define NDIMS 1
#define DIMLEN 1

#define ERROR {printf("Error at line %d: %s\n",__LINE__,nc_strerror(res)); continue;}
#define ERRORI {printf("Error at line %d (loop=%d): %s\n",__LINE__,i,nc_strerror(res)); continue;}
#define ERROR {printf("Error at line %d: %s\n",__LINE__,nc_strerror(res)); nerrs++; continue;}
#define ERRORI {printf("Error at line %d (loop=%d): %s\n",__LINE__,i,nc_strerror(res)); nerrs++; continue;}

int
main(int argc, char **argv)
Expand Down Expand Up @@ -197,10 +197,14 @@ main(int argc, char **argv)
"x\xED\xAE\x80\xED\xB0\x80",
"x\xED\xAE\x80\xED\xBF\xBF",
"x\xED\xAF\xBF\xED\xB0\x80",
"x\xED\xAF\xBF\xED\xBF\xBF",
"x\xEF\xBF\xBE", /* other illegal code positions */
"x\xED\xAF\xBF\xED\xBF\xBF"
#if 0
/* The two below is legal since UTF8PROC_VERSION_MAJOR 2 */
"x\xEF\xBF\xBE", /* other illegal code positions */
"x\xEF\xBF\xBF"
#endif
};
int nerrs=0;
int i, j;
#define NUM_BAD (sizeof notvalid / sizeof notvalid[0])
#define NUM_GOOD (sizeof valid / sizeof valid[0])
Expand All @@ -221,8 +225,10 @@ main(int argc, char **argv)
NC_FORMAT_CLASSIC
,
NC_FORMAT_64BIT_OFFSET
#ifdef USE_CDF5
,
NC_FORMAT_CDF5
#endif
#ifdef USE_NETCDF4
,
NC_FORMAT_NETCDF4
Expand Down Expand Up @@ -327,6 +333,7 @@ main(int argc, char **argv)

SUMMARIZE_ERR;
}
total_err += nerrs;
FINAL_RESULTS;

#ifdef TEST_PNETCDF
Expand Down
3 changes: 1 addition & 2 deletions nc_test4/CMakeLists.txt
Expand Up @@ -9,7 +9,7 @@ SET(NC4_TESTS tst_dims tst_dims2 tst_dims3 tst_files tst_files4
cdm_sea_soundings tst_vl tst_atts1 tst_atts2 tst_vars2 tst_files5
tst_files6 tst_sync tst_h_strbug tst_h_refs tst_h_scalar tst_rename
tst_rename2 tst_h5_endians tst_atts_string_rewrite tst_put_vars_two_unlim_dim
tst_hdf5_file_compat tst_fill_attr_vanish tst_rehash tst_types)
tst_hdf5_file_compat tst_fill_attr_vanish tst_rehash tst_types tst_bug324)


# Note, renamegroup needs to be compiled before run_grp_rename
Expand Down Expand Up @@ -89,7 +89,6 @@ IF(USE_HDF4_FILE_TESTS AND NOT MSVC)
add_bin_test_no_prefix(tst_interops2)
build_bin_test_no_prefix(tst_interops3)
add_sh_test(nc_test4 run_get_hdf4_files)
add_bin_test(nc_test4 tst_bug324)
add_sh_test(nc_test4 tst_formatx_hdf4)
build_bin_test(tst_chunk_hdf4)
add_sh_test(nc_test4 run_chunk_hdf4)
Expand Down
41 changes: 15 additions & 26 deletions nc_test4/Makefile.am
Expand Up @@ -131,15 +131,6 @@ TESTS += tst_filter.sh
endif
endif

# This will run a bunch of the test programs with valgrind, the memory
# checking tool. (Valgrind must be present for this to work.)
if USE_VALGRIND_TESTS
TESTS += run_valgrind_tests.sh run_valgrind_tests2.sh
if USE_HDF4
TESTS += run_hdf4_valgrind_tests.sh
endif # USE_HDF4
endif # USE_VALGRIND_TESTS

# This are extra tests that will only be run if netcdf-4 is configured
# with --enable-parallel-tests.
if TEST_PARALLEL4
Expand All @@ -148,23 +139,21 @@ tst_parallel4 tst_nc4perf tst_mode tst_simplerw_coll_r
TESTS += run_par_test.sh
endif

EXTRA_DIST = run_par_test.sh run_bm.sh run_bm_test1.sh \
run_bm_test2.sh run_bm_radar_2D.sh run_bm_radar_2D_compression1.sh \
run_par_bm_test.sh run_bm_elena.sh run_par_bm_radar_2D.sh \
run_bm_radar_2D_endianness1.sh run_tst_chunks.sh ref_chunks1.cdl \
ref_chunks2.cdl run_get_hdf4_files.sh run_valgrind_tests.sh \
run_valgrind_tests2.sh run_bm_ar4.sh ref_tst_compounds.nc \
run_hdf4_valgrind_tests.sh ref_tst_xplatform2_1.nc \
ref_tst_xplatform2_2.nc ref_tst_dims.nc ref_tst_interops4.nc \
run_get_knmi_files.sh CMakeLists.txt run_grp_rename.sh \
tst_formatx_hdf4.sh run_chunk_hdf4.sh 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 tst_misc.sh tdset.h5 tst_hdf4_read_var.sh \
ref_contiguous.hdf4 ref_chunked.hdf4 tst_szip.sh ref_szip.h5 ref_szip.cdl \
tst_filter.sh bzip2.cdl filtered.cdl unfiltered.cdl ref_bzip2.c \
findplugin.in
EXTRA_DIST = run_par_test.sh run_bm.sh run_bm_test1.sh \
run_bm_test2.sh run_bm_radar_2D.sh run_bm_radar_2D_compression1.sh \
run_par_bm_test.sh run_bm_elena.sh run_par_bm_radar_2D.sh \
run_bm_radar_2D_endianness1.sh run_tst_chunks.sh ref_chunks1.cdl \
ref_chunks2.cdl run_get_hdf4_files.sh run_bm_ar4.sh \
ref_tst_compounds.nc ref_tst_xplatform2_1.nc ref_tst_xplatform2_2.nc \
ref_tst_dims.nc ref_tst_interops4.nc run_get_knmi_files.sh \
CMakeLists.txt run_grp_rename.sh tst_formatx_hdf4.sh \
run_chunk_hdf4.sh 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 tst_misc.sh tdset.h5 \
tst_hdf4_read_var.sh ref_contiguous.hdf4 ref_chunked.hdf4 tst_szip.sh \
ref_szip.h5 ref_szip.cdl tst_filter.sh bzip2.cdl filtered.cdl \
unfiltered.cdl ref_bzip2.c findplugin.in

CLEANFILES = tst_mpi_parallel.bin cdm_sea_soundings.nc bm_chunking.nc \
bm_radar.nc bm_radar1.nc radar_3d_compression_test.txt \
Expand Down
25 changes: 0 additions & 25 deletions nc_test4/run_hdf4_valgrind_tests.sh

This file was deleted.

0 comments on commit c359a0e

Please sign in to comment.