netcdf-c/nc_test
Dennis Heimbigner df3636b959 Mitigate S3 test interference + Unlimited Dimensions in NCZarr
This PR started as an attempt to add unlimited dimensions to NCZarr.
It did that, but this exposed significant problems with test interference.
So this PR is mostly about fixing -- well mitigating anyway -- test
interference.

The problem of test interference is now documented in the document docs/internal.md.
The solutions implemented here are also describe in that document.
The solution is somewhat fragile but multiple cleanup mechanisms
are provided. Note that this feature requires that the
AWS command line utility must be installed.

## Unlimited Dimensions.
The existing NCZarr extensions to Zarr are modified to support unlimited dimensions.
NCzarr extends the Zarr meta-data for the ".zgroup" object to include netcdf-4 model extensions. This information is stored in ".zgroup" as dictionary named "_nczarr_group".
Inside "_nczarr_group", there is a key named "dims" that stores information about netcdf-4 named dimensions. The value of "dims" is a dictionary whose keys are the named dimensions. The value associated with each dimension name has one of two forms
Form 1 is a special case of form 2, and is kept for backward compatibility. Whenever a new file is written, it uses format 1 if possible, otherwise format 2.
* Form 1: An integer representing the size of the dimension, which is used for simple named dimensions.
* Form 2: A dictionary with the following keys and values"
   - "size" with an integer value representing the (current) size of the dimension.
   - "unlimited" with a value of either "1" or "0" to indicate if this dimension is an unlimited dimension.

For Unlimited dimensions, the size is initially zero, and as variables extend the length of that dimension, the size value for the dimension increases.
That dimension size is shared by all arrays referencing that dimension, so if one array extends an unlimited dimension, it is implicitly extended for all other arrays that reference that dimension.
This is the standard semantics for unlimited dimensions.

Adding unlimited dimensions required a number of other changes to the NCZarr code-base. These included the following.
* Did a partial refactor of the slice handling code in zwalk.c to clean it up.
* Added a number of tests for unlimited dimensions derived from the same test in nc_test4.
* Added several NCZarr specific unlimited tests; more are needed.
* Add test of endianness.

## Misc. Other Changes
* Modify libdispatch/ncs3sdk_aws.cpp to optionally support use of the
   AWS Transfer Utility mechanism. This is controlled by the
   ```#define TRANSFER```` command in that file. It defaults to being disabled.
* Parameterize both the standard Unidata S3 bucket (S3TESTBUCKET) and the netcdf-c test data prefix (S3TESTSUBTREE).
* Fixed an obscure memory leak in ncdump.
* Removed some obsolete unit testing code and test cases.
* Uncovered a bug in the netcdf-c handling of big-endian floats and doubles. Have not fixed yet. See tst_h5_endians.c.
* Renamed some nczarr_tests testcases to avoid name conflicts with nc_test4.
* Modify the semantics of zmap\#ncsmap_write to only allow total rewrite of objects.
* Modify the semantics of zodom to properly handle stride > 1.
* Add a truncate operation to the libnczarr zmap code.
2023-09-26 16:56:48 -06:00
..
bad_cdf5_begin.nc
CMakeLists.txt Add support for Zarr string type to NCZarr 2022-08-27 20:21:13 -06:00
error.c
error.h
f03tst_open_mem.nc
large_files.c
make_test_file.sh
Makefile.am Fix byterange handling of some URLS 2023-03-02 19:51:02 -07:00
nc_enddef.cdl Fix additional S3 support issues 2021-10-29 20:06:37 -06:00
nc_sync.cdl
nc_test.c Turn verbose output on in nc_test. 2021-06-16 16:34:06 -06:00
nc_test.html
quick_large_files.c
ref_tst_diskless2.cdl
ref_tst_diskless3_create.cdl
ref_tst_diskless3_open.cdl
ref_tst_http_nc3.cdl Use the built-in HDF5 byte-range reader, if available. 2020-09-24 14:33:58 -06:00
ref_tst_http_nc4a.cdl Use the built-in HDF5 byte-range reader, if available. 2020-09-24 14:33:58 -06:00
ref_tst_http_nc4b.cdl Mostly revert the filter code to reduce its complexity of use. 2020-09-27 12:43:46 -06:00
ref_tst_http_nc4c.cdl Fix additional S3 support issues 2021-10-29 20:06:37 -06:00
ref_tst_http_nc4e.cdl Fix byterange handling of some URLS 2023-03-02 19:51:02 -07:00
ref_tst_http_nc4f.cdl Fix byterange handling of some URLS 2023-03-02 19:51:02 -07:00
run_cdf5.sh
run_diskless2.sh Two fixes for the price of one! 2022-04-28 15:51:20 -06:00
run_diskless5.sh
run_diskless.sh Revert "Revert "Fix nczarr-experimental: improve build support, disengage hdf5 vs netcdf4 flags, and find AWS libraries"" 2020-08-17 19:15:47 -06:00
run_inmemory.sh Revert "Revert "Fix nczarr-experimental: improve build support, disengage hdf5 vs netcdf4 flags, and find AWS libraries"" 2020-08-17 19:15:47 -06:00
run_mmap.sh
run_pnetcdf_tests.sh.in Update to default --with-plugin-dir to yes 2022-05-24 20:05:19 -06:00
t_nc_p5.c
t_nc.c
test_byterange.sh Mitigate S3 test interference + Unlimited Dimensions in NCZarr 2023-09-26 16:56:48 -06:00
test_get.m4 Docs migration 2021-11-11 10:47:49 -07:00
test_put.m4 Fix an accidentally-introduced bug. 2021-07-13 12:07:56 -06:00
test_read.m4 Eliminate a lot of 'result of operation is undefined or garbage' errors reported by static analysis. These errors appeared to be false positives as there was logic that should prevent their occurance, but it's possible that optimization would result in these error states occuring. 2021-07-12 16:40:27 -06:00
test_write.m4 Eliminate a lot of 'result of operation is undefined or garbage' errors reported by static analysis. These errors appeared to be false positives as there was logic that should prevent their occurance, but it's possible that optimization would result in these error states occuring. 2021-07-12 16:40:27 -06:00
testnc3perf.c
tests.h
tst_addvar.c
tst_atts3.c fixed comment 2020-08-12 07:59:45 -06:00
tst_big_rvar.c Revert "Revert "Fix nczarr-experimental: improve build support, disengage hdf5 vs netcdf4 flags, and find AWS libraries"" 2020-08-17 19:15:47 -06:00
tst_big_var2.c Revert "Revert "Fix nczarr-experimental: improve build support, disengage hdf5 vs netcdf4 flags, and find AWS libraries"" 2020-08-17 19:15:47 -06:00
tst_big_var6.c Revert "Revert "Fix nczarr-experimental: improve build support, disengage hdf5 vs netcdf4 flags, and find AWS libraries"" 2020-08-17 19:15:47 -06:00
tst_big_var.c Revert "Revert "Fix nczarr-experimental: improve build support, disengage hdf5 vs netcdf4 flags, and find AWS libraries"" 2020-08-17 19:15:47 -06:00
tst_byterange.c Revert "Revert "Fix nczarr-experimental: improve build support, disengage hdf5 vs netcdf4 flags, and find AWS libraries"" 2020-08-17 19:15:47 -06:00
tst_cdf5_begin.c
tst_cdf5format.c
tst_def_var_fill.c Revert "Revert "Fix nczarr-experimental: improve build support, disengage hdf5 vs netcdf4 flags, and find AWS libraries"" 2020-08-17 19:15:47 -06:00
tst_default_format_pnetcdf.c Revert "Revert "Fix nczarr-experimental: improve build support, disengage hdf5 vs netcdf4 flags, and find AWS libraries"" 2020-08-17 19:15:47 -06:00
tst_default_format.c
tst_diskless2.c
tst_diskless3.c
tst_diskless4.c
tst_diskless5.c Improve UTF8 Support On Windows 2022-02-08 20:53:30 -07:00
tst_diskless5.cdl
tst_diskless6.c fixed warnings 2022-04-26 05:31:07 -06:00
tst_diskless.c Revert "Revert "Fix nczarr-experimental: improve build support, disengage hdf5 vs netcdf4 flags, and find AWS libraries"" 2020-08-17 19:15:47 -06:00
tst_err_enddef.c Addendum: This PR has been extended to include 2021-04-02 18:39:50 -06:00
tst_formats.c Mostly revert the filter code to reduce its complexity of use. 2020-09-27 12:43:46 -06:00
tst_formatx_pnetcdf.c
tst_global_fillval.c
tst_inmemory.c Improve UTF8 Support On Windows 2022-02-08 20:53:30 -07:00
tst_inq_type.c
tst_large_cdf5.c Revert "Revert "Fix nczarr-experimental: improve build support, disengage hdf5 vs netcdf4 flags, and find AWS libraries"" 2020-08-17 19:15:47 -06:00
tst_large.c Revert "Revert "Fix nczarr-experimental: improve build support, disengage hdf5 vs netcdf4 flags, and find AWS libraries"" 2020-08-17 19:15:47 -06:00
tst_max_var_dims.c
tst_meta.c
tst_misc.c Improve UTF8 Support On Windows 2022-02-08 20:53:30 -07:00
tst_names.c Revert "Revert "Fix nczarr-experimental: improve build support, disengage hdf5 vs netcdf4 flags, and find AWS libraries"" 2020-08-17 19:15:47 -06:00
tst_nofill2.c
tst_nofill3.c
tst_nofill.c fixing some issuses of pnetcdf tests in nc_test 2022-04-09 13:52:29 -06:00
tst_norm.c
tst_open_cdf5.c
tst_open_mem.c Remove need for HDF5-1.6 API being defined 2021-04-28 13:59:24 -06:00
tst_parallel2.c
tst_pnetcdf.c Fix some addtional errors in NCZarr 2022-09-09 14:25:24 -06:00
tst_small.c
tst_utf8_phrases.c
tst_utf8_validate.c
util.c Explicit cast to unsigned char. 2023-02-24 13:37:28 -07:00