netcdf-c/nc_test
Wei-keng Liao 0ee68a3263 This commit fixes the logical problem of using the default file formats.
The fix includes the following changes.
1. Checking and using the default file format at file create time is now
   done only when the create mode (argument cmode) does not include any
   format related flags, i.e. NC_64BIT_OFFSET, NC_64BIT_DATA,
   NC_CLASSIC_MODEL, and NC_NETCDF4.
2. Adjustment of cmode based on the default format is now done in
   NC_create() only. The idea is to adjust cmode before entering the
   dispatcher's file create subroutine.
3. Any adjustment of cmode is removed from all I/O dispatchers, i.e.
   NC4_create(), NC3_create(), and NCP_create().
4. Checking for illegal cmode has been done in check_create_mode() called
   in NC_create(). This commit removes the redundant checking from
   NCP_create().
5. Remove PnetCDF tests in nc_test/tst_names.c, so it can focus on testing
   all classic formats and netCDF4 formats.

Two new test programs are added. They can be used to test netCDF with and
without this commit.
1. nc_test/tst_default_format.c
2. nc_test/tst_default_format_pnetcdf.c (use when PnetCDF is enabled).
2018-07-28 11:18:28 -05:00
..
bad_cdf5_begin.nc add a test program to read a CDF-5 file with a corrupted header 2017-09-16 14:04:39 -05:00
CMakeLists.txt This commit fixes the logical problem of using the default file formats. 2018-07-28 11:18:28 -05:00
error.c match type of a subroutine argument 2016-10-25 13:28:38 -05:00
error.h match type of a subroutine argument 2016-10-25 13:28:38 -05:00
f03tst_open_mem.nc Fix use of 'int' to represent 'hid_t' that caused HDF5 1.10 to fail. 2018-05-30 14:47:37 -06:00
large_files.c fixed some warnings, added some files to makefile.am to be cleaned 2017-11-26 08:50:16 -07:00
Make0 Merge branch 'master' into vars.dmh 2018-06-08 15:50:28 -06:00
make_test_file.sh moving to trunk subdir 2010-06-03 13:24:43 +00:00
Makefile.am This commit fixes the logical problem of using the default file formats. 2018-07-28 11:18:28 -05:00
nc_enddef.cdl moving to trunk subdir 2010-06-03 13:24:43 +00:00
nc_sync.cdl moving to trunk subdir 2010-06-03 13:24:43 +00:00
nc_test.c replace USE_CDF5 with ENABLE_CDF5 2018-06-29 21:17:07 -05:00
nc_test.html moving to trunk subdir 2010-06-03 13:24:43 +00:00
quick_large_files.c now run tst_large2, also cleaned up some more warnings 2017-11-24 10:50:07 -07:00
ref_tst_diskless2.cdl - Implemented diskless files for both netcdf classic and extended. 2012-03-26 01:34:32 +00:00
run_cdf5.sh add another test program to check if a CDF-5 file has a corrupted header 2017-09-16 14:30:09 -05:00
run_diskless2.sh When large file tests are enabled, this test fails in Docker. Fixed by switching from sh to bash. 2018-06-14 12:46:39 -06:00
run_diskless5.sh typo 2017-05-03 10:19:35 -06:00
run_diskless.sh Configuring a test so that it won't fail during parallel testing. 2017-12-06 15:00:21 -07:00
run_inmemory.sh Fix use of 'int' to represent 'hid_t' that caused HDF5 1.10 to fail. 2018-05-30 14:47:37 -06:00
run_mmap.sh Fix pull request https://github.com/Unidata/netcdf-c/pull/374 (dap4.dmh) 2017-04-03 21:39:44 -06:00
run_pnetcdf_test.sh Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
t_nc_p5.c Misc. source comment typos 2018-04-26 23:04:01 -04:00
t_nc.c replace USE_CDF5 with ENABLE_CDF5 2018-06-29 21:17:07 -05:00
test_get_p5.c merge-squash 2015-10-09 10:12:11 -06:00
test_get_p5.m4 add CDF format checking in hash4 to exclude the NC_BYTE-to-uchar exception fro CDF-5 format 2016-10-08 13:48:22 -05:00
test_get.m4 silence warnings from Travis CI 2017-03-11 12:51:04 -06:00
test_put.m4 Fix build on pre-C99 compilers 2017-11-26 01:47:54 +05:30
test_read.m4 Eliminate NC_MAX_VARS|DIMS|ATTRS limits 2017-07-20 09:32:29 -06:00
test_write.m4 replace USE_CDF5 with ENABLE_CDF5 2018-06-29 21:17:07 -05:00
testnc3perf.c Fix pull request https://github.com/Unidata/netcdf-c/pull/374 (dap4.dmh) 2017-04-03 21:39:44 -06:00
tests.h This completes (for now) the refactoring of libsrc4. 2018-03-16 11:46:18 -06:00
tst_addvar.c Misc. source comment typos 2018-04-26 23:04:01 -04:00
tst_atts3.c fixed warnings 2017-10-25 06:12:59 -06:00
tst_big_rvar.c now run tst_large2, also cleaned up some more warnings 2017-11-24 10:50:07 -07:00
tst_big_var2.c fixed some warnings, added some files to makefile.am to be cleaned 2017-11-26 08:50:16 -07:00
tst_big_var6.c fixed some warnings, added some files to makefile.am to be cleaned 2017-11-26 08:50:16 -07:00
tst_big_var.c Housekeeping on large file tests. 2016-11-18 15:48:58 -07:00
tst_cdf5_begin.c disable CDF5 tests when size_t is less than 8 bytes 2017-09-16 17:35:52 -05:00
tst_cdf5format.c cleaned up, fixed comments 2017-11-06 06:19:34 -07:00
tst_def_var_fill.c replace USE_CDF5 with ENABLE_CDF5 2018-06-29 21:17:07 -05:00
tst_default_format_pnetcdf.c This commit fixes the logical problem of using the default file formats. 2018-07-28 11:18:28 -05:00
tst_default_format.c This commit fixes the logical problem of using the default file formats. 2018-07-28 11:18:28 -05:00
tst_diskless2.c Fix non-portable test that depends on nonstandardized floating-point format using e+08, not e+008. Fixes for some problems reported in scan-build static analysis. 2012-04-23 23:59:24 +00:00
tst_diskless3.c More refactoring, pushing to avoid accidental loss. 2016-10-21 19:24:40 +00:00
tst_diskless4.c More refactoring, pushing to avoid accidental loss. 2016-10-21 19:24:40 +00:00
tst_diskless5.c re: esupport MQO-415619 2018-02-25 21:45:31 -07:00
tst_diskless5.cdl Add testcase 2017-05-03 09:58:49 -06:00
tst_diskless.c This completes (for now) the refactoring of libsrc4. 2018-03-16 11:46:18 -06:00
tst_err_enddef.c Adjusted enddef test to work on 32 bit platforms as well. 2018-04-18 13:20:50 -06:00
tst_formats.c finally got my distcheck act together by moving hdf4 file test to nc_test4 2017-11-23 04:41:03 -07:00
tst_formatx_pnetcdf.c Call nc_close, which calls MPI_File_close, to avoid MPI wraning messages on MPI objects are still allocated. 2017-08-08 16:54:38 -05:00
tst_global_fillval.c replace USE_CDF5 with ENABLE_CDF5 2018-06-29 21:17:07 -05:00
tst_inmemory.c nc_set_log_level only available for netcdf-4 builds 2018-07-16 15:38:45 -06:00
tst_inq_type.c fixed ENABLE_CDF5 issue in some tests 2017-11-05 09:08:39 -07:00
tst_large_cdf5.c Fixed a simple mistake in test organization. 2017-08-11 18:36:44 -06:00
tst_large.c Housekeeping on large file tests. 2016-11-18 15:48:58 -07:00
tst_max_var_dims.c 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
tst_meta.c Corrected second instance of macro. 2018-01-29 11:27:15 -07:00
tst_misc.c Fix https://github.com/Unidata/netcdf-c/issues/963 2018-05-11 15:30:19 -06:00
tst_names.c This commit fixes the logical problem of using the default file formats. 2018-07-28 11:18:28 -05:00
tst_nofill2.c 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
tst_nofill3.c 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
tst_nofill.c 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
tst_norm.c 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
tst_open_cdf5.c Added include to config.h 2018-02-06 13:14:15 -06:00
tst_open_mem.c Fix use of 'int' to represent 'hid_t' that caused HDF5 1.10 to fail. 2018-05-30 14:47:37 -06:00
tst_parallel2.c change to use Wei-kings' solution 2017-10-25 13:07:17 -06:00
tst_pnetcdf.c Corrected parallel tests in support of https://github.com/Unidata/netcdf-c/issues.321 2016-10-24 22:45:15 +00:00
tst_small.c replace USE_CDF5 with ENABLE_CDF5 2018-06-29 21:17:07 -05:00
tst_utf8_phrases.c fixed leaks in tests 2017-10-26 14:50:21 -06:00
tst_utf8_validate.c fixed warning 2017-11-30 05:14:19 -07:00
util.c This commit fixes the logical problem of using the default file formats. 2018-07-28 11:18:28 -05:00