netcdf-c/ncdap_test
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
..
expected3 Forgot to add test files to github 2017-06-28 15:08:20 -06:00
expectremote3 Update affected test cases 2017-03-11 18:17:38 -07:00
expecttds3 Manual merge of pull request https://github.com/Unidata/netcdf-c/pull/64 contributed by nschloe. Assorted CMake improvements. 2014-06-11 15:51:31 -06:00
nocacheremote3 Manual merge of pull request https://github.com/Unidata/netcdf-c/pull/64 contributed by nschloe. Assorted CMake improvements. 2014-06-11 15:51:31 -06:00
special3 Manual merge of pull request https://github.com/Unidata/netcdf-c/pull/64 contributed by nschloe. Assorted CMake improvements. 2014-06-11 15:51:31 -06:00
testdata3 Forgot to add test files to github 2017-06-28 15:08:20 -06:00
CMakeLists.txt forgot to add to cmake 2017-07-14 16:44:50 -06:00
findtestserver.c Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
Makefile.am re e-support UBS-599337 2017-10-24 16:25:09 -06:00
run_ncdap_tests.sh Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
t_auth.c Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
t_dap3a.c re: hithub issue https://github.com/Unidata/netcdf-c/issues/435 2017-07-05 10:03:48 -06:00
t_dap3b.c
t_dap3c.c Modified ncdap_test to allow a different method 2017-01-18 21:46:47 -07:00
t_dap4.c Modified ncdap_test to allow a different method 2017-01-18 21:46:47 -07:00
t_dap4a.c Modified ncdap_test to allow a different method 2017-01-18 21:46:47 -07:00
t_dap4c.c Modified ncdap_test to allow a different method 2017-01-18 21:46:47 -07:00
t_dap.c re: hithub issue https://github.com/Unidata/netcdf-c/issues/435 2017-07-05 10:03:48 -06:00
t_misc.c Modified a number of tests 2014-10-04 15:59:16 -06:00
t_ncf330.c merge-squash 2015-08-15 16:26:35 -06:00
t_srcdir.h Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
test_cvt.c re: hithub issue https://github.com/Unidata/netcdf-c/issues/435 2017-07-05 10:03:48 -06:00
test_environment.c Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
test_nstride_cached.c Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
test_partvar2.c Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
test_partvar.c Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
test_vara.c Modified ncdap_test to allow a different method 2017-01-18 21:46:47 -07:00
test_varm3.c re: hithub issue https://github.com/Unidata/netcdf-c/issues/435 2017-07-05 10:03:48 -06:00
testauth.old Fix pull request https://github.com/Unidata/netcdf-c/pull/374 (dap4.dmh) 2017-04-03 21:39:44 -06:00
testauth.sh Error in ncuri in handling user:pwd@ in url 2017-07-05 14:39:23 -06:00
testauth.sh.old Fix pull request https://github.com/Unidata/netcdf-c/pull/374 (dap4.dmh) 2017-04-03 21:39:44 -06:00
testbasicauth.sh ckp 2017-07-21 13:54:09 -06:00
testcontainerauth.sh ckp 2017-07-21 13:54:09 -06:00
testurl.sh Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
tst_ber.sh Updated shell scripts to accomodate windows style carriage returns. 2017-07-26 13:35:27 -06:00
tst_formatx.sh Fix pull request https://github.com/Unidata/netcdf-c/pull/374 (dap4.dmh) 2017-04-03 21:39:44 -06:00
tst_longremote3.sh Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
tst_ncdap3.sh Fix for github issue https://github.com/Unidata/netcdf-c/issues/310. 2017-06-28 13:51:01 -06:00
tst_ncdap_shared.sh turn of extra debug 2017-07-15 20:21:24 -06:00
tst_ncdap.sh Updated shell scripts to accomodate windows style carriage returns. 2017-07-26 13:35:27 -06:00
tst_nocache3.sh Modified ncdap_test to allow a different method 2017-01-18 21:46:47 -07:00
tst_remote3.sh Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
tst_remote.sh Fix for github issue https://github.com/Unidata/netcdf-c/issues/310. 2017-06-28 13:51:01 -06:00
tst_special.sh Fix pull request https://github.com/Unidata/netcdf-c/pull/374 (dap4.dmh) 2017-04-03 21:39:44 -06:00
tst_tds.sh Fix pull request https://github.com/Unidata/netcdf-c/pull/374 (dap4.dmh) 2017-04-03 21:39:44 -06:00