Commit Graph

325 Commits

Author SHA1 Message Date
Ed Hartnett
3c5404ccf7
Merge branch 'master' into ejh_ncfunc_testing 2017-11-28 00:04:38 +00:00
Ed Hartnett
f33897e248 fixed some warnings, added some files to makefile.am to be cleaned 2017-11-26 08:50:16 -07:00
Nehal J Wani
1b91bd89d4
Fix build on pre-C99 compilers
- Make sure that the variables are declared at the top of the block.
 - Add fix to enable inline for various compilers
2017-11-26 01:47:54 +05:30
Ed Hartnett
8011fab382 now run tst_large2, also cleaned up some more warnings 2017-11-24 10:50:07 -07:00
Ed Hartnett
843db9798f finally got my distcheck act together by moving hdf4 file test to nc_test4 2017-11-23 04:41:03 -07:00
Ed Hartnett
0c7684b1ac removed tst_filters from CMake build 2017-11-22 12:42:59 -07:00
Ed Hartnett
2b3e1b1c86 trying to get cmake build to work 2017-11-22 10:21:51 -07:00
Ed Hartnett
74a895a394 fixed copy of HDF4 file in CMake build with nc_test/tst_formats.c 2017-11-22 09:52:40 -07:00
Ed Hartnett
365bd0cef2 added new test to CMake build 2017-11-22 08:26:53 -07:00
Ed Hartnett
845355e91b added hdf4 test for inq_format calls 2017-11-22 08:21:24 -07:00
Ed Hartnett
d4495e8e86 more testing 2017-11-22 07:46:03 -07:00
Ed Hartnett
b5ed095f36 makefile cleanup 2017-11-22 07:05:10 -07:00
Ed Hartnett
70c739858b fixed SEGFAULT for NULL parameter for nc_inq_format(), added testing, improved documentation 2017-11-22 06:53:23 -07:00
Ward Fisher
2ab3e56747 Added error message for new error NC_ENULLPAD. [skip ci] 2017-11-20 17:31:08 -07:00
Ed Hartnett
ca49633a64
Merge branch 'master' into ejh_fix_test 2017-11-10 02:43:32 -07:00
Ed Hartnett
4f7fb907f6 removed unused files 2017-11-08 04:13:03 -07:00
Ed Hartnett
d4c1fd5d80
Merge branch 'master' into ejh_delete_ncx 2017-11-07 18:35:05 -07:00
Ward Fisher
b92ae0cdbc Merge branch 'ejh_fix_use_cdf' of https://github.com/NetCDF-World-Domination-Council/netcdf-c into more_ejh_pulls 2017-11-07 14:14:10 -07:00
Ed Hartnett
59217fe8ac cleaned up, fixed comments 2017-11-06 06:19:34 -07:00
Ed Hartnett
f8c77f0692 refurbished tst_cdf5format.c 2017-11-06 05:35:34 -07:00
Ed Hartnett
b40e5d32f0
Merge branch 'master' into ejh_delete_ncx 2017-11-05 10:08:26 -07:00
Ed Hartnett
c920f48c49 fixed ENABLE_CDF5 issue in some tests 2017-11-05 09:08:39 -07:00
Ed Hartnett
6ce15853d6 fixed ENABLE_CDF5 issue in some tests 2017-11-05 09:06:48 -07:00
Ward Fisher
1bd71f0375 Merge remote-tracking branch 'origin/testp2.dmh' into dmh_multi_merge 2017-11-03 12:42:12 -06:00
Ward Fisher
f98635be1b Merge remote-tracking branch 'origin/h5offset.dmh' into dmh_multi_merge 2017-11-03 12:40:52 -06:00
Ward Fisher
91865a3cbc Merge branch 'NC_MAX_VAR_DIMS' of https://github.com/wkliao/netcdf-c into multi-merge 2017-11-02 11:20:54 -06:00
Ed Hartnett
c71e4dde09 removed historic file no longer used: nc_test/ncx.c 2017-11-01 05:09:29 -06:00
Ward Fisher
d7f0919c12
Merge branch 'master' into NC_MAX_VAR_DIMS 2017-10-31 14:06:41 -06:00
Ward Fisher
2987fb0bed
Merge branch 'master' into master 2017-10-31 14:01:08 -06:00
Ward Fisher
1acafdc668 Updated in support of https://github.com/Unidata/netcdf-c/issues/556 2017-10-31 11:13:05 -06:00
Ed Hartnett
78a44214aa
Merge branch 'master' into ejh_file_mem 2017-10-30 07:35:39 -06:00
Dennis Heimbigner
261ed4c99d Merge branch 'master' into h5offset.dmh 2017-10-27 12:33:17 -06:00
Dennis Heimbigner
682ad6a463
Merge branch 'master' into testp2.dmh 2017-10-27 11:17:39 -06:00
Ed Hartnett
433a2a6e36 fixed leaks in tests 2017-10-26 14:50:21 -06:00
Ward Fisher
bacdef88fe Merge branch 'master' into NC_MAX_VAR_DIMS 2017-10-26 14:31:22 -06:00
Ed Hartnett
5fba557bdf fixed leak in tst_utf8_validate.c 2017-10-26 14:28:41 -06:00
Ward Fisher
3247b637b7 Merge remote-tracking branch 'origin/testp2.dmh' into ejh_more_merges 2017-10-26 14:26:32 -06:00
Dennis Heimbigner
d9b60fef03 change to use Wei-kings' solution 2017-10-25 13:07:17 -06:00
Ward Fisher
5d4b81af8f Merge branch 'ejh_nc_test_warning_fix_2' of https://github.com/NetCDF-World-Domination-Council/netcdf-c into merge_small_pulls 2017-10-25 11:13:38 -06:00
Ed Hartnett
50408acec0 fixed more warnings 2017-10-25 06:22:58 -06:00
Ed Hartnett
fb4437e584 fixed warnings 2017-10-25 06:12:59 -06:00
Dennis Heimbigner
ea9d685a7b Modify nc_test/tst_parallel2.c to remove a failure.
The failure comes at the end when each processor tries to
remove() the created file. The second one appears to fail
-- possibly because of a race condition. In any case, if I
move the remove() call past MPI_Finalize(), the error goes away.

It is not clear of the exact circumstances that cause the
failure, but I encountered it with the following env.
- automake on centos7 64-bit.
- compiling with -O1 for gcc.
- The pnetcdf version is 1.8.1
- The command "mpiexec --version" gives:
  Version: 3.0.4
  Release Date: Wed Apr 24 10:08:10CDT2013
2017-10-24 19:12:07 -06:00
Dennis Heimbigner
9983b9d911 re e-support UBS-599337
re pull request https://github.com/Unidata/netcdf-c/pull/405
re pull request https://github.com/Unidata/netcdf-c/pull/446

Notes:
1. This branch is a cleanup of the magic.dmh branch.
2. magic.dmh was originally merged, but caused problems with parallel IO.
   It was re-issued as pull request https://github.com/Unidata/netcdf-c/pull/446.
3. This branch + pull request replace any previous pull requests and magic.dmh branch.

Given an otherwise valid netCDF file that has a corrupted header,
the netcdf library currently crashes. Instead, it should return
NC_ENOTNC.

Additionally, the NC_check_file_type code does not do the
forward search required by hdf5 files. It currently only looks
at file position 0 instead of 512, 1024, 2048,... Also, it turns
out that the HDF4 magic number is assumed to always be at the
beginning of the file (unlike HDF5).
The change is localized to libdispatch/dfile.c See
https://support.hdfgroup.org/release4/doc/DSpec_html/DS.pdf

Also, it turns out that the code in NC_check_file_type is duplicated
(mostly) in the function libsrc4/nc4file.c#nc_check_for_hdf.

This branch does the following.
1. Make NC_check_file_type return NC_ENOTNC instead of crashing.
2. Remove nc_check_for_hdf and centralize all file format checking
   NC_check_file_type.
3. Add proper forward search for HDF5 files (but not HDF4 files)
   to look for the magic number at offsets of 0, 512, 1024...
4. Add test tst_hdf5_offset.sh. This tests that hdf5 files with
   an offset are properly recognized. It does so by prefixing
   a legal file with some number of zero bytes: 512, 1024, etc.
5. Off-topic: Added -N flag to ncdump to force a specific output dataset name.
2017-10-24 16:25:09 -06:00
Dennis Heimbigner
c8b2184409 Fix dap4 related warnings in https://github.com/Unidata/netcdf-c/issues/501.
The nc_test/util.c error is a typo. The libdap4/d4meta.c error only is shown
when using a 64 bit machine because then |size_t| == 64 bits
and |int| = 32bits.
2017-10-20 21:17:12 -06:00
Ward Fisher
9e240e6c9a Modified t_nc.c to only test cdf5 if it has been enabled. 2017-10-16 11:19:24 -06:00
Ward Fisher
61f628b988 reverted test. 2017-10-06 12:58:49 -06:00
Greg Sjaardema
9964cee7cd Merge branch 'master' into master 2017-09-26 11:06:04 -06:00
Wei-keng Liao
2cc30c16be check against NC_MAX_VAR_DIMS (but using NC_EMAXDIMS, maybe a new error code NC_EMAXVARDIMS is needed) 2017-09-21 12:37:33 -05:00
Ward Fisher
223b1f968a Updated tst_small 2017-09-18 15:08:49 -06:00
Ward Fisher
399a43ae89 Updated nc_test to respect USE_CDF5 2017-09-18 13:24:11 -06:00