From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2883 invoked by alias); 22 Jun 2009 15:01:41 -0000 Received: (qmail 2261 invoked by alias); 22 Jun 2009 15:01:38 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_21,J_CHICKENPOX_31,J_CHICKENPOX_43,SPF_HELO_PASS X-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_21,J_CHICKENPOX_31,J_CHICKENPOX_43,SPF_HELO_PASS X-Spam-Check-By: sourceware.org X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bastion2.fedora.phx.redhat.com Subject: cluster: STABLE3 - gfs: kill dead test code To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: cluster.git X-Git-Refname: refs/heads/STABLE3 X-Git-Reftype: branch X-Git-Oldrev: ea90559c936792e22576cac7a0bd0a2a50573426 X-Git-Newrev: 318ca6b020df9e06951d602c8aa2fe17acb85f83 From: "Fabio M. Di Nitto" Message-Id: <20090622150107.45A601201D4@lists.fedorahosted.org> Date: Mon, 22 Jun 2009 15:01:00 -0000 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2009-q2/txt/msg00616.txt.bz2 Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=318ca6b020df9e06951d602c8aa2fe17acb85f83 Commit: 318ca6b020df9e06951d602c8aa2fe17acb85f83 Parent: ea90559c936792e22576cac7a0bd0a2a50573426 Author: Fabio M. Di Nitto AuthorDate: Mon Jun 22 16:57:48 2009 +0200 Committer: Fabio M. Di Nitto CommitterDate: Mon Jun 22 16:59:13 2009 +0200 gfs: kill dead test code ACK by Bob and Steven Signed-off-by: Fabio M. Di Nitto --- gfs/gfs_fsck/Makefile | 7 --- gfs/gfs_fsck/test_bitmap.c | 38 ----------------- gfs/gfs_fsck/test_block_list.c | 91 ---------------------------------------- 3 files changed, 0 insertions(+), 136 deletions(-) diff --git a/gfs/gfs_fsck/Makefile b/gfs/gfs_fsck/Makefile index c0e5938..4832872 100644 --- a/gfs/gfs_fsck/Makefile +++ b/gfs/gfs_fsck/Makefile @@ -50,14 +50,7 @@ LDFLAGS += -L${libdir} ${TARGET}: $(OBJS) $(CC) -o $@ $^ $(LDFLAGS) -test_block_list: block_list.o bitmap.o log.o test_block_list.o - $(CC) -o $@ $^ $(LDFLAGS) - -test_bitmap: bitmap.o test_bitmap.o log.o - $(CC) -o $@ $^ $(LDFLAGS) - clean: generalclean - rm -f test_block_list test_bitmap ${TARGET}.pot: $(OBJS:.o=.c) xgettext -C -F --keyword=print_log --keyword=log_debug --keyword=log_info --keyword=_ \ diff --git a/gfs/gfs_fsck/test_bitmap.c b/gfs/gfs_fsck/test_bitmap.c deleted file mode 100644 index 18e23bd..0000000 --- a/gfs/gfs_fsck/test_bitmap.c +++ /dev/null @@ -1,38 +0,0 @@ -#include -#include -#include "log.h" -#include "bitmap.h" - -int main(int argc, char **argv) -{ - struct bmap map; - uint8_t val = 0; - - bitmap_create(&map, 1000, 8); - - bitmap_set(&map, 1, 3); - - bitmap_get(&map, 1, &val); - - printf("%d\n", val); - - bitmap_set(&map, 2, 7); - - bitmap_get(&map, 2, &val); - - printf("%d\n", val); - - bitmap_get(&map, 3, &val); - - printf("%d\n", val); - - bitmap_clear(&map, 2); - - bitmap_get(&map, 2, &val); - - printf("%d\n", val); - - bitmap_destroy(&map); - - -} diff --git a/gfs/gfs_fsck/test_block_list.c b/gfs/gfs_fsck/test_block_list.c deleted file mode 100644 index cd25f05..0000000 --- a/gfs/gfs_fsck/test_block_list.c +++ /dev/null @@ -1,91 +0,0 @@ -#include -#include -#include "block_list.h" - -#define BITS 100 -void print_map(struct block_list *il, int count); - -int main(int argc, char **argv) -{ - int i; - struct block_list *il; - - il = block_list_create(BITS, gbmap); - - /*for(i = 0; i < BITS; i++) { - block_check(il, i, &k); - printf("Block %d is %lu\n", i, k); - }*/ - print_map(il, BITS); - - block_mark(il, 3, meta_free); - block_mark(il, 6, inode_lnk); - block_mark(il, 6, bad_block); - block_mark(il, BITS-2, meta_inval); - block_mark(il, BITS-1, meta_free); - if(block_mark(il, BITS, meta_free)) { - fprintf(stderr, "Block %d out of bounds\n", BITS); - } - - /*for(i = 0; i < BITS; i++) { - block_check(il, i, &k); - printf("Block %d is %lu\n", i, k); - }*/ - print_map(il, BITS); - - for(i = 70; i < 80; i++) { - block_mark(il, i, meta_free); - } - - block_clear(il, BITS-2, meta_free); - - /*for(i = 0; i < BITS; i++) { - block_check(il, i, &k); - printf("Block %d is %lu\n", i, k); - }*/ - print_map(il, BITS); - return 0; - -} - -void print_map(struct block_list *il, int count) -{ - int i, j; - struct block_query q; - - printf("Printing map of blocks - 60 blocks per row\n"); - j = 0; - for(i = 0; i < count; i++) { - - if(j > 59) { - printf("\n"); - j = 0; - } - else if(!(j %10) && j != 0) { - printf(" "); - } - j++; - block_check(il, i, &q); - printf("%X", q.block_type); - - } - printf("\n"); - - printf("Printing map of bad blocks - 60 blocks per row\n"); - j = 0; - for(i = 0; i < count; i++) { - - if(j > 59) { - printf("\n"); - j = 0; - } - else if(!(j %10) && j != 0) { - printf(" "); - } - j++; - block_check(il, i, &q); - printf("%X", q.bad_block); - - } - printf("\n"); -}