Commit Graph

360 Commits

Author SHA1 Message Date
Ward Fisher
8dc53c4981 Wiring in more validation 2016-11-18 11:53:53 -07:00
Ward Fisher
157af11bc2 Refactoring tests to separate out error macros from tests, in support of fixing http://github.com/Unidata/netcdf-c/issues/321 2016-10-21 17:17:39 +00:00
Greg Sjaardema
2d059f4580 Fix invalid array access
If an empty line is passed to this routine, then there is an invalid memory access at the cp[nn-1] line.  This becomes cp[-1] which is invalid.
2016-08-25 11:32:49 -06:00
Dennis Heimbigner
ddfb6d6279 Make sure that the _NcProperties attr is null terminated and stored as such 2016-08-08 21:54:23 -06:00
Dennis Heimbigner
f205989d59 Undo debug output because Travis won't show it 2016-08-08 11:23:14 -06:00
Dennis Heimbigner
7701bc932c travis failing; add debug output 2016-08-08 10:39:34 -06:00
Dennis Heimbigner
0cf1e2c49f re: Github issue netcdf-c 300
Modified provenance code to allocate the minimal space
needed for _NCProperties attribute in file.  Basically
required using malloc in the provenance code and in ncdump.
Otherwise should cause no externally visible effects.
Also removed the ENABLE_FILEINFO from configure.ac since
the provenance code is no longer optional.
2016-08-08 09:24:19 -06:00
Ward Fisher
2e71768c47 Fenceposted includes to nc4internal.h in support of https://github.com/Unidata/netcdf-c/issues/275 2016-06-08 11:26:37 -06:00
dmh
5bfdf54263 The name hash for hdf4 variables was
not being computed. Fix in nc4file.c.
Not sure how this ever worked for any variable.
What is also weird is that the dim hash is
apparently being computed.
2016-06-01 15:20:36 -06:00
Dennis Heimbigner
835511eaeb HDF5 is generating unnecessary error messages when netcdf4 logging is enabled
re: github netcdf-c issue #271

This occurs for several reasons, including:
1. using H5Aopen_name instead of H5Aexists to test if attribute exists.
2. using H5Eset_auto instead of H5Eset_auto2.
There are probably others that will have to be extinguished as encountered.
p.s Hope I did not overdo this and kill too much.
2016-05-27 10:08:01 -06:00
Dennis Heimbigner
4fa1470241 re: github issue https://github.com/Unidata/netcdf-c/issues/265
Charlie Zender noted that we forgot to define what happens for
various netcdf API attribute operations, notably nc_inq_att()
and nc_get_att().
So, I added a list of legal and illegal api calls for the provenance
attributes in docs/attribute_conventions.md.
I also added more test cases to ncdump/tst_fileinfo.c to verify
and fixed resultant errors.
2016-05-15 18:03:04 -06:00
Ward Fisher
fc0d7d0d80 Added a tweak to prevent problems with ncdump and hdf5 trying to correct for a lack of ssize_t. 2016-05-10 15:52:46 -06:00
Dennis Heimbigner
b4dc1dca19 More cmake fixes 2016-05-07 14:32:07 -06:00
Dennis Heimbigner
272e6f4022 Oops, forgot to test nc3 only.
Fixed some errors from that case.
2016-05-07 14:32:07 -06: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
Ward Fisher
3cbd45f539 Ensuring run_back_comp_tests.sh only runs if netcdf4 is enabled. 2016-04-28 14:41:42 -06:00
Dennis Heimbigner
5a1ca24fd6 Fix github issue: https://github.com/Unidata/netcdf-c/issues/236
If a char valued attribute contains embedded nul characters,
then illegal xml will be generated when using the -x (ncml) flag.

There is not good solution since we have a char value '\0' that
is legal in a netcdf-c char valued attribute, but is completely
illegal in ncml (i.e. xml).

So, implemented hack is to go ahead and generate '�' entities
and then complain that we are generating illegal ncml.
2016-03-17 22:05:46 -06:00
Dennis Heimbigner
39e9cd0ffe Fix issues with Github pull request 187
(https://github.com/Unidata/netcdf-c/pull/187)
Primary problem was cmake build errors.
2016-01-08 12:55:11 -07:00
Dennis Heimbigner
5e4cbd2fec Forgot to check cmake build 2016-01-05 22:26:20 -07:00
Dennis Heimbigner
d15f277252 The max dimension sizes do not take CDF-5 format into account.
NetCDF-c Github issue #185

The code in libsrc/dim.c has not been upgraded to support
CDF-5 format.

Rule we are implementing sets the max dimension sizes as follows:

Classic:	CDF-1	NC_MAX_INT - 3    = 2147483647 - 3
64 bit Offset:	CDF-2	NC_MAX_UINT - 3	  =  4294967295 - 3
64 bit Data:	CDF-5	NC_MAX_UINT64 - 3 = 18446744073709551615 - 3

The -3 is to handle rounding.
2016-01-05 21:26:25 -07:00
Ward Fisher
ac9f02d01a Modified index passed for last row when printing with annotations, in support of fixing https://github.com/Unidata/netcdf-c/issues/181 2015-12-31 21:20:36 +00:00
Dennis Heimbigner
8e6beda671 NetCDF-c Github issue #178
NetCDF-c Github issue #178 / esupport BNL-694121

The ncgen man pages says:
> Note also that the words variable',dimension', data',group', and
> `types' are legal CDL names, but be careful that there is a space be-
> tween them and any following colon character when used as a variable
> name. This is mostly an issue with attribute declarations.

Ncdump does not obey this rule.
The fix is to modify ncdump/ncdump.c to check if a variable name is
a keyword.

Also added test case.
2015-12-26 18:19:04 -07:00
dmh
47e10591b4 ckp 2015-11-19 13:44:55 -07:00
Ward Fisher
c1210f4020 Merge branch 'master' into cdf5-sync-master 2015-11-09 13:45:11 -07:00
dmh
413e49d758 1. There were several bugs in ncdump/dumplib.c
that were not taking the CDF-5 format into account.

2. Had to update ncgen.1 man page to define the new
   k-flag rules to deal with cdf-5.

3. Had to fix some tests that use 'cmp' for comparison;
   this really should be deprecated.

3. There was a bug in configure.ac with respect
   to using the enable-netcdf-4 flag vs
   using disable-netcdf-4.
2015-11-06 17:03:28 -07:00
Ward Fisher
996ef87cd1 More refactoring to fix an issue where an nc4 test was being run when nc4 was disabled. 2015-11-06 13:20:10 -07:00
Ward Fisher
f551581ceb Modified 'in-memory' test to only run enhanced tests if netcdf-4 is enabled. 2015-11-06 13:12:09 -07:00
Ward Fisher
612b35a84c Merge branch 'master' into cdf-5, in preparation for merging the CDF-5 functionality into the master branch. This will be the key new feature for netcdf 4.4.0. 2015-11-05 13:40:35 -07:00
dmh
7480d7d97d - clean up the dfile.c confusion about NC_64_BIT_OFFSET
- sync oc2 with  master for https://DennisHeimbigner@github.com/Unidata/oc.git
- Cleanup auth.html documentation.
- Cleanup obsolete documentation.
2015-10-24 21:45:13 -06:00
Ward Fisher
c825d612c2 Tweaked some tests so that everything would pass when netcdf4 was disabled. 2015-10-22 14:09:19 -06:00
Ward Fisher
519a56019f Merge branch 'fix-typos' of https://github.com/tbeu/netcdf-c into tbeu-fix-typos 2015-10-16 14:16:09 -06:00
Dennis Heimbigner
cd7a06b193 pull request 2015-10-12 17:09:37 -06:00
Dennis Heimbigner
554034b712 1. Added temporary work-around for cygwin where
AC_CHECK_SIZEOF is not working because anti-virus
   will not allow very rapid creation/deletion of a
   file with same name.
2. modified some test baselines to attempt to fix
   Ward's issue
2015-10-09 10:33:40 -06:00
dmh
8fc86035b2 merge-squash 2015-10-09 10:22:00 -06:00
Dennis Heimbigner
dccbc87d24 1. Added temporary work-around for cygwin where
AC_CHECK_SIZEOF is not working because anti-virus
   will not allow very rapid creation/deletion of a
   file with same name.
2. modified some test baselines to attempt to fix
   Ward's issue
2015-10-09 10:14:45 -06:00
dmh
49597a64af merge-squash 2015-10-09 10:12:11 -06:00
Dennis Heimbigner
a1be2456eb 1. Added temporary work-around for cygwin where
AC_CHECK_SIZEOF is not working because anti-virus
   will not allow very rapid creation/deletion of a
   file with same name.
2. modified some test baselines to attempt to fix
   Ward's issue
2015-09-15 15:18:59 -06:00
dmh
0a7ff043a2 re: Jira NCF-320
Partially resolve by making
string variables and attributes use
UTF-8 encoding.
Normalization is not necessarily fixed,
however.
2015-08-20 15:53:48 -06:00
tbeu
e2820e4d8a Fix common typos
Detected by https://github.com/vlajos/misspell_fixer
2015-08-20 11:42:05 +02:00
Russ Rew
495fea71b9 Fix builddir vs srdir problem for ncdump/ctest.c and ctest64.c 2015-08-18 16:10:18 -06:00
dmh
859f105005 merge-squash 2015-08-15 16:26:35 -06:00
Ward Fisher
26be22c7db Made the sed statement more specific to avoid problems on non-windows systems. 2015-08-11 11:52:48 -06:00
Ward Fisher
f00b1e8f6f Added a touch of post-processing to make a shell script test work on Windows. 2015-08-11 11:48:49 -06:00
Russ Rew
a62c9d3059 Fix conflicts after merge 2015-08-02 17:29:36 -06:00
Russ Rew
2e029a3058 More cleanups from clang warnings. 2015-08-02 17:23:32 -06:00
Russ Rew
0687dfe5a2 Cleanup clang warnings. 2015-08-02 17:22:50 -06:00
Russ Rew
ec89eb5806 Fix ncdump clang warnings. Fix invalid encodings for some non-ascii strings in tests. 2015-08-02 16:09:47 -06:00
Russ Rew
3d5be0b3f0 Fix NCF-339, ncdump -x omits exponent char in XML double attribute value 2015-08-02 08:54:29 -06:00
Ward Fisher
f8e2d21663 Corrected a potential resource leak. Coverity ID: 1302447 2015-07-29 14:49:05 -06:00
Russ Rew
374a7550c4 Better fix for NCF-336 2015-07-14 10:00:40 -06:00