Daniel P. Berrange wrote:
On Tue, Jan 15, 2008 at 08:46:17AM -0600, Anthony Liguori wrote:Richard W.M. Jones wrote:Have you ever discussed having regression tests for Gtk-VNC? I've been able to provoke at least one segfault with a test program (program + patch coming up). I wonder if we should keep such test programs around to test for regressions?It's funny you post this now as last night I was just thinking about this. I was particularly interested in ensure we don't keep breaking mixed endian support.My thinking was to write a client and server in the same application. Generate a fake frame buffer, then use every possible encoding to transmit it to the client. Then compare the client and server's version of the frame buffer.I don't think we'd need to go overboard to write it inside a single process. If each scenario is a single execution, its easy enough to fork a server process off for the test case and clean it up after. Or just spawn a pthread, so its effectively a separate process, but dies when the test case dies.
Forking is pretty much what Net::FTPServer does to test itself, as in this example:
Rich. -- Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/ Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 03798903
Description: S/MIME Cryptographic Signature