]> git.neil.brown.name Git - LaFS.git/commitdiff
Change to self-test scheme
authorNeilBrown <neilb@suse.de>
Sun, 27 Mar 2011 21:59:40 +0000 (08:59 +1100)
committerNeilBrown <neilb@suse.de>
Sun, 27 Mar 2011 21:59:40 +0000 (08:59 +1100)
Not read yet.

Makefile
lafs.h
super.c
test/go
test/runtty

index 77515357949fd29a2b34d3afb7def1aad65e3c7e..1b1a7b95731437ea80428578392c3f81497ef790 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -27,7 +27,7 @@ modules ::
        $(MAKE) -C $(KERNELDIR) M=`pwd` CC=$(CC) modules
 
 test: all
-       cp ../code2/fred.safe ../code2/fred
+       ../utils/tools/lafs test/maketest
        sh test/runtty 2>&1 | tee /tmp/log
        reset
 
diff --git a/lafs.h b/lafs.h
index 1d5beceaa19d5c210709d174bd5c9b0e2a8c7189..330a4feef21dfed46cd7297d241faca30926c493 100644 (file)
--- a/lafs.h
+++ b/lafs.h
@@ -71,7 +71,7 @@ extern void lafs_dump_tree(void);
 static inline int
 u32_after(u32 a, u32 b)
 {
-       return a-b>0;
+       return ((long)a-(long)b)>0;
 }
 
 const extern struct inode_operations lafs_file_ino_operations;
diff --git a/super.c b/super.c
index 478b25dff72f807f376d96b81a3b4f22653e1414..3d1f94d2f79c92164b992fa384deb1132d2d5cb2 100644 (file)
--- a/super.c
+++ b/super.c
@@ -321,7 +321,8 @@ lafs_load_super(struct block_device *bdev, void *opv, int silent)
        struct options *op = opv;
        struct devent *dv;
        struct page *pg;
-       sector_t sect, dev_addr = 0, state_addr = 0;
+       sector_t sect, dev_addr = 0;
+       int state_addr = 0;
        int err = 0;
        unsigned int n;
        int i;
diff --git a/test/go b/test/go
index 59a8dbd51aef9afe8f766281a7b62dd9c32c1031..6111b053bcf0517ab69972282579c571d7df33ee 100644 (file)
--- a/test/go
+++ b/test/go
@@ -11,13 +11,17 @@ done
 rm -f lafs.ko
 rmmod lafs.ko
 tftp 10.0.2.2 -m binary -c get /lafs.ko
-insmod lafs.ko lafs_trace=0 || exit 1
+insmod lafs.ko lafs_trace=1 || exit 1
 #mount -r -t lafs -o 'dev=/dev/sdc' /dev/sdb /mnt/1
 mount -t lafs  /dev/sdb /mnt/1
 #mount -r -t lafs_snap -o snapshot=first /mnt/1 /mnt/2
 #mount -r -t lafs_snap -o snapshot=second /mnt/1 /mnt/3
 #mount -r -t lafs -o 'snapshot=first /mnt/1 /mnt/2
 
+###cp afile /mnt/1/afile
+#sync
+###umount /mnt/1
+mount -t lafs /dev/sdb /mnt/1
 ls /mnt/1;
 ls -ia /mnt/1
 #mount /dev/sdb /mnt/2
index 8f64983a64a58eecf8a14f6c923bdc4757e6cfb6..77713149f0a11c4aca9aeb99d3654067cdfef522 100644 (file)
@@ -13,7 +13,8 @@ rm -f /tmp/tftp
 ln -s $dir /tmp/tftp
 # -serial stdio  or  -nographic
 # change tty choice in 'go' too.
-qemu-kvm -hda hda -hdb $dir/../../code2/fred -hdc $dir/../../code2/frog \
+#qemu-kvm -hda hda -hdb hdb -hdc $dir/../../code2/frog \
+qemu-kvm -hda hda -hdb $dir/fs-image  \
   -no-reboot \
   -net nic,model=ne2k_pci -net user \
   -m 256 -nographic \