Test script updates to cater for the revised tree layout. Allows for separate user...
[xfstests-dev.git] / tools / README.auto-qa
1 Quick guide to auto-qa                                      dxm 04/10/2000
2 ______________________                                      ______________
3
4
5         - pick/create a user to run auto-qa and check they 
6             can use ptools to check out of the tree
7         - add your host to xfstests/common.config
8         - add your host to xfstests/tools/auto-qa
9                 check both these files in
10         - make a directory "$HOME/qa"
11         - make a workarea "$HOME/qa/linux-xfs" for linux-xfs
12                 (easiest to copy one from elsewhere)
13         - cd $HOME/qa ; ln -s xfs-cmds/xfstests/tools/auto-qa .
14                 (auto-qa must be a link into it's own source tree
15                 so it can update itself)
16         - copy an appropriate .config file to
17                 $HOME/qa/$HOSTNAME.config
18         - You'll need to maunally install the "quota" and "acl"
19           userspace tools, rest will be installed automatically.
20         - You'll need a hacked version of 'su' in $HOME/qa that
21                 lets your user su to root/root without a password
22                 (if you want to run from cron, it mustn't require
23                 /dev/tty). Warning - this is a massive security
24                 hole.
25         - chown root.root $HOME/qa/su
26         - chmod 6755 $HOME/qa/su
27         - add the soon to be kernel to /etc/lilo.conf
28
29                 image=/boot/vmlinuz-xfs-qa
30                         label=linux-xfs-qa
31                         append = "console=ttyS0,38400n8"
32                 
33         - $HOME/qa/auto-qa init
34
35 At this point, the script should update the workarea, clean it,
36 rebuild it, install it and reboot.
37
38 Then run
39
40         - $HOME/qa/auto-qa restarted
41
42 And the tests should happen... and all pass, of course.
43
44 To get it going automagically:
45
46         - add some lines to the appropriate user's crontab:
47
48                 0 4 * * *       $HOME/qa/auto-qa cron-init
49                 30 4 * * *      $HOME/qa/auto-qa cron-restarted
50
51 Notes:
52         - if MODULAR=1 in auto-qa the XFS filesystem is expected to
53                 be a module; if MODULAR=0 it should be built into
54                 the kernel.
55         - the test device is cleaned at the start of the QA run
56                 (to stop nightly QA being stuffed up if someone
57                 leaves the device inconsistant etc)
58         - I'm using a hacked su because PCP sudo won't set the
59                 gid properly, and normal linux su won't run
60                 without a tty even if PAM is switched off.
61         - The QA is restarted after reboot by a second cron entry
62                 to avoid the test being able to get itself into
63                 some stupid loop and so that it's always started
64                 by the appropriate user. You might have to make
65                 the second cron run later if your build takes ages.
66         - Point the email addresses somewhere appropriate
67         - When run in "cron-init" or "init" states, the script
68                 will p_tupdate itself and restart. If you start
69                 with an empty source tree, you'll need to check
70                 out the xfstests/tools/auto-qa script before it'll
71                 work (duh).
72
73 good luck.