summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/src/hdf/hdf5lib/HDF5Constants.java6
-rw-r--r--java/src/jni/h5Constants.c4
-rw-r--r--java/test/TestH5E.java14
-rw-r--r--java/test/TestH5Edefault.java22
-rw-r--r--java/test/testfiles/JUnit-TestH5Edefault.txt50
5 files changed, 62 insertions, 34 deletions
diff --git a/java/src/hdf/hdf5lib/HDF5Constants.java b/java/src/hdf/hdf5lib/HDF5Constants.java
index 7eddac0..b530f4b 100644
--- a/java/src/hdf/hdf5lib/HDF5Constants.java
+++ b/java/src/hdf/hdf5lib/HDF5Constants.java
@@ -190,6 +190,7 @@ public class HDF5Constants {
public static final long H5E_UNSUPPORTED = H5E_UNSUPPORTED();
public static final long H5E_VERSION = H5E_VERSION();
public static final long H5E_VFL = H5E_VFL();
+ public static final long H5E_VOL = H5E_VOL();
public static final long H5E_WALK_DOWNWARD = H5E_WALK_DOWNWARD();
public static final long H5E_WALK_UPWARD = H5E_WALK_UPWARD();
public static final long H5E_WRITEERROR = H5E_WRITEERROR();
@@ -317,6 +318,7 @@ public class HDF5Constants {
public static final int H5I_REFERENCE = H5I_REFERENCE();
public static final int H5I_UNINIT = H5I_UNINIT();
public static final int H5I_VFL = H5I_VFL();
+ public static final int H5I_VOL = H5I_VOL();
public static final int H5L_TYPE_ERROR = H5L_TYPE_ERROR();
public static final int H5L_TYPE_HARD = H5L_TYPE_HARD();
@@ -980,6 +982,8 @@ public class HDF5Constants {
private static native final long H5E_VFL();
+ private static native final long H5E_VOL();
+
private static native final long H5E_WALK_DOWNWARD();
private static native final long H5E_WALK_UPWARD();
@@ -1224,6 +1228,8 @@ public class HDF5Constants {
private static native final int H5I_VFL();
+ private static native final int H5I_VOL();
+
private static native final int H5L_TYPE_ERROR();
private static native final int H5L_TYPE_HARD();
diff --git a/java/src/jni/h5Constants.c b/java/src/jni/h5Constants.c
index c99745d..fdec61a 100644
--- a/java/src/jni/h5Constants.c
+++ b/java/src/jni/h5Constants.c
@@ -344,6 +344,8 @@ Java_hdf_hdf5lib_HDF5Constants_H5E_1VERSION(JNIEnv *env, jclass cls) { return H5
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1VFL(JNIEnv *env, jclass cls) { return H5E_VFL; }
JNIEXPORT jlong JNICALL
+Java_hdf_hdf5lib_HDF5Constants_H5E_1VOL(JNIEnv *env, jclass cls) { return H5E_VOL; }
+JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1WALK_1DOWNWARD(JNIEnv *env, jclass cls) { return H5E_WALK_DOWNWARD; }
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5E_1WALK_1UPWARD(JNIEnv *env, jclass cls) { return H5E_WALK_UPWARD; }
@@ -605,6 +607,8 @@ Java_hdf_hdf5lib_HDF5Constants_H5I_1REFERENCE(JNIEnv *env, jclass cls) { return
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5I_1VFL(JNIEnv *env, jclass cls) { return H5I_VFL; }
JNIEXPORT jint JNICALL
+Java_hdf_hdf5lib_HDF5Constants_H5I_1VOL(JNIEnv *env, jclass cls) { return H5I_VOL; }
+JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5I_1INVALID_1HID(JNIEnv *env, jclass cls) { return H5I_INVALID_HID; }
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5I_1GENPROP_1CLS(JNIEnv *env, jclass cls) { return H5I_GENPROP_CLS; }
diff --git a/java/test/TestH5E.java b/java/test/TestH5E.java
index 1f4e658..542a092 100644
--- a/java/test/TestH5E.java
+++ b/java/test/TestH5E.java
@@ -38,7 +38,7 @@ import org.junit.rules.TestName;
public class TestH5E {
@Rule public TestName testname = new TestName();
- public static final int ERRSTACK_CNT = 3;
+ public static final int ERRSTACK_CNT = 6;
public static final int ERRSTACK_MTY_CNT = 0;
long hdf_java_classid = -1;
@@ -79,7 +79,7 @@ public class TestH5E {
public void testH5Eget_msg_major() {
try {
- H5.H5Fopen("test", 0, 1);
+ H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (HDF5LibraryException hdferr) {
long errnum = hdferr.getMajorErrorNumber();
@@ -93,7 +93,7 @@ public class TestH5E {
fail("H5.H5Eget_msg(Throwable): " + err);
}
assertNotNull("H5.H5Eget_msg: " + msg, msg);
- assertEquals("H5.H5Eget_msg: ", "Object atom", msg);
+ assertEquals("H5.H5Eget_msg: ", "File accessibility", msg);
assertEquals("H5.H5Eget_msg: ", HDF5Constants.H5E_MAJOR, error_msg_type[0]);
}
catch (Throwable err) {
@@ -105,7 +105,7 @@ public class TestH5E {
@Test
public void testH5Eget_msg_minor() {
try {
- H5.H5Fopen("test", 0, 1);
+ H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (HDF5LibraryException hdferr) {
long errnum = hdferr.getMinorErrorNumber();
@@ -119,7 +119,7 @@ public class TestH5E {
fail("H5.H5Eget_msg: " + err);
}
assertNotNull("H5.H5Eget_msg: " + msg, msg);
- assertEquals("H5.H5Eget_msg: ", "Unable to find atom information (already closed?)", msg);
+ assertEquals("H5.H5Eget_msg: ", "Unable to open file", msg);
assertEquals("H5.H5Eget_msg: ", HDF5Constants.H5E_MINOR, error_msg_type[0]);
}
catch (Throwable err) {
@@ -139,7 +139,7 @@ public class TestH5E {
}
try {
- H5.H5Fopen("test", 0, 1);
+ H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
}
@@ -297,7 +297,7 @@ public class TestH5E {
fail("testH5Ewalk:H5Eset_current_stack " + err);
}
try {
- H5.H5Fopen("test", 0, 1);
+ H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
}
diff --git a/java/test/TestH5Edefault.java b/java/test/TestH5Edefault.java
index b510936..4676205 100644
--- a/java/test/TestH5Edefault.java
+++ b/java/test/TestH5Edefault.java
@@ -29,7 +29,7 @@ import org.junit.rules.TestName;
public class TestH5Edefault {
@Rule public TestName testname = new TestName();
- public static final int ERRSTACK_CNT = 3;
+ public static final int ERRSTACK_CNT = 6;
public static final int ERRSTACK_MTY_CNT = 0;
@Before
@@ -59,7 +59,7 @@ public class TestH5Edefault {
@Test
public void testH5Eprint() {
try {
- H5.H5Fopen("test", 0, 1);
+ H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
}
@@ -79,7 +79,7 @@ public class TestH5Edefault {
long stack_id = -1;
long stack_id_default = HDF5Constants.H5E_DEFAULT;
try {
- H5.H5Fopen("test", 0, 1);
+ H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
//default stack id will be different after exception
@@ -142,7 +142,7 @@ public class TestH5Edefault {
long num_msg_default = -1;
long stack_id = -1;
try {
- H5.H5Fopen("test", 0, 1);
+ H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
//err.printStackTrace(); //This will clear the error stack
@@ -191,7 +191,7 @@ public class TestH5Edefault {
//Generate errors on default stack
try {
- H5.H5Fopen("test", 0, 1);
+ H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
//err.printStackTrace(); //This will clear the error stack
@@ -282,7 +282,7 @@ public class TestH5Edefault {
long num_msg = -1;
long stack_id = -1;
try {
- H5.H5Fopen("test", 0, 1);
+ H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
//err.printStackTrace(); //This will clear the error stack
@@ -321,7 +321,7 @@ public class TestH5Edefault {
//Generate errors on default stack
try {
- H5.H5Fopen("test", 0, 1);
+ H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
//err.printStackTrace(); //This will clear the error stack
@@ -378,7 +378,7 @@ public class TestH5Edefault {
public void testH5Epop() throws Throwable {
long num_msg = -1;
try {
- H5.H5Fopen("test", 0, 1);
+ H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
}
@@ -419,7 +419,7 @@ public class TestH5Edefault {
@Test
public void testH5EprintInt() {
try {
- H5.H5Fopen("test", 0, 1);
+ H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
}
@@ -463,7 +463,7 @@ public class TestH5Edefault {
public void testH5Eclear2_with_msg() {
long num_msg = -1;
try {
- H5.H5Fopen("test", 0, 1);
+ H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
}
@@ -526,7 +526,7 @@ public class TestH5Edefault {
public void testH5Eget_num_with_msg() {
long num_msg = -1;
try {
- H5.H5Fopen("test", 0, 1);
+ H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
}
diff --git a/java/test/testfiles/JUnit-TestH5Edefault.txt b/java/test/testfiles/JUnit-TestH5Edefault.txt
index b39dbef..71d1431 100644
--- a/java/test/testfiles/JUnit-TestH5Edefault.txt
+++ b/java/test/testfiles/JUnit-TestH5Edefault.txt
@@ -34,21 +34,39 @@ OK (28 tests)
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#000: (file name) line (number) in H5Fopen(): unable to open file
- major: File accessibilty
- minor: Unable to open file
- #001: (file name) line (number) in H5F_open(): unable to retrieve VFL class
- major: File accessibilty
- minor: Can't get value
- #002: (file name) line (number) in H5FD_get_class(): can't find object for ID
- major: Object atom
- minor: Unable to find atom information (already closed?)
+ major: File accessibility
+ minor: Unable to open file
+ #001: (file name) line (number) in H5VL_file_open(): open failed
+ major: Virtual Object Layer
+ minor: Unable to initialize object
+ #002: (file name) line (number) in H5VL_native_file_open(): unable to open file
+ major: File accessibility
+ minor: Unable to open file
+ #003: (file name) line (number) in H5F_open(): unable to open file: name = 'test', tent_flags = 1
+ major: File accessibility
+ minor: Unable to open file
+ #004: (file name) line (number) in H5FD_open(): open failed
+ major: Virtual File Layer
+ minor: Unable to initialize object
+ #005: (file name) line (number) in H5FD_sec2_open(): unable to open file: name = 'test', errno = 2, error message = 'No such file or directory', flags = 1, o_flags = 2
+ major: File accessibility
+ minor: Unable to open file
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#000: (file name) line (number) in H5Fopen(): unable to open file
- major: File accessibilty
- minor: Unable to open file
- #001: (file name) line (number) in H5F_open(): unable to retrieve VFL class
- major: File accessibilty
- minor: Can't get value
- #002: (file name) line (number) in H5FD_get_class(): can't find object for ID
- major: Object atom
- minor: Unable to find atom information (already closed?)
+ major: File accessibility
+ minor: Unable to open file
+ #001: (file name) line (number) in H5VL_file_open(): open failed
+ major: Virtual Object Layer
+ minor: Unable to initialize object
+ #002: (file name) line (number) in H5VL_native_file_open(): unable to open file
+ major: File accessibility
+ minor: Unable to open file
+ #003: (file name) line (number) in H5F_open(): unable to open file: name = 'test', tent_flags = 1
+ major: File accessibility
+ minor: Unable to open file
+ #004: (file name) line (number) in H5FD_open(): open failed
+ major: Virtual File Layer
+ minor: Unable to initialize object
+ #005: (file name) line (number) in H5FD_sec2_open(): unable to open file: name = 'test', errno = 2, error message = 'No such file or directory', flags = 1, o_flags = 2
+ major: File accessibility
+ minor: Unable to open file