From: NeilBrown Date: Sun, 27 Mar 2011 21:59:40 +0000 (+1100) Subject: Change to self-test scheme X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=6fe5fe7eecb96d38a96fec9c28195cf8088ebe5a;p=LaFS.git Change to self-test scheme Not read yet. --- diff --git a/Makefile b/Makefile index 7751535..1b1a7b9 100644 --- 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 1d5bece..330a4fe 100644 --- 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 478b25d..3d1f94d 100644 --- 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 59a8dbd..6111b05 100644 --- 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 diff --git a/test/runtty b/test/runtty index 8f64983..7771314 100644 --- a/test/runtty +++ b/test/runtty @@ -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 \