summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* auto-test: Non-blocking write testAmit Shah2010-04-061-0/+71
| | | | | | | | | This new test puts a port in non-blocking mode in the guest and keeps sending data till the host can't accept any more. In this case, the vq is filled and the guest gets -EAGAIN on write. poll() should not return POLLOUT. Signed-off-by: Amit Shah <amit.shah@redhat.com>
* auto-test: guest: Cope with EINTR and EAGAIN for read/write/pollAmit Shah2010-04-061-38/+111
| | | | | | | | Introduce wrappers for read(), write() and poll() that handle EINTR and EAGAIN properly. For EINTR, just re-do the operation. For EAGAIN, if it's a non-blocking port, let the host know about it. Signed-off-by: Amit Shah <amit.shah@redhat.com>
* guest, test-virtserial: Fix fcntl usageAmit Shah2010-04-062-4/+15
| | | | | | | While setting or clearing the O_NONBLOCK flag for file descriptors, we were trampling on the other flags. Signed-off-by: Amit Shah <amit.shah@redhat.com>
* auto-test: Don't run the host caching testAmit Shah2010-03-231-1/+2
| | | | | | | | | | The kernel module will gain blocking support for writes where an unopened host port will cause a write on the guest to block. This doesn't play well with the host caching test. And we don't cache data anyway. Signed-off-by: Amit Shah <amit.shah@redhat.com>
* run-test: Allow the guest to be specified by an environment variableAmit Shah2010-03-181-1/+2
| | | | | | | Not everyone will have the same guest as me to run, or in the same path. Let it be configurable. Signed-off-by: Amit Shah <amit.shah@redhat.com>
* Add a small guest config that I use to test guest kernels withAmit Shah2010-03-052-0/+1194
| | | | | | | | | | This is the config file that I use to test guest kernels. It's a minimal config with lots of debugging options enabled to test for memleaks, locking correctness, etc. Also add a note to README about this file. Signed-off-by: Amit Shah <amit.shah@redhat.com>
* README: Better formatting, add links to webpagesAmit Shah2010-03-051-0/+11
| | | | | | Add links to the Fedora Feature Page and the wiki page on the KVM wiki. Signed-off-by: Amit Shah <amit.shah@redhat.com>
* README: Update to document the latest way of invocationAmit Shah2010-03-011-8/+9
| | | | Signed-off-by: Amit Shah <amit.shah@redhat.com>
* run-test: split big lines into multiple linesAmit Shah2010-02-151-2/+4
| | | | Signed-off-by: Amit Shah <amit.shah@redhat.com>
* run-test: Allow setting number of vcpus at invocation timeAmit Shah2010-01-271-1/+3
| | | | | | | Allow passing the number of vcpus we want be passed on to this script from another script. Signed-off-by: Amit Shah <amit.shah@redhat.com>
* Add a .gitignore file to ignore generated filesAmit Shah2010-01-271-0/+3
| | | | Signed-off-by: Amit Shah <amit.shah@redhat.com>
* auto-test: switch off host throttling, guest/host caching testsAmit Shah2010-01-271-1/+15
| | | | | | | | For all the cases that aren't included in the upstream code yet, switch off the tests so that we don't see failures for features not yet implemented. Signed-off-by: Amit Shah <amit.shah@redhat.com>
* run-test: allow older qemu binaries to be specified at invocation timeAmit Shah2010-01-271-4/+4
| | | | | | | To test new kernel compatibility with older qemu, allow older qemu binaries to be specified at invocation time. Signed-off-by: Amit Shah <amit.shah@redhat.com>
* auto-test: increase initial poll timeout to 40sAmit Shah2010-01-271-2/+2
| | | | | | | | 20s is insufficient for the guest to boot from a cold cache. Bump the timeout to 40s. Signed-off-by: Amit Shah <amit.shah@redhat.com>
* run-test: allow usage of custom qemu and kernel binariesAmit Shah2010-01-271-2/+6
| | | | | | | | | | | | | | | | We so far had the binaries to be used for kernel images and qemu hardcoded in this script. Make it now configurable at invocation-time, so things like QEMU=/build/qemu-kvm/x86_64-softmmu/qemu-system-x86_64 \ KERNEL=/build/linux-2.6/arch/x86/boot/bzImage ./run-test.sh work. If these env vars are not provided, the older defaults are used. Signed-off-by: Amit Shah <amit.shah@redhat.com>
* run-test: byte_limit option is goneAmit Shah2010-01-271-1/+1
| | | | | | | The byte_limit, or the host throttling feature, has been removed from the upstream virtio-serial code. Signed-off-by: Amit Shah <amit.shah@redhat.com>
* run-test: virtio-serial is now an alias for virtio-serial-pciAmit Shah2010-01-191-1/+1
| | | | Signed-off-by: Amit Shah <amit.shah@redhat.com>
* run-test: cache_buffers option is goneAmit Shah2010-01-191-4/+4
| | | | Signed-off-by: Amit Shah <amit.shah@redhat.com>
* run-test: default behaviour now is to not cache buffersAmit Shah2010-01-191-2/+2
| | | | Signed-off-by: Amit Shah <amit.shah@redhat.com>
* run-test: various fixes for the script that runs the testsAmit Shah2009-12-221-12/+13
| | | | | | | | | - enable the monitor on a unix socket - get the guest's serial log in a file - enable all tests - other minor fixups Signed-off-by: Amit Shah <amit.shah@redhat.com>
* auto-test: guest throttling no longer neededAmit Shah2009-12-222-1/+8
| | | | | | | With the design change in the kernel module to have IO vqs for each port, guest throttling is no longer needed. Signed-off-by: Amit Shah <amit.shah@redhat.com>
* autotest: put globals fn_name and bools of tests enabled in structAmit Shah2009-12-221-76/+123
| | | | Signed-off-by: Amit Shah <amit.shah@redhat.com>
* autotest: add function pointers to our test routines in an arrayAmit Shah2009-12-221-22/+39
| | | | | | | This is so that the main routine doesn't need to know the function name of the test to run. Signed-off-by: Amit Shah <amit.shah@redhat.com>
* autotest: better debug stringAmit Shah2009-12-221-1/+1
| | | | | | it's not an error; so let's not say there was an error Signed-off-by: Amit Shah <amit.shah@redhat.com>
* auto-test: add support for guest->host file sendAmit Shah2009-12-223-27/+231
| | | | | | Send file from guest->host and compare csums Signed-off-by: Amit Shah <amit.shah@redhat.com>
* autotest: close host chardevs after testAmit Shah2009-12-221-0/+2
| | | | Signed-off-by: Amit Shah <amit.shah@redhat.com>
* auto-test: Better debug messagesAmit Shah2009-11-261-2/+2
| | | | Signed-off-by: Amit Shah <amit.shah@redhat.com>
* auto-test: Bits for enabling/disabling individual testsAmit Shah2009-11-261-30/+48
| | | | | | Not yet configurable from the command line Signed-off-by: Amit Shah <amit.shah@redhat.com>
* auto-test: Fix return check for openAmit Shah2009-11-261-8/+8
| | | | | | | The return value from guest open should be >= 0, make sure we test for that instead of being = 0. Signed-off-by: Amit Shah <amit.shah@redhat.com>
* auto-test-guest: New locations for sysfs filesAmit Shah2009-11-261-18/+11
| | | | | | The sysfs files are now located in /dev/virtio-ports/vportNpn Signed-off-by: Amit Shah <amit.shah@redhat.com>
* Makefile: clean target, dependencies on .h filesAmit Shah2009-11-261-4/+9
| | | | Signed-off-by: Amit Shah <amit.shah@redhat.com>
* auto-test: guest caching: make sure data reaches guest port before ↵Amit Shah2009-11-041-0/+7
| | | | | | | | | | | | | announcing result In many cases the data got sent after the port was inspected for any cached data that was available in the cache disabled case. We can't rely on the sequence of the events; they can get rearranged so let's close the port only after we know the data reached the guest. Signed-off-by: Amit Shah <amit.shah@redhat.com>
* auto-test: guest_throttle: check for throttled after sufficient data has ↵Amit Shah2009-11-041-2/+2
| | | | | | | | | | been passed out the check for throttled sometimes fails; for the same reason that the guest caching test fails: less data is seen and the throttling condition isn't reached when it should. Signed-off-by: Amit Shah <amit.shah@redhat.com>
* auto-test: memset buffer to 0 before writing to guestAmit Shah2009-11-041-0/+2
| | | | | | | even though this is not used, this is done to suppress valgrind err messages Signed-off-by: Amit Shah <amit.shah@redhat.com>
* auto-test: convert debug() into a func with varargs instead of it being a macroAmit Shah2009-10-291-4/+9
| | | | | | This is a much better way of doing it Signed-off-by: Amit Shah <amit.shah@redhat.com>
* auto-test: Fix some warnings pointed out by clangAmit Shah2009-10-292-8/+9
| | | | | | | 1. don't assign to 'ret' the o/p of fns that we don't intend to use later 2. Ensure 'ret' actually contains the value we want Signed-off-by: Amit Shah <amit.shah@redhat.com>
* auto-test: compile programs with -gAmit Shah2009-10-291-1/+1
| | | | | | Helpful for debugging Signed-off-by: Amit Shah <amit.shah@redhat.com>
* auto-test-guest: return fd on open call instead of 0 as is done nowAmit Shah2009-10-291-1/+1
| | | | | | | Earlier thinking was 0 is fine; host doesn't need to know the fd obtained by the guest prog; that's ok too. just return fd is ok as well Signed-off-by: Amit Shah <amit.shah@redhat.com>
* auto-test: introduce a result() fn to check for pass/fail and show debug ↵Amit Shah2009-10-291-302/+274
| | | | | | | | | | | | | | messages Using individual pass/fail() functions, checking for conditions, printing debug message after fail each time can be optimised by using a result() function that can do all of that. This also allows us to make the test output format look prettier since it's all now handled in one function. So make the output prettier as well while we're at it. Signed-off-by: Amit Shah <amit.shah@redhat.com>
* README: update to include more guest and host setup info for new testsAmit Shah2009-10-271-0/+26
| | | | | | | | | Update the README to include information on setting up the guest and the host. These settings are needed to successfully run the new tests: file transfer and checksumming, virtio console port testing, debugfs and udev symlinking rules tests Signed-off-by: Amit Shah <amit.shah@redhat.com>
* auto-test: add tests for checking sysfs, debugfs entries and udev rulesAmit Shah2009-10-273-0/+102
| | | | | | | | | | | | | | | This commit tests for: 1. sysfs entries created (the 'name' attribute) 2. debugfs entries created for ports (in /sys/kernel/debug/virtio-console/vconNN) (this needs debugfs to be mounted in /sys/kernel/debug) 3. udev rule that creates a symlink based on the port 'name' attribute (this needs a udev rule to create a symlink, like: KERNEL==vcon*, SYMLINK+=virtio-console/{name} in a file in the /etc/udev/rules.d/ directory) Signed-off-by: Amit Shah <amit.shah@redhat.com>
* auto-test: add test for opening of a port multiple timesAmit Shah2009-10-271-0/+24
| | | | | | Code should allow for having a port open only once in the guest. Signed-off-by: Amit Shah <amit.shah@redhat.com>
* auto-test: guest: mark global vars with g_, return err on closeAmit Shah2009-10-271-24/+30
| | | | | | | | | Rename the global fd, length, etc., variables with a g_ prefix so that they're not mixed with any local ones. We didn't have any, but these names were very generic. Signed-off-by: Amit Shah <amit.shah@redhat.com>
* auto-test: run a post-test cleanup routine after each testAmit Shah2009-10-271-49/+63
| | | | | | | | | | | | | | | | | | | | | | We don't necessarily consume all the data that's written to ports which can cause that data to linger around in case buffer caching is enabled (enabled by default, only disabled for port 3 here). To ensure this data doesn't cause any side-effects to the other tests that get run on the same port later, just read() all the data so that each port is in a clean state when a new test starts. This was done in per-test functions so far, move it to a common function. This patch also introduces a run_test() function that is passed the function pointer to the test that's to be run and the post- test function is called from run_test(). A pre-test function can also be added, but that's not needed as of now. Signed-off-by: Amit Shah <amit.shah@redhat.com>
* auto-test: support for transferring a big file and comparing sha1sumsAmit Shah2009-10-244-1/+208
| | | | | | | There are a lot of values hardcoded; they should become configurable someplace. Signed-off-by: Amit Shah <amit.shah@redhat.com>
* auto-test: remove while loop from main: wasn't of any useAmit Shah2009-10-241-15/+10
| | | | Signed-off-by: Amit Shah <amit.shah@redhat.com>
* auto-test: add support for running old qemu/kernelAmit Shah2009-10-242-35/+115
| | | | Signed-off-by: Amit Shah <amit.shah@redhat.com>
* auto-test: whitespace cleanupsAmit Shah2009-10-241-10/+10
| | | | Signed-off-by: Amit Shah <amit.shah@redhat.com>
* auto-test: add virtio-console testsAmit Shah2009-10-243-1/+135
| | | | | | | | This commit adds test for virtio-console functionality on new qemu and guest kernel. Functionality for older qemu and older kernel will come in the following commits. Signed-off-by: Amit Shah <amit.shah@redhat.com>
* auto-test: use an array to pick up paths instead of argvAmit Shah2009-10-242-84/+102
| | | | | | | This ties us to the script that we have to invoke qemu but it should be fine; all this has to be reworked later anyway. Signed-off-by: Amit Shah <amit.shah@redhat.com>