From b47180c5be4188d8aa5622022a8f465c1b39177f Mon Sep 17 00:00:00 2001 From: Wei-keng Liao Date: Fri, 8 Sep 2017 02:41:06 -0500 Subject: [PATCH 1/9] fix error reporting --- nc_test/tst_names.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nc_test/tst_names.c b/nc_test/tst_names.c index a6de352252..ad4cd52267 100644 --- a/nc_test/tst_names.c +++ b/nc_test/tst_names.c @@ -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) @@ -201,6 +201,7 @@ main(int argc, char **argv) "x\xEF\xBF\xBE", /* other illegal code positions */ "x\xEF\xBF\xBF" }; + int nerrs=0; int i, j; #define NUM_BAD (sizeof notvalid / sizeof notvalid[0]) #define NUM_GOOD (sizeof valid / sizeof valid[0]) @@ -327,6 +328,7 @@ main(int argc, char **argv) SUMMARIZE_ERR; } + total_err += nerrs; FINAL_RESULTS; #ifdef TEST_PNETCDF From 8dc83d4e482c8c4ca5849065e9edb4334862e97d Mon Sep 17 00:00:00 2001 From: Wei-keng Liao Date: Thu, 19 Oct 2017 12:37:00 -0500 Subject: [PATCH 2/9] utr8proc has legalized two code positions --- nc_test/tst_names.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nc_test/tst_names.c b/nc_test/tst_names.c index ad4cd52267..24286f1a3d 100644 --- a/nc_test/tst_names.c +++ b/nc_test/tst_names.c @@ -197,9 +197,12 @@ 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; From faa01cf1afc02d324b74a1dec1a8c55d4a14fc2f Mon Sep 17 00:00:00 2001 From: Wei-keng Liao Date: Thu, 19 Oct 2017 16:42:22 -0500 Subject: [PATCH 3/9] add condition check for CDF5 --- nc_test/tst_names.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nc_test/tst_names.c b/nc_test/tst_names.c index 24286f1a3d..5f63c43e4c 100644 --- a/nc_test/tst_names.c +++ b/nc_test/tst_names.c @@ -225,8 +225,10 @@ main(int argc, char **argv) NC_FORMAT_CLASSIC , NC_FORMAT_64BIT_OFFSET +#ifdef ENABLE_CDF5 , NC_FORMAT_CDF5 +#endif #ifdef USE_NETCDF4 , NC_FORMAT_NETCDF4 From fa77d51c30a331da8838eae0f87ef47324baec7e Mon Sep 17 00:00:00 2001 From: Wei-keng Liao Date: Fri, 20 Oct 2017 10:16:19 -0500 Subject: [PATCH 4/9] change ENABLE_CDF5 to USE_CDF5 --- nc_test/tst_names.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nc_test/tst_names.c b/nc_test/tst_names.c index 5f63c43e4c..8127f1b560 100644 --- a/nc_test/tst_names.c +++ b/nc_test/tst_names.c @@ -225,7 +225,7 @@ main(int argc, char **argv) NC_FORMAT_CLASSIC , NC_FORMAT_64BIT_OFFSET -#ifdef ENABLE_CDF5 +#ifdef USE_CDF5 , NC_FORMAT_CDF5 #endif From cb7aafa805e383c65daa9c0c200d28435f682c50 Mon Sep 17 00:00:00 2001 From: Wei-keng Liao Date: Thu, 25 Jan 2018 00:03:19 -0600 Subject: [PATCH 5/9] fix issue 791: validate ncid for classic files --- libdispatch/nclistmgr.c | 5 +++++ nc_test4/tst_dims.c | 1 + 2 files changed, 6 insertions(+) diff --git a/libdispatch/nclistmgr.c b/libdispatch/nclistmgr.c index 13679f0eb2..5bb4fe756e 100644 --- a/libdispatch/nclistmgr.c +++ b/libdispatch/nclistmgr.c @@ -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<model == NC_FORMATX_NC3 && (ext_ncid % (1< Date: Thu, 8 Feb 2018 13:47:20 -0500 Subject: [PATCH 6/9] onstack: check whether HAVE_ALLOCA_H is defined or not If it isn't available, it isn't defined at all. --- include/onstack.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/onstack.h b/include/onstack.h index a85e00b708..29d84d8c44 100644 --- a/include/onstack.h +++ b/include/onstack.h @@ -37,7 +37,7 @@ # define alloca __builtin_alloca # endif #else -# if HAVE_ALLOCA_H +# ifdef HAVE_ALLOCA_H # include # elif defined(_AIX) # pragma alloca From 45329862a86d98bb84eb9ab37c2720e81fb300e1 Mon Sep 17 00:00:00 2001 From: Ed Hartnett Date: Tue, 27 Feb 2018 08:36:12 -0700 Subject: [PATCH 7/9] removed valgrind stuff --- configure.ac | 17 ------------ examples/C/Makefile.am | 14 +--------- examples/C/run_nc4_valgrind_tests.sh | 24 ---------------- examples/C/run_valgrind_tests.sh | 24 ---------------- h5_test/Makefile.am | 13 ++------- h5_test/run_valgrind_tests.sh | 29 -------------------- nc_test/Makefile.am | 18 ++---------- nc_test/run_valgrind_tests.sh | 29 -------------------- nc_test4/Makefile.am | 41 ++++++++++------------------ nc_test4/run_hdf4_valgrind_tests.sh | 25 ----------------- nc_test4/run_valgrind_tests.sh | 32 ---------------------- nc_test4/run_valgrind_tests2.sh | 23 ---------------- nctest/Makefile.am | 8 +----- nctest/run_valgrind_tests.sh | 28 ------------------- 14 files changed, 23 insertions(+), 302 deletions(-) delete mode 100755 examples/C/run_nc4_valgrind_tests.sh delete mode 100755 examples/C/run_valgrind_tests.sh delete mode 100755 h5_test/run_valgrind_tests.sh delete mode 100755 nc_test/run_valgrind_tests.sh delete mode 100755 nc_test4/run_hdf4_valgrind_tests.sh delete mode 100755 nc_test4/run_valgrind_tests.sh delete mode 100755 nc_test4/run_valgrind_tests2.sh delete mode 100755 nctest/run_valgrind_tests.sh diff --git a/configure.ac b/configure.ac index fd7d8507c9..17cfe19ff7 100644 --- a/configure.ac +++ b/configure.ac @@ -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], @@ -670,14 +662,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. @@ -1202,7 +1186,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]) diff --git a/examples/C/Makefile.am b/examples/C/Makefile.am index e39debb1f4..77013f7c90 100644 --- a/examples/C/Makefile.am +++ b/examples/C/Makefile.am @@ -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 diff --git a/examples/C/run_nc4_valgrind_tests.sh b/examples/C/run_nc4_valgrind_tests.sh deleted file mode 100755 index 42f89773da..0000000000 --- a/examples/C/run_nc4_valgrind_tests.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -# This shell runs the tests with valgrind, for netCDF-4. - -# $Id: run_valgrind_tests.sh,v 1.9 2010/01/26 20:24:18 ed Exp $ - -set -e -echo "" -echo "Testing netCDF-4 test programs with valgrind..." - -# These are my test programs. -list='simple_nc4_wr simple_nc4_rd simple_xy_nc4_wr '\ -'simple_xy_nc4_rd ' - -for tst in $list; do - echo "" - cmd1="valgrind -q --error-exitcode=2 --leak-check=full ./$tst" - echo "$cmd1:" - $cmd1 -done - -echo "SUCCESS!!!" - -exit 0 diff --git a/examples/C/run_valgrind_tests.sh b/examples/C/run_valgrind_tests.sh deleted file mode 100755 index 3b2b9cd3a1..0000000000 --- a/examples/C/run_valgrind_tests.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -# This shell runs the tests with valgrind. - -# $Id: run_valgrind_tests.sh,v 1.9 2010/01/26 20:24:18 ed Exp $ - -set -e -echo "" -echo "Testing programs with valgrind..." - -# These are my test programs. -list='simple_xy_wr simple_xy_rd sfc_pres_temp_wr '\ -'sfc_pres_temp_rd pres_temp_4D_wr pres_temp_4D_rd ' - -for tst in $list; do - echo "" - cmd1="valgrind -q --error-exitcode=2 --leak-check=full ./$tst" - echo "$cmd1:" - $cmd1 -done - -echo "SUCCESS!!!" - -exit 0 diff --git a/h5_test/Makefile.am b/h5_test/Makefile.am index 18e168b1f4..f114d7cebd 100644 --- a/h5_test/Makefile.am +++ b/h5_test/Makefile.am @@ -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 diff --git a/h5_test/run_valgrind_tests.sh b/h5_test/run_valgrind_tests.sh deleted file mode 100755 index 9fa2568e45..0000000000 --- a/h5_test/run_valgrind_tests.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -if test "x$srcdir" = x ; then srcdir=`pwd`; fi -. ../test_common.sh - -# This shell runs the tests with valgrind. - -set -e -echo "" -echo "Testing programs with valgrind..." - -# These are my test programs. -list='tst_h_files tst_h_files2 tst_h_files4 tst_h_atts '\ -'tst_h_atts3 tst_h_atts4 tst_h_vars tst_h_vars2 tst_h_vars3 tst_h_grps '\ -'tst_h_compounds tst_h_compounds2 tst_h_wrt_cmp tst_h_rd_cmp tst_h_vl '\ -'tst_h_opaques tst_h_strings tst_h_strings1 tst_h_strings2 tst_h_ints '\ -'tst_h_dimscales tst_h_dimscales1 tst_h_dimscales2 tst_h_dimscales3 '\ -'tst_h_enums' - -for tst in $list; do - echo "" - cmd1="valgrind -q --error-exitcode=2 --leak-check=full ./$tst" - echo "$cmd1:" - $cmd1 -done - -echo "SUCCESS!!!" - -exit 0 diff --git a/nc_test/Makefile.am b/nc_test/Makefile.am index 1d14fddeaa..d78b3c0b99 100644 --- a/nc_test/Makefile.am +++ b/nc_test/Makefile.am @@ -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 \ diff --git a/nc_test/run_valgrind_tests.sh b/nc_test/run_valgrind_tests.sh deleted file mode 100755 index c172039195..0000000000 --- a/nc_test/run_valgrind_tests.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -# This shell runs the tests with valgrind. - -# $Id: run_valgrind_tests.sh,v 1.9 2010/01/26 20:24:18 ed Exp $ - -set -e -echo "" -echo "Testing programs with valgrind..." - -# These are my test programs. -list='t_nc tst_norm tst_names tst_misc nc_test' -# If we are running with netcdf4, then add tst_atts -if test "x$USE_NETCDF4" = "x1" ; then -list="$list tst_atts" -fi - -# These don't work yet: tst_fills tst_xplatform2 tst_interops6 tst_strings - -for tst in $list; do - echo "" - cmd1="valgrind -q --error-exitcode=2 --leak-check=full ./$tst" - echo "$cmd1:" - $cmd1 -done - -echo "SUCCESS!!!" - -exit 0 diff --git a/nc_test4/Makefile.am b/nc_test4/Makefile.am index 2a0619c122..6423d780ec 100644 --- a/nc_test4/Makefile.am +++ b/nc_test4/Makefile.am @@ -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 @@ -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 \ diff --git a/nc_test4/run_hdf4_valgrind_tests.sh b/nc_test4/run_hdf4_valgrind_tests.sh deleted file mode 100755 index ba3c9c706d..0000000000 --- a/nc_test4/run_hdf4_valgrind_tests.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -if test "x$srcdir" = x ; then srcdir=`pwd`; fi -. ../test_common.sh - -# This shell runs the HDF4 tests with valgrind. - -# $Id: run_hdf4_valgrind_tests.sh,v 1.1 2009/07/13 14:53:52 ed Exp $ - -set -e -echo "" -echo "Testing programs with valgrind..." - -# These are my test programs. -list='tst_interops2 ' - -for tst in $list; do - echo "" - echo "Memory testing with $tst:" - valgrind -q --error-exitcode=2 --leak-check=full ./$tst -done - -echo "SUCCESS!!!" - -exit 0 diff --git a/nc_test4/run_valgrind_tests.sh b/nc_test4/run_valgrind_tests.sh deleted file mode 100755 index 1a8da11697..0000000000 --- a/nc_test4/run_valgrind_tests.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -if test "x$srcdir" = x ; then srcdir=`pwd`; fi -. ../test_common.sh - - -# This shell runs the tests with valgrind. - -set -e -echo "" -echo "Testing programs with valgrind..." - -# These are my test programs. -list='tst_dims tst_dims2 tst_dims3 tst_files tst_files4 tst_vars '\ -'tst_varms tst_unlim_vars tst_converts tst_converts2 tst_grps '\ -'tst_compounds tst_compounds2 tst_compounds3 tst_opaques tst_strings '\ -'tst_strings2 tst_interops tst_interops4 tst_interops5 tst_interops6 '\ -'tst_coords tst_coords2 tst_coords3 tst_vars3 tst_chunks '\ -'tst_utf8 tst_fills tst_fills2 tst_fillbug tst_xplatform '\ -'tst_h_atts2 tst_endian_fill tst_atts' - -# These don't work yet: tst_grps2 tst_xplatform2 tst_enums - -for tst in $list; do - echo "" - cmd1="valgrind -q --error-exitcode=2 --leak-check=full ./$tst" - echo "$cmd1:" - $cmd1 -done - -echo "SUCCESS!!!" -exit 0 diff --git a/nc_test4/run_valgrind_tests2.sh b/nc_test4/run_valgrind_tests2.sh deleted file mode 100755 index 796ea95f85..0000000000 --- a/nc_test4/run_valgrind_tests2.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -# This shell runs the tests with valgrind. - -# $Id: run_valgrind_tests.sh,v 1.9 2010/01/26 20:24:18 ed Exp $ - -set -e -echo "" -echo "Testing programs with valgrind..." - -# These are my test programs. -list="t_type tst_camrun tst_vl tst_v2 tst_vars2 \ -tst_atts2 tst_files tst_atts" - -for tst in $list; do - echo "" - echo "Memory testing with $tst:" - valgrind -q --error-exitcode=2 --leak-check=full ./$tst -done - -echo "SUCCESS!!!" - -exit 0 diff --git a/nctest/Makefile.am b/nctest/Makefile.am index 9c8c05abb3..348472eed0 100644 --- a/nctest/Makefile.am +++ b/nctest/Makefile.am @@ -16,7 +16,7 @@ AM_LDFLAGS += ${top_builddir}/liblib/libnetcdf.la # generated in a pressurized chamber that exactly simulated the # atmosphere on the surface of Mars. EXTRA_DIST = ref_nctest_classic.nc ref_nctest_64bit_offset.nc \ -compare_test_files.sh run_valgrind_tests.sh CMakeLists.txt +compare_test_files.sh CMakeLists.txt CLEANFILES = nctest_*.nc test2.nc temp.tmp tst_*.nc \ nctest_classic.cdl ref_nctest_classic.cdl @@ -33,12 +33,6 @@ TEST_EXTENSIONS = .sh # compare_test_files depends on nctest executing first. compare_test_files.log: nctest.log -# This will the test program 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 - # These are the source files for the nctest program. nctest_SOURCES = add.c add.h atttests.c cdftests.c dimtests.c driver.c \ emalloc.c emalloc.h error.c error.h misctest.c rec.c slabs.c testcdf.h \ diff --git a/nctest/run_valgrind_tests.sh b/nctest/run_valgrind_tests.sh deleted file mode 100755 index 29cbcb82ca..0000000000 --- a/nctest/run_valgrind_tests.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -if test "x$srcdir" = x ; then srcdir=`pwd`; fi -. ../test_common.sh - -# This shell runs the tests with valgrind. - -# $Id: run_valgrind_tests.sh,v 1.9 2010/01/26 20:24:18 ed Exp $ - -set -e -echo "" -echo "Testing programs with valgrind..." - -# These are my test programs. -list='nctest tst_rename' - -# These don't work yet: tst_fills tst_xplatform2 tst_interops6 tst_strings - -for tst in $list; do - echo "" - cmd1="valgrind -q --error-exitcode=2 --leak-check=full ./$tst" - echo "$cmd1:" - $cmd1 -done - -echo "SUCCESS!!!" - -exit 0 From 64e5742d88f7efbb491881ad900e5af6dcfc54b4 Mon Sep 17 00:00:00 2001 From: Ed Hartnett Date: Tue, 27 Feb 2018 08:53:58 -0700 Subject: [PATCH 8/9] added tst_bug324 to cmake build --- nc_test4/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nc_test4/CMakeLists.txt b/nc_test4/CMakeLists.txt index 5583195d2a..0e0d87cc46 100644 --- a/nc_test4/CMakeLists.txt +++ b/nc_test4/CMakeLists.txt @@ -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 From 49ebcc0e57e673d57ed9921fde653b56c591cd88 Mon Sep 17 00:00:00 2001 From: Ed Hartnett Date: Tue, 27 Feb 2018 11:10:04 -0700 Subject: [PATCH 9/9] fixed problem of test file --- nc_test4/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/nc_test4/CMakeLists.txt b/nc_test4/CMakeLists.txt index 0e0d87cc46..7247d0d718 100644 --- a/nc_test4/CMakeLists.txt +++ b/nc_test4/CMakeLists.txt @@ -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)