Tighten up a few more OpenSSH options
[platform/upstream/curl.git] / tests / README
1                                   _   _ ____  _     
2                               ___| | | |  _ \| |    
3                              / __| | | | |_) | |    
4                             | (__| |_| |  _ <| |___ 
5                              \___|\___/|_| \_\_____|
6
7 The cURL Test Suite
8
9 Requires:
10   perl (and a unix-style shell)
11   diff (when a test fail, a diff is shown)
12   stunnel (for HTTPS and FTPS tests)
13   sshd (for SCP and SFTP tests; OpenSSH ver. 3.8 is known to work)
14
15 TCP ports used:
16
17   - 8990 on localhost for HTTP tests
18   - 8991 on localhost for HTTPS tests
19   - 8994 on localhost for HTTP IPv6 tests
20   - 8992 on localhost for FTP tests
21   - 8995 on localhost for FTP (2) tests
22   - 8993 on localhost for FTPS tests
23   - 8996 on localhost for FTP IPv6 tests
24   - 8997 on localhost for TFTP tests
25   - 8999 on localhost for SCP/SFTP tests
26
27   The test suite runs simple FTP, HTTP and TFTP servers on these ports to
28   which it makes requests.  For SSL tests, it runs stunnel to handle
29   encryption to the regular servers. For SSH, it runs a standard OpenSSH
30   server.
31
32 Run:
33   'make test'. This invokes the 'runtests.pl' perl script. Edit the top
34   variables of that script in case you have some specific needs.
35
36   The script breaks on the first test that doesn't do OK. Use -a to prevent
37   the script to abort on the first error. Run the script with -v for more
38   verbose output. Use -d to run the test servers with debug output enabled as
39   well.
40
41   Use -s for shorter output, or pass test numbers to run specific tests only
42   (like "./runtests.pl 3 4" to test 3 and 4 only). It also supports test case
43   ranges with 'to'. As in "./runtests 3 to 9" which runs the seven tests from
44   3 to 9.
45
46 Memory:
47   The test script will check that all allocated memory is freed properly IF
48   curl has been built with the CURLDEBUG define set. The script will
49   automatically detect if that is the case, and it will use the ../memanalyze
50   script to analyze the memory debugging output.
51
52 Debug:
53   If a test case fails, you can conveniently get the script to invoke the
54   debugger (gdb) for you with the server running and the exact same command
55   line parameters that failed. Just invoke 'runtests.pl <test number> -g' and
56   then just type 'run' in the debugger to perform the command through the
57   debugger.
58
59   If a test case causes a core dump, analyze it by running gdb like:
60
61           # gdb ../curl/src core
62
63   ... and get a stack trace with the gdb command:
64
65           (gdb) where
66
67 Logs:
68   All logs are generated in the logs/ subdirectory (it is emptied first
69   in the runtests.pl script). Use runtests.pl -k to keep the temporary files
70   after the test run.
71
72 Data:
73   All test cases are put in the data/ subdirectory. Each test is stored in the
74   file named according to the test number.
75
76   See FILEFORMAT for the description of the test case files.
77
78
79 TEST CASE NUMBERS
80
81  So far, I've used this system:
82
83  1   -  99   HTTP
84  100 - 199   FTP
85  200 - 299   FILE
86  300 - 399   HTTPS
87  400 - 499   FTPS
88  500 - 599   libcurl source code tests, not using the curl command tool
89  600 - 699   SCP/SFTP
90
91  Since 30-apr-2003, there's nothing in the system that requires us to keep
92  within these number series. Each test case now specifies its own server
93  requirements, independent of test number.
94
95 TODO:
96
97   * Add tests for TELNET, LDAP, DICT...