[Fai-commit] r5477 - in trunk: debian examples examples/more-tests examples/more-tests/disk_config examples/more-tests/tests
Thomas Lange
lange at alioth.debian.org
Thu Jul 23 10:22:03 UTC 2009
Author: lange
Date: 2009-07-23 10:22:01 +0000 (Thu, 23 Jul 2009)
New Revision: 5477
Added:
trunk/examples/more-tests/
trunk/examples/more-tests/disk_config/
trunk/examples/more-tests/disk_config/DSK_TEST_1
trunk/examples/more-tests/disk_config/DSK_TEST_2
trunk/examples/more-tests/disk_config/DSK_TEST_3
trunk/examples/more-tests/disk_config/DSK_TEST_4
trunk/examples/more-tests/tests/
trunk/examples/more-tests/tests/DSK_TEST_1
trunk/examples/more-tests/tests/DSK_TEST_2
trunk/examples/more-tests/tests/DSK_TEST_3
trunk/examples/more-tests/tests/DSK_TEST_4
Modified:
trunk/debian/changelog
Log:
examples/more-tests: add more tests from Sebastian
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2009-07-23 09:55:36 UTC (rev 5476)
+++ trunk/debian/changelog 2009-07-23 10:22:01 UTC (rev 5477)
@@ -42,6 +42,7 @@
* tests/Faitest.pm: new file including subroutines for tests. Thanks to
Sebastian Hetze for the initial version.
* disk_config/FAIBASE: add file system labels
+ * examples/more-tests: add more tests from Sebastian
[ Michael Tautschnig ]
* setup-storage/Parser.pm: Set the boot flag on partition mounted at /, if
Added: trunk/examples/more-tests/disk_config/DSK_TEST_1
===================================================================
--- trunk/examples/more-tests/disk_config/DSK_TEST_1 (rev 0)
+++ trunk/examples/more-tests/disk_config/DSK_TEST_1 2009-07-23 10:22:01 UTC (rev 5477)
@@ -0,0 +1,8 @@
+# DSK_TEST_1
+disk_config disk1
+primary / 150-300 ext3 rw,errors=remount-ro createopts="-L root" tuneopts="-c 0"
+logical swap 40-500 swap sw createopts="-L swap"
+logical /usr 200-4000 ext3 rw createopts="-L usr"
+logical /var 90-1000 ext3 rw createopts="-L var -m 5"
+logical /tmp 50-1000 ext3 rw createopts="-L tmp -m 1" tuneopts="-c 0"
+logical /home 50- ext3 defaults createopts="-L home -m 0" tuneopts="-c 0 -o acl,user_xattr"
Added: trunk/examples/more-tests/disk_config/DSK_TEST_2
===================================================================
--- trunk/examples/more-tests/disk_config/DSK_TEST_2 (rev 0)
+++ trunk/examples/more-tests/disk_config/DSK_TEST_2 2009-07-23 10:22:01 UTC (rev 5477)
@@ -0,0 +1,8 @@
+# DSK_TEST_2
+disk_config disk1 preserve_always:9 bootable:6
+primary / 150-300 ext3 rw,errors=remount-ro createopts="-L root" tuneopts="-c 0"
+logical swap 40-500 swap sw createopts="-L swap"
+logical /usr 200-4000 ext3 rw createopts="-L usr"
+logical /var 90-1000 ext3 rw createopts="-L var -m 5"
+logical /tmp 50-1000 ext3 rw createopts="-L tmp -m 1" tuneopts="-c 0"
+logical /home 50- ext3 defaults createopts="-L home -m 0" tuneopts="-c 0 -o acl,user_xattr"
Added: trunk/examples/more-tests/disk_config/DSK_TEST_3
===================================================================
--- trunk/examples/more-tests/disk_config/DSK_TEST_3 (rev 0)
+++ trunk/examples/more-tests/disk_config/DSK_TEST_3 2009-07-23 10:22:01 UTC (rev 5477)
@@ -0,0 +1,16 @@
+# DSK_TEST_3
+disk_config disk1
+
+primary /boot 20-100 ext3 rw
+primary swap 100 swap sw
+primary / 300-400 ext3 rw,acl,user_xattr
+primary - 0- - -
+
+# config the LVM
+disk_config lvm
+vg volg1 disk1.4
+volg1-usr /usr 1048 ext3 rw createopts="-O dir_index,resize_inode"
+volg1-var /var 600 ext3 rw createopts="-O dir_index,resize_inode"
+volg1-hl /home/local 2G-3G ext3 rw,acl,user_xattr,noexec,nosuid,nodev
+volg1-es /export/sites 100 ext3 rw createopts="-O none"
+volg1-v /vservers 100 ext3 rw createopts="-O ^dir_index,^resize_inode"
Added: trunk/examples/more-tests/disk_config/DSK_TEST_4
===================================================================
--- trunk/examples/more-tests/disk_config/DSK_TEST_4 (rev 0)
+++ trunk/examples/more-tests/disk_config/DSK_TEST_4 2009-07-23 10:22:01 UTC (rev 5477)
@@ -0,0 +1,24 @@
+# DSK_TEST_4
+disk_config disk1
+
+primary /boot 20-100 ext3 rw
+primary swap 100 swap sw
+primary / 1G-4G ext3 rw,acl,user_xattr
+logical - 0- - -
+logical - 0- - -
+logical - 0- - -
+logical - 0- - -
+
+disk_config raid
+raid1 - disk1.5,disk1.7 - -
+raid1 - disk1.6,disk1.8 - -
+
+
+# config the LVM
+disk_config lvm
+vg volg1 md0,md1
+volg1-usr /usr 1G ext3 rw createopts="-O dir_index,resize_inode"
+volg1-var /var 600 ext3 rw createopts="-O dir_index,resize_inode"
+volg1-hl /home/local 2G ext3 rw,acl,user_xattr,noexec,nosuid,nodev
+volg1-es /export/sites 100 ext3 rw createopts="-O none"
+volg1-v /vservers 100 ext3 rw createopts="-O ^dir_index,^resize_inode"
Added: trunk/examples/more-tests/tests/DSK_TEST_1
===================================================================
--- trunk/examples/more-tests/tests/DSK_TEST_1 (rev 0)
+++ trunk/examples/more-tests/tests/DSK_TEST_1 2009-07-23 10:22:01 UTC (rev 5477)
@@ -0,0 +1,51 @@
+#! /usr/bin/perl
+
+use strict;
+use warnings;
+use Faitest;
+package FAITEST;
+
+setup_test();
+# - - - - - - - - - - - - - - - - - - - - - - - - - -
+# now comes the test itself
+
+my $dev = &getDevByMount("/target/home");
+&checkE2fsAttribute($dev,"Filesystem volume name","home");
+&checkE2fsAttribute($dev,"Maximum mount count","-1");
+&checkE2fsAttribute($dev,"Reserved block count","0");
+&checkE2fsAttribute($dev,"Default mount options","user_xattr acl");
+
+system("dd if=/dev/urandom of=/target/home/test.data bs=4096 count=512 2>/dev/null");
+$FAITEST::errors++ if $?;
+system("md5sum /target/home/test.data > /target/home/test.md5");
+
+exit printresult("DSK_TEST_2");
+# - - - - - - - - - - - - - - - - - - - - - - - - - -
+__END__
+
+=head1 NAME
+
+DSK_TEST_1 - regression test for setup-storage disk layout DSK_TEST_1
+
+=head1 SYNOPSIS
+
+DSK_TEST_1 checks some important aspects of setup-storage. The DSK_TEST_1 disk_config makes heavy use of
+setup-storage ability to tune filesystem parameters upon creation. We check the last of 9 created partitions
+since we expect prior errors to make creation of the last partition fail.
+
+DSK_TEST_1 also creates a file in /target/home that should be preserved in DSK_TEST_2, so DSK_TEST_2 depends on
+successful run of DSK_TEST_1.
+
+ Options:
+ -help simple help
+ -verbose=n increase verbosity of test script
+
+=head1 OPTIONS
+
+=over 8
+
+=item B<-help>
+simple help
+
+=item B<-verbose>
+increase verbosity of test script
Property changes on: trunk/examples/more-tests/tests/DSK_TEST_1
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/examples/more-tests/tests/DSK_TEST_2
===================================================================
--- trunk/examples/more-tests/tests/DSK_TEST_2 (rev 0)
+++ trunk/examples/more-tests/tests/DSK_TEST_2 2009-07-23 10:22:01 UTC (rev 5477)
@@ -0,0 +1,51 @@
+#! /usr/bin/perl
+
+use strict;
+use warnings;
+use Faitest;
+package FAITEST;
+
+setup_test();
+# - - - - - - - - - - - - - - - - - - - - - - - - - -
+# now comes the test itself
+
+my $dev = &getDevByMount("/target/home");
+&checkE2fsAttribute($dev,"Filesystem volume name","home");
+&checkE2fsAttribute($dev,"Maximum mount count","-1");
+&checkE2fsAttribute($dev,"Reserved block count","0");
+&checkE2fsAttribute($dev,"Default mount options","user_xattr acl");
+
+system("md5sum --check /target/home/test.md5");
+unless ($? == 0) {
+ $FAITEST::errors++;
+ # was printed to STDERR
+ print $FAITEST::LOGFILE "md5sum failed: you either did not finish DSK_TEST_1 or preserve partition did not work.\n";
+}
+
+exit printresult("DSK_TEST_3");
+# - - - - - - - - - - - - - - - - - - - - - - - - - -
+__END__
+
+=head1 NAME
+
+DSK_TEST_2 - regression test for setup-storage disk layout DSK_TEST_2
+
+=head1 SYNOPSIS
+
+DSK_TEST_2 checks some important aspects of setup-storage. DSK_TEST_2 depends on succesful completion of DSK_TEST_1.
+In particular, DSK_TEST_2 checks the preserve partition feature on the file /target/home/test.data that is created
+by DSK_TEST_1.
+
+ Options:
+ -help simple help
+ -verbose=n increase verbosity of test script
+
+=head1 OPTIONS
+
+=over 8
+
+=item B<-help>
+simple help
+
+=item B<-verbose>
+increase verbosity of test script
Property changes on: trunk/examples/more-tests/tests/DSK_TEST_2
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/examples/more-tests/tests/DSK_TEST_3
===================================================================
--- trunk/examples/more-tests/tests/DSK_TEST_3 (rev 0)
+++ trunk/examples/more-tests/tests/DSK_TEST_3 2009-07-23 10:22:01 UTC (rev 5477)
@@ -0,0 +1,41 @@
+#! /usr/bin/perl
+
+use strict;
+use warnings;
+use Faitest;
+package FAITEST;
+
+setup_test();
+# - - - - - - - - - - - - - - - - - - - - - - - - - -
+# now comes the test itself
+
+&checkE2fsAttribute("/dev/mapper/volg1-es","Filesystem features","has_journal needs_recovery");
+&checkE2fsAttribute("/dev/mapper/volg1-hl","Filesystem features","has_journal resize_inode dir_index filetype needs_recovery sparse_super large_file");
+&checkE2fsAttribute("/dev/mapper/volg1-v","Filesystem features","has_journal filetype needs_recovery sparse_super");
+
+exit printresult("DSK_TEST_4");
+# - - - - - - - - - - - - - - - - - - - - - - - - - -
+__END__
+
+=head1 NAME
+
+DSK_TEST_3 - regression test for setup-storage disk layout DSK_TEST_3
+
+=head1 SYNOPSIS
+
+DSK_TEST_3 checks some important aspects of setup-storage. The DSK_TEST_3 disk layout uses LVM for most partitions and
+makes use of setup-storage ability to customize filesystem creation.
+
+ Options:
+ -help simple help
+ -verbose=n increase verbosity of test script
+
+=head1 OPTIONS
+
+=over 8
+
+=item B<-help>
+simple help
+
+=item B<-verbose>
+increase verbosity of test script
Property changes on: trunk/examples/more-tests/tests/DSK_TEST_3
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/examples/more-tests/tests/DSK_TEST_4
===================================================================
--- trunk/examples/more-tests/tests/DSK_TEST_4 (rev 0)
+++ trunk/examples/more-tests/tests/DSK_TEST_4 2009-07-23 10:22:01 UTC (rev 5477)
@@ -0,0 +1,43 @@
+#! /usr/bin/perl
+
+use strict;
+use warnings;
+use Faitest;
+package FAITEST;
+
+setup_test();
+# - - - - - - - - - - - - - - - - - - - - - - - - - -
+# now comes the test itself
+
+&checkE2fsAttribute("/dev/mapper/volg1-es","Filesystem features","has_journal needs_recovery");
+&checkE2fsAttribute("/dev/mapper/volg1-hl","Filesystem features","has_journal resize_inode dir_index filetype needs_recovery sparse_super large_file");
+&checkE2fsAttribute("/dev/mapper/volg1-v","Filesystem features","has_journal filetype needs_recovery sparse_super");
+&checkMdStat("md0","active raid1 sda5[1] sda7[0]");
+&checkMdStat("md1","active raid1 sda8[1] sda6[0]");
+
+exit printresult();
+# - - - - - - - - - - - - - - - - - - - - - - - - - -
+__END__
+
+=head1 NAME
+
+DSK_TEST_4 - regression test for setup-storage disk layout DSK_TEST_4
+
+=head1 SYNOPSIS
+
+DSK_TEST_4 checks some important aspects of setup-storage. The DSK_TEST_4 disk layout uses RAID and LVM for most partitions and
+makes use of setup-storage ability to customize filesystem creation.
+
+ Options:
+ -help simple help
+ -verbose=n increase verbosity of test script
+
+=head1 OPTIONS
+
+=over 8
+
+=item B<-help>
+simple help
+
+=item B<-verbose>
+increase verbosity of test script
Property changes on: trunk/examples/more-tests/tests/DSK_TEST_4
___________________________________________________________________
Added: svn:executable
+ *
More information about the Fai-commit
mailing list