Commit Graph

22 Commits

Author SHA1 Message Date
Ed Hartnett
c8605e07c6 removing dependencies between tests 2017-11-25 05:19:11 -07:00
Ed Hartnett
e064855a10 removed ncdump test dependencies for tst_netcdf4.sh 2017-11-25 04:31:58 -07:00
Ed Hartnett
87d59b80fb Makefile.am cleanup 2017-11-18 14:20:04 -07:00
Ed Hartnett
693a47ad04 move C program invokations to scripts to clean up dependencies in build 2017-11-16 13:03:35 -07: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
3db4f013bf Primary change: add dap4 support
Specific changes:
1. Add dap4 code: libdap4 and dap4_test.
   Note that until the d4ts server problem is solved, dap4 is turned off.
2. Modify various files to support dap4 flags:
	configure.ac, Makefile.am, CMakeLists.txt, etc.
3. Add nc_test/test_common.sh. This centralizes
   the handling of the locations of various
   things in the build tree: e.g. where is
   ncgen.exe located. See nc_test/test_common.sh
   for details.
4. Modify .sh files to use test_common.sh
5. Obsolete separate oc2 by moving it to be part of
   netcdf-c. This means replacing code with netcdf-c
   equivalents.
5. Add --with-testserver to configure.ac to allow
   override of the servers to be used for --enable-dap-remote-tests.
6. There were multiple versions of nctypealignment code. Try to
   centralize in libdispatch/doffset.c and include/ncoffsets.h
7. Add a unit test for the ncuri code because of its complexity.
8. Move the findserver code out of libdispatch and into
   a separate, self contained program in ncdap_test and dap4_test.
9. Move the dispatch header files (nc{3,4}dispatch.h) to
   .../include because they are now shared by modules.
10. Revamp the handling of TOPSRCDIR and TOPBUILDDIR for shell scripts.
11. Make use of MREMAP if available
12. Misc. minor changes e.g.
	- #include <config.h> -> #include "config.h"
	- Add some no-install headers to /include
	- extern -> EXTERNL and vice versa as needed
	- misc header cleanup
	- clean up checking for misc. unix vs microsoft functions
13. Change copyright decls in some files to point to LICENSE file.
14. Add notes to RELEASENOTES.md
2017-03-08 17:01:10 -07:00
Dennis Heimbigner
11a259ad86 Add provenance info for netcdf-4 files.
This consists of a persistent attribute named
_NCProperties plus two computed attributes
_IsNetcdf4 and _SuperblockVersion.
See the 'Provenance Attributes' section
of docs/attribute_conventions.md for details.
2016-05-07 14:32:07 -06:00
dmh
47e10591b4 ckp 2015-11-19 13:44:55 -07:00
Russ Rew
9a60dc612f Use short "-k" codes instead of deprecated version numbers for ncgen and nccopy tests 2014-12-28 22:42:05 -07:00
dmh
7e582ad3f2 re: Jira NCF-309
The code for handling character constants
in datalists in ncgen has some problems.
1. It failed on large constants
2. It did not handle e.g. var = 'a', 'b', ...
   in the same way that ncgen3 did.
3. The code for generate.c and genchar.c needed
   some refactoring to make it a little simpler
   (but not simple).
2014-09-18 18:26:06 -06:00
dmh
cc95bd3d47 1. [NCF-276]/XXI-796914
Columbia server does not serve up proper
   opendap DDS replies. The Dataset {...} name
   changes depending on if the request has certain
   kinds of constraints.
   Code for a hack was not being used, so restore it.
   The fix is to effectively ignore differences in
   Dataset node names if the code is coming from
   columbia.edu.

2. [NCF-278]
   The ncgen code is improperly typing int64 integer constants
   as uint64.

3. [NCF-279]
   Empty string constants were not being properly
   filled when their target array is length 1 or more.
2013-11-17 14:26:14 -07:00
dmh
e7414e16d0 [NCF-265] again.
1. Updated the ncgen manual (ncgen.1)
   to discuss handling of ambiguous
   enumeration constant references.
2. Fixed the test case. It is currently
   XFAIL'd until such time as ncdump
   is modified to output properly
   disambiguated enumeration constant
   references.
2013-09-22 12:08:27 -06:00
Dennis Heimbigner
b083b9e758 fix == in shell scripts 2012-07-17 20:13:17 +00:00
Ward Fisher
2e96987a41 Merged latest changes from trunk, including deletion of win32 directory. 2012-06-13 19:29:01 +00:00
Russ Rew
79cde861ac Delete obsolete libdiskless directory, replaced by new diskless
implementation.  Deleted obsolete win32, soon to be replaced by Ward's
Windows 32- and 64-bit fixes for building with MSYS/MinGW.  Made
cosmetic cleanup to output of "make check" to make it easier for users
to interpret.  Fixed bug NCF-175: ncdump -t incorrectly interpreting
units attribute (such as "days") without a base time (such as "since
2007-01-01") as a time unit.

Changed name to 4.2.1-beta.
2012-06-12 21:50:02 +00:00
Ward Fisher
a5c4bf581f o Moved a couple more scripts around to use a uniform
naming convention.

o Modified ncdump shell, test scripts so that the extra
  digit in an exponent on windows wouldn't be a problem.

o Modified configure.ac to check for the zlib dll provided
  by the zlib group; they recommend using the official dll for
  windows builds.
2012-05-25 21:22:09 +00:00
Ward Fisher
ed3f676414 Corrected type in previous commit. 2012-05-11 20:27:34 +00:00
Ward Fisher
f620046772 Excluded absolute path ncdump test from running on windows platforms for the time being. See notes in tst_netcdf4.sh 2012-05-11 20:26:11 +00:00
Ward Fisher
08c29d0f06 o ncdump.c: set PRINTF_EXPONENT_DIGITS=2 when in windows to control the number of digits in the exponent.
o *.sh: Added stanza's to ensure that srcdir is set if it's not already set.
2012-05-08 22:37:56 +00:00
Ward Fisher
9fc359f29b Added -b flag to diff in shell scripts, to ignore whitespace, newlines, carriage returns. 2012-05-08 19:36:27 +00:00
Russ Rew
b37a176fa0 Clarified documentation for nc_inq_grp_ncid(), differentiating it from nc_inq_ncid(). Fixed problem returning values from functions declared void in some libsrc4/ test programs. Added test for bug in ncdump for dimensions with same name in nested groups, and fix for bug. Fixed nccopy bug involving dimensions with smae name in nested groups. Added code for specifying chunking by dimension to nccopy (but not implemented yet). 2010-12-30 18:17:04 +00:00
Ed Hartnett
18f4bca367 moving to trunk subdir 2010-06-03 13:24:43 +00:00