2e237100c5834d940331e8fa4e62c742820bff40
[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 cmd/xfstests/common.config
8         - add your host to cmd/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 linux-xfs/cmd/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 a hacked version of 'su' in $HOME/qa that
19                 lets your user su to root/root without a password
20                 (if you want to run from cron, it mustn't require
21                 /dev/tty). Warning - this is a massive security
22                 hole.
23         - chown root.root $HOME/qa/su
24         - chmod 6755 $HOME/qa/su
25         - add the soon to be kernel to /etc/lilo.conf
26
27                 image=/boot/vmlinuz-2.4.0-xfs-qa
28                         label=linux-xfs-qa
29                         append = "console=ttyS0,38400n8"
30                 
31         - $HOME/qa/auto-qa init
32
33 At this point, the script should update the workarea, clean it,
34 rebuild it, install it and reboot.
35
36 Then run
37
38         - $HOME/qa/auto-qa restarted
39
40 And the tests should happen... and all pass, of course.
41
42 To get it going automagically:
43
44         - add some lines to the appropriate user's crontab:
45
46                 0 4 * * *       $HOME/qa/auto-qa cron-init
47                 30 4 * * *      $HOME/qa/auto-qa cron-restarted
48
49 Notes:
50         - if MODULAR=1 in auto-qa XFS and xfs_support are expected to
51                 be modules. if MODULAR=0 they should be built into
52                 the kernel
53         - the test device is cleaned at the start of the QA run
54                 (to stop nightly QA being stuffed up if someone
55                 leaves the device inconsistant etc)
56         - I'm using a hacked su because PCP sudo won't set the
57                 gid properly, and normal linux su won't run
58                 without a tty even if PAM is switched off.
59         - The QA is restarted after reboot by a second cron entry
60                 to avoid the test being able to get itself into
61                 some stupid loop and so that it's always started
62                 by the appropriate user. You might have to make
63                 the second cron run later if your build takes ages.
64         - Point the email addresses somewhere appropriate
65         - When run in "cron-init" or "init" states, the script
66                 will p_tupdate itself and restart. If you start
67                 with an empty source tree, you'll need to check
68                 out the cmd/xfstests/tools/auto-qa script before it'll
69                 work (duh).
70
71 good luck.