Differences between revisions 1 and 2
Revision 1 as of 2008-02-28 05:41:40
Size: 2874
Editor: TimoSirainen
Comment:
Revision 2 as of 2008-02-28 19:41:05
Size: 2984
Editor: TimoSirainen
Comment:
Deletions are marked like this. Additions are marked like this.
Line 28: Line 28:
 * test=dir: Run [:ImapTest/Tests:command/reply tests] from given directory instead of doing stress testing.

Running ImapTest

The most important parameters (and their defaults) are:

  • host=127.0.0.1: Host name/IP address where to connect.
  • port=143: Port what to use.
  • user=$USER: Username template. You can use multiple random users and domains by giving %d in the template. So for example user%d returns user1..user100 and user%d@domain%d.org returns user1..100@domain1..100.org. The 1..100 range is hardcoded to the binary. You can change them from USER_RAND and DOMAIN_RAND defines.

  • password=pass: Password to use for all users. There's currently no way to use different passwords for different users.
  • mbox=~/mail/dovecot-crlf: Path to mbox file where to append messages from. See below for how this is used.

Other useful parameters include:

  • clients=10: Number of simultaneous client connections to use.
  • secs=n: Run imaptest n seconds and then exit.
  • msgs=30: Try to keep the mailbox size around this many messages.
  • box=INBOX: Mailbox to use for testing. INBOX is the default.
  • copybox=n: When testing COPY command, this specifies the destination mailbox.
  • seed=n: Seed to use for random generator. Setting this to some specific value makes repeated benchmarks a bit more reliable, because the used commands should be the same then.
  • disconnect_quit: If a client gets disconnected, quit. Use logout=0 parameter with this one. This is useful when debugging some problem in the server.
  • no_pipelining: Don't send multiple commands at once to server.
  • rawlog: Write rawlog.* files for all connections containing their input and output.

Selecting what to test:

  • <state>=<probability>[,<probability2>]: [:ImapTest/States:State] probabilities to use.

  • checkpoint=n: Run a checkpoint every n seconds. See below.
  • own_msgs: Assigns an owner client for each message. Complain if flags for a message is changed by a non-owner session.
  • own_flags: Assigns an owner client for each flag and keyword. Complain if they're changed by another session.
  • random: Switch randomly between states.
  • no_tracking: Don't track and complain about IMAP state. Makes it use a bit less CPU.
  • test=dir: Run [:ImapTest/Tests:command/reply tests] from given directory instead of doing stress testing.

Append mbox

When saving messages, imaptest needs to get the messages from somewhere. mbox=path parameter specifies path to a file in mbox format that's used. Messages are sequentially appended from there. Once imaptest reaches the last message, it wraps back to appending the first message.

Currently imaptest's state tracking expects that Message-IDs are unique within the mbox, otherwise it gives bogus errors. If you really want to avoid changing the Message-IDs, use no_tracking setting to disable state tracking.

You can get a test mbox file from for example http://dovecot.org/tmp/dovecot-crlf. It's a 10MB file containing messages from Dovecot mailing list with unique Message-ID headers.

None: ImapTest/Running (last edited 2023-11-07 21:13:14 by TimoSirainen)