summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1997-08-12 22:46:07 (GMT)
committerRobb Matzke <matzke@llnl.gov>1997-08-12 22:46:07 (GMT)
commit46ef9d9c266b704ba93ed55296ed2ebab600a2a4 (patch)
tree47c6ec9e07b4fee798109d58b928747117f4a02a
parentfb947c34b142578774d5bb657c0b3e2a9b4781c7 (diff)
downloadhdf5-46ef9d9c266b704ba93ed55296ed2ebab600a2a4.zip
hdf5-46ef9d9c266b704ba93ed55296ed2ebab600a2a4.tar.gz
hdf5-46ef9d9c266b704ba93ed55296ed2ebab600a2a4.tar.bz2
[svn-r26] ./test/tfile.h
Removed unused local variables. ./test/tstab.c Now uses directory-aware functions which in turn call the unaware functions.
-rw-r--r--test/tfile.c4
-rw-r--r--test/tstab.c38
2 files changed, 28 insertions, 14 deletions
diff --git a/test/tfile.c b/test/tfile.c
index 81c8cd2..7bc8c91 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -225,8 +225,8 @@ printf("BTREE_SIZE=%u\n",parm);
****************************************************************/
static void test_file_open(void)
{
- hatom_t fid1,fid2,fid3; /* HDF5 File IDs */
- hatom_t tmpl1,tmpl2; /* File creation templates */
+ hatom_t fid1; /* HDF5 File IDs */
+ hatom_t tmpl1; /* File creation templates */
uintn parm; /* File-creation parameters */
herr_t ret; /* Generic return value */
diff --git a/test/tstab.c b/test/tstab.c
index 0b4c80c..7dddc6c 100644
--- a/test/tstab.c
+++ b/test/tstab.c
@@ -19,6 +19,7 @@
#include "H5ACprivate.h"
#include "H5Fprivate.h"
#include "H5Gprivate.h"
+#include "H5Oprivate.h"
/*-------------------------------------------------------------------------
@@ -41,11 +42,11 @@ test_stab (void)
{
hatom_t fid;
hdf5_file_t *f;
- haddr_t addr;
- H5G_entry_t root, sub;
+ H5G_entry_t cwd, sub;
int i;
char name[256];
herr_t status;
+ int nsyms = 5000;
MESSAGE (5, print_func("Testing Symbol Tables\n"););
@@ -55,20 +56,33 @@ test_stab (void)
f = H5Aatom_object (fid);
CHECK (f, NULL, "H5Aatom_object");
- /* create a new symbol table */
- addr = H5G_stab_new (f, &root, 100);
- CHECK_I (addr, "H5G_stab_new");
- MESSAGE (8, print_func ("Root address is %lu\n", (unsigned long)addr););
-
- /* create some empty symbol tables as objects in the root stab */
- for (i=0; i<16384; i++) {
- addr = H5G_stab_new (f, &sub, 0);
- CHECK_I (addr, "H5G_stab_new");
+ /* create a new root symbol table */
+ status = H5G_mkroot (f, 100);
+ CHECK_I (status, "H5G_mkroot");
+ /*
+ * Create a directory that has so many entries that the root
+ * of the B-tree ends up splitting.
+ */
+ status = H5G_new (f, NULL, NULL, "/big", nsyms*10+2, &cwd);
+ CHECK_I (status, "H5G_new");
+ H5G_stab_new (f, &sub, 0);
+ status = H5O_link (f, sub.header, &sub, nsyms-1);
+ CHECK_I (status, "H5O_link");
+
+
+ for (i=0; i<5000; i++) {
sprintf (name, "sub%05d", i);
MESSAGE (8, print_func ("%s\n", name););
- status = H5G_stab_insert (f, &root, name, &sub);
+#if 1
+ status = H5G_insert (f, &cwd, NULL, name, &sub);
+ CHECK_I (status, "H5G_insert");
+#else
+ status = H5G_stab_new (f, &sub, 0);
+ CHECK_I (status, "H5G_stab_new");
+ status = H5G_stab_insert (f, &cwd, name, &sub);
CHECK_I (status, "H5G_stab_insert");
+#endif
}