summaryrefslogtreecommitdiffstats
path: root/c++/test/tvlstr.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2013-03-22 17:56:05 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2013-03-22 17:56:05 (GMT)
commitc8018386da2165a16f5e2d0cb5a391dca07b4ed5 (patch)
treebd9af146bf98c667e9237afc21bb5f108eb81dbc /c++/test/tvlstr.cpp
parent030a17ca60905ef90cabaa147ee84febb064fc42 (diff)
downloadhdf5-c8018386da2165a16f5e2d0cb5a391dca07b4ed5.zip
hdf5-c8018386da2165a16f5e2d0cb5a391dca07b4ed5.tar.gz
hdf5-c8018386da2165a16f5e2d0cb5a391dca07b4ed5.tar.bz2
[svn-r23427] Purpose: Fix bug HDFFV-8067
Description: + The C++ test failed with the new PGI compilers versions 12.4 and 12.5 + An exception thrown by an internal function, which was called by a constructor, was not propagating to the test program during the stack unwinding, so it couldn't be caught by the test and the program terminated. + Various trials and errors indicated that the problem is where an STD string converted to a char* being passed to the internal function, but confirmation has not been found yet. It could be a compiler bug. Solution: + Added a try/catch in the constructor around the internal function and re-throw the exception when it is caught. This is a workaround. + Unrelated minor fixes: removed unused variables and MESSAGE's; commented out tvlstr.cpp/test_read_vl_string_attribute because it may be redundant, and commented out H5Tpkg.h inclusion because TEST_ALIGNMENT is not added yet and probably not necessary in the C++ API. Platforms tested: Linux/32 2.6 (jam) with PGI compilers Linux/32 2.6 (jam) with GNU compilers Linux/64 2.6 (koala)
Diffstat (limited to 'c++/test/tvlstr.cpp')
-rw-r--r--c++/test/tvlstr.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/c++/test/tvlstr.cpp b/c++/test/tvlstr.cpp
index 73e54e0..89f24f2 100644
--- a/c++/test/tvlstr.cpp
+++ b/c++/test/tvlstr.cpp
@@ -129,7 +129,7 @@ void test_vlstr_free_custom(void *_mem, void *info)
*-------------------------------------------------------------------------
*/
// String for testing datasets
-static char stastring_ds_write[1]={'A'};
+// static char stastring_ds_write[1]={'A'};
// Info for a string dataset
const H5std_string DSET1_NAME("String_ds");
@@ -687,6 +687,7 @@ static void test_vlstring_attribute()
}
} // test_vlstring_attribute()
+#if 0
/*-------------------------------------------------------------------------
* Function: test_read_vl_string_attribute
*
@@ -746,6 +747,7 @@ static void test_read_vl_string_attribute()
issue_fail_msg("test_read_vl_string_attribute()", __LINE__, __FILE__, E.getCDetailMsg());
}
} // test_read_vl_string_attribute
+#endif // 2013: need to verify before adding to test
/*-------------------------------------------------------------------------
* Function: test_vlstring_array_attribute
@@ -957,7 +959,6 @@ extern "C"
void test_vlstrings()
{
// Output message about test being performed
- //MESSAGE("Testing Variable-Length Strings");
MESSAGE(5, ("Testing Variable-Length Strings"));
// These tests use the same file