| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Add links to the Fedora Feature Page and the wiki page on the KVM wiki.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
|
|
|
|
| |
Signed-off-by: Amit Shah <amit.shah@redhat.com>
|
|
|
|
| |
Signed-off-by: Amit Shah <amit.shah@redhat.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Amit Shah <amit.shah@redhat.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Amit Shah <amit.shah@redhat.com>
|
|
|
|
| |
Signed-off-by: Amit Shah <amit.shah@redhat.com>
|
|
|
|
| |
Signed-off-by: Amit Shah <amit.shah@redhat.com>
|
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Amit Shah <amit.shah@redhat.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
it's not an error; so let's not say there was an error
Signed-off-by: Amit Shah <amit.shah@redhat.com>
|
|
|
|
|
|
| |
Send file from guest->host and compare csums
Signed-off-by: Amit Shah <amit.shah@redhat.com>
|
|
|
|
| |
Signed-off-by: Amit Shah <amit.shah@redhat.com>
|
|
|
|
| |
Signed-off-by: Amit Shah <amit.shah@redhat.com>
|
|
|
|
|
|
| |
Not yet configurable from the command line
Signed-off-by: Amit Shah <amit.shah@redhat.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
The sysfs files are now located in /dev/virtio-ports/vportNpn
Signed-off-by: Amit Shah <amit.shah@redhat.com>
|
|
|
|
| |
Signed-off-by: Amit Shah <amit.shah@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
even though this is not used, this is done
to suppress valgrind err messages
Signed-off-by: Amit Shah <amit.shah@redhat.com>
|
|
|
|
|
|
| |
This is a much better way of doing it
Signed-off-by: Amit Shah <amit.shah@redhat.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Helpful for debugging
Signed-off-by: Amit Shah <amit.shah@redhat.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Code should allow for having a port open only once in the guest.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
There are a lot of values hardcoded; they should become configurable
someplace.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
|
|
|
|
| |
Signed-off-by: Amit Shah <amit.shah@redhat.com>
|
|
|
|
| |
Signed-off-by: Amit Shah <amit.shah@redhat.com>
|
|
|
|
| |
Signed-off-by: Amit Shah <amit.shah@redhat.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|