On 22 December 2011 14:23, Anthony Liguori <aligu...@us.ibm.com> wrote: > This is a pretty simple test that just confirms that virtio-serial shows up > and > is writable. It also tests the alias for virtio-serial-pci. > > Signed-off-by: Anthony Liguori <aligu...@us.ibm.com> > --- > tests/virtio-serial.sh | 52 > ++++++++++++++++++++++++++++++++++++++++++++++++ > 1 files changed, 52 insertions(+), 0 deletions(-) > create mode 100755 tests/virtio-serial.sh > > diff --git a/tests/virtio-serial.sh b/tests/virtio-serial.sh > new file mode 100755 > index 0000000..e95ae6e > --- /dev/null > +++ b/tests/virtio-serial.sh > @@ -0,0 +1,52 @@ > +#!/bin/sh > + > +canary="** waiting for... **" > + > +in_host() { > + tmpchr=$tmpdir/chr.log
By far the most common error likely to appear in any of these test scripts is insufficient shell quoting causing e.g. breakages when the scripts are run from a directory with spaces. Having looked at qemu-test, I see that $tmpdir is set to .tmp-$$ and so can never contain spaces, and so it's fine to not quote the variable expansion. That said, perhaps it would make it easier to review scripts and less likely for these issues to creep in to the codebase if there was a blanket rule that all variable expansions be quoted? Alex