summaryrefslogtreecommitdiff
path: root/old-tests
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2005-10-16 23:03:59 +0000
committerAlasdair Kergon <agk@redhat.com>2005-10-16 23:03:59 +0000
commit67eb7723d6685e954484d572c3590144f619feed (patch)
treee2593b67101f9e681cf3a9a5dafedb58c23c661a /old-tests
parent251d13847477103065dfbc51988db424f07e300a (diff)
downloadlvm2-67eb7723d6685e954484d572c3590144f619feed.tar.gz
Use hash, bitset, malloc, pool from libdevmapper.
Diffstat (limited to 'old-tests')
-rw-r--r--old-tests/config/config_t.c1
-rw-r--r--old-tests/datastruct/hash_t.c3
-rw-r--r--old-tests/device/dev_cache_t.c1
-rw-r--r--old-tests/filters/pfilter_t.c1
-rw-r--r--old-tests/filters/rfilter_t.c1
-rw-r--r--old-tests/format1/get_pvs_t.c8
-rw-r--r--old-tests/format1/get_vgs_t.c8
-rw-r--r--old-tests/format1/read_pv_t.c8
-rw-r--r--old-tests/format1/read_vg_t.c8
-rw-r--r--old-tests/format1/write_vg_t.c8
-rw-r--r--old-tests/mm/dbg_malloc_t.c1
-rw-r--r--old-tests/regex/matcher_t.c7
-rw-r--r--old-tests/regex/parse_t.c8
13 files changed, 21 insertions, 42 deletions
diff --git a/old-tests/config/config_t.c b/old-tests/config/config_t.c
index f0d681964..9b9e56e60 100644
--- a/old-tests/config/config_t.c
+++ b/old-tests/config/config_t.c
@@ -3,7 +3,6 @@
*/
#include <stdio.h>
-#include "dbg_malloc.h"
#include "config.h"
int main(int argc, char **argv)
diff --git a/old-tests/datastruct/hash_t.c b/old-tests/datastruct/hash_t.c
index f70c093dc..e977eab36 100644
--- a/old-tests/datastruct/hash_t.c
+++ b/old-tests/datastruct/hash_t.c
@@ -13,9 +13,6 @@
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "hash.h"
-#include "dbg_malloc.h"
-
#include <stdio.h>
static void _help(FILE *fp, const char *prog)
diff --git a/old-tests/device/dev_cache_t.c b/old-tests/device/dev_cache_t.c
index b71652ed6..f19a56f83 100644
--- a/old-tests/device/dev_cache_t.c
+++ b/old-tests/device/dev_cache_t.c
@@ -13,7 +13,6 @@
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "dbg_malloc.h"
#include "dev-cache.h"
#include "log.h"
diff --git a/old-tests/filters/pfilter_t.c b/old-tests/filters/pfilter_t.c
index 5a6001b01..e9f8af4f7 100644
--- a/old-tests/filters/pfilter_t.c
+++ b/old-tests/filters/pfilter_t.c
@@ -15,7 +15,6 @@
#include "filter-persistent.h"
#include "log.h"
-#include "dbg_malloc.h"
#include "config.h"
#include "filter-regex.h"
diff --git a/old-tests/filters/rfilter_t.c b/old-tests/filters/rfilter_t.c
index b08cfb755..6f0bb9d20 100644
--- a/old-tests/filters/rfilter_t.c
+++ b/old-tests/filters/rfilter_t.c
@@ -16,7 +16,6 @@
#include "filter-regex.h"
#include "config.h"
#include "log.h"
-#include "dbg_malloc.h"
#include <stdio.h>
#include <ctype.h>
diff --git a/old-tests/format1/get_pvs_t.c b/old-tests/format1/get_pvs_t.c
index 99e29de3d..cc0f00d4e 100644
--- a/old-tests/format1/get_pvs_t.c
+++ b/old-tests/format1/get_pvs_t.c
@@ -15,8 +15,6 @@
#include "log.h"
#include "format1.h"
-#include "dbg_malloc.h"
-#include "pool.h"
#include "pretty_print.h"
#include "list.h"
@@ -26,7 +24,7 @@ int main(int argc, char **argv)
{
struct io_space *ios;
struct list_head *pvs, *tmp;
- struct pool *mem;
+ struct dm_pool *mem;
init_log(stderr);
init_debug(_LOG_INFO);
@@ -41,7 +39,7 @@ int main(int argc, char **argv)
exit(1);
}
- if (!(mem = pool_create(10 * 1024))) {
+ if (!(mem = dm_pool_create(10 * 1024))) {
fprintf(stderr, "couldn't create pool\n");
exit(1);
}
@@ -67,7 +65,7 @@ int main(int argc, char **argv)
ios->destroy(ios);
- pool_destroy(mem);
+ dm_pool_destroy(mem);
dev_cache_exit();
dump_memory();
fin_log();
diff --git a/old-tests/format1/get_vgs_t.c b/old-tests/format1/get_vgs_t.c
index 51dff2313..a9662c9e1 100644
--- a/old-tests/format1/get_vgs_t.c
+++ b/old-tests/format1/get_vgs_t.c
@@ -15,8 +15,6 @@
#include "log.h"
#include "format1.h"
-#include "dbg_malloc.h"
-#include "pool.h"
#include "pretty_print.h"
#include "list.h"
@@ -26,7 +24,7 @@ int main(int argc, char **argv)
{
struct io_space *ios;
struct list_head *vgs;
- struct pool *mem;
+ struct dm_pool *mem;
init_log(stderr);
init_debug(_LOG_INFO);
@@ -41,7 +39,7 @@ int main(int argc, char **argv)
exit(1);
}
- if (!(mem = pool_create(10 * 1024))) {
+ if (!(mem = dm_pool_create(10 * 1024))) {
fprintf(stderr, "couldn't create pool\n");
exit(1);
}
@@ -63,7 +61,7 @@ int main(int argc, char **argv)
dump_vg_names(vgs, stdout);
ios->destroy(ios);
- pool_destroy(mem);
+ dm_pool_destroy(mem);
dev_cache_exit();
dump_memory();
fin_log();
diff --git a/old-tests/format1/read_pv_t.c b/old-tests/format1/read_pv_t.c
index 30e22bbe0..aa1ff8513 100644
--- a/old-tests/format1/read_pv_t.c
+++ b/old-tests/format1/read_pv_t.c
@@ -15,8 +15,6 @@
#include "log.h"
#include "format1.h"
-#include "dbg_malloc.h"
-#include "pool.h"
#include "pretty_print.h"
#include "list.h"
@@ -26,7 +24,7 @@ int main(int argc, char **argv)
{
struct io_space *ios;
struct physical_volume *pv;
- struct pool *mem;
+ struct dm_pool *mem;
struct device *dev;
if (argc != 2) {
@@ -47,7 +45,7 @@ int main(int argc, char **argv)
exit(1);
}
- if (!(mem = pool_create(10 * 1024))) {
+ if (!(mem = dm_pool_create(10 * 1024))) {
fprintf(stderr, "couldn't create pool\n");
exit(1);
}
@@ -69,7 +67,7 @@ int main(int argc, char **argv)
dump_pv(pv, stdout);
ios->destroy(ios);
- pool_destroy(mem);
+ dm_pool_destroy(mem);
dev_cache_exit();
dump_memory();
fin_log();
diff --git a/old-tests/format1/read_vg_t.c b/old-tests/format1/read_vg_t.c
index da5f37105..518756b21 100644
--- a/old-tests/format1/read_vg_t.c
+++ b/old-tests/format1/read_vg_t.c
@@ -15,8 +15,6 @@
#include "log.h"
#include "format1.h"
-#include "dbg_malloc.h"
-#include "pool.h"
#include "pretty_print.h"
#include <stdio.h>
@@ -25,7 +23,7 @@ int main(int argc, char **argv)
{
struct io_space *ios;
struct volume_group *vg;
- struct pool *mem;
+ struct dm_pool *mem;
if (argc != 2) {
fprintf(stderr, "usage: read_vg_t <vg_name>\n");
@@ -45,7 +43,7 @@ int main(int argc, char **argv)
exit(1);
}
- if (!(mem = pool_create(10 * 1024))) {
+ if (!(mem = dm_pool_create(10 * 1024))) {
fprintf(stderr, "couldn't create pool\n");
exit(1);
}
@@ -68,7 +66,7 @@ int main(int argc, char **argv)
ios->destroy(ios);
- pool_destroy(mem);
+ dm_pool_destroy(mem);
dev_cache_exit();
dump_memory();
fin_log();
diff --git a/old-tests/format1/write_vg_t.c b/old-tests/format1/write_vg_t.c
index f531dbd95..16fe8c936 100644
--- a/old-tests/format1/write_vg_t.c
+++ b/old-tests/format1/write_vg_t.c
@@ -15,8 +15,6 @@
#include "log.h"
#include "format1.h"
-#include "dbg_malloc.h"
-#include "pool.h"
#include "pretty_print.h"
#include <stdio.h>
@@ -25,7 +23,7 @@ int main(int argc, char **argv)
{
struct io_space *ios;
struct volume_group *vg;
- struct pool *mem;
+ struct dm_pool *mem;
if (argc != 2) {
fprintf(stderr, "usage: read_vg_t <vg_name>\n");
@@ -45,7 +43,7 @@ int main(int argc, char **argv)
exit(1);
}
- if (!(mem = pool_create(10 * 1024))) {
+ if (!(mem = dm_pool_create(10 * 1024))) {
fprintf(stderr, "couldn't create pool\n");
exit(1);
}
@@ -71,7 +69,7 @@ int main(int argc, char **argv)
ios->destroy(ios);
- pool_destroy(mem);
+ dm_pool_destroy(mem);
dev_cache_exit();
dump_memory();
fin_log();
diff --git a/old-tests/mm/dbg_malloc_t.c b/old-tests/mm/dbg_malloc_t.c
index f46a97842..a1b14cbf2 100644
--- a/old-tests/mm/dbg_malloc_t.c
+++ b/old-tests/mm/dbg_malloc_t.c
@@ -13,7 +13,6 @@
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "dbg_malloc.h"
#include "log.h"
#include <stdio.h>
diff --git a/old-tests/regex/matcher_t.c b/old-tests/regex/matcher_t.c
index c45d5564a..a06881dd6 100644
--- a/old-tests/regex/matcher_t.c
+++ b/old-tests/regex/matcher_t.c
@@ -14,7 +14,6 @@
*/
#include "matcher.h"
-#include "dbg_malloc.h"
#include "log.h"
#include <stdio.h>
@@ -105,7 +104,7 @@ static void _scan_input(struct matcher *m, char **regex)
int main(int argc, char **argv)
{
- struct pool *mem;
+ struct dm_pool *mem;
struct matcher *scanner;
char **regex;
int nregex;
@@ -118,7 +117,7 @@ int main(int argc, char **argv)
init_log(stderr);
init_debug(_LOG_DEBUG);
- if (!(mem = pool_create(10 * 1024))) {
+ if (!(mem = dm_pool_create(10 * 1024))) {
fprintf(stderr, "Couldn't create pool\n");
exit(2);
}
@@ -135,7 +134,7 @@ int main(int argc, char **argv)
_scan_input(scanner, regex);
_free_regex(regex, nregex);
- pool_destroy(mem);
+ dm_pool_destroy(mem);
dump_memory();
fin_log();
diff --git a/old-tests/regex/parse_t.c b/old-tests/regex/parse_t.c
index 479e9591c..b6fab0fe8 100644
--- a/old-tests/regex/parse_t.c
+++ b/old-tests/regex/parse_t.c
@@ -13,10 +13,8 @@
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "dbg_malloc.h"
#include "log.h"
#include "../../lib/regex/parse_rx.h"
-#include "bitset.h"
#include <stdio.h>
#include <ctype.h>
@@ -72,7 +70,7 @@ static void _pretty_print(struct rx_node *rx, int depth)
int main(int argc, char **argv)
{
- struct pool *mem;
+ struct dm_pool *mem;
struct rx_node *rx;
if (argc != 2) {
@@ -83,7 +81,7 @@ int main(int argc, char **argv)
init_log(stderr);
init_debug(_LOG_INFO);
- if (!(mem = pool_create(1024))) {
+ if (!(mem = dm_pool_create(1024))) {
fprintf(stderr, "Couldn't create pool\n");
exit(1);
}
@@ -94,7 +92,7 @@ int main(int argc, char **argv)
}
_pretty_print(rx, 0);
- pool_destroy(mem);
+ dm_pool_destroy(mem);
dump_memory();
fin_log();