qemu/tests/tcg
Eric Blake b43671f80c tests: Avoid non-portable 'echo -ARG'
POSIX says that backslashes in the arguments to 'echo', as well as
any use of 'echo -n' and 'echo -e', are non-portable; it recommends
people should favor 'printf' instead.  This is definitely true where
we do not control which shell is running (such as in makefile snippets
or in documentation examples).  But even for scripts where we
require bash (and therefore, where echo does what we want by default),
it is still possible to use 'shopt -s xpg_echo' to change bash's
behavior of echo.  And setting a good example never hurts when we are
not sure if a snippet will be copied from a bash-only script to a
general shell script (although I don't change the use of non-portable
\e for ESC when we know the running shell is bash).

Replace 'echo -n "..."' with 'printf %s "..."', and 'echo -e "..."'
with 'printf %b "...\n"', with the optimization that the %s/%b
argument can be omitted if the string being printed is a strict
literal with no '%', '$', or '`' (we could technically also make
this optimization when there are $ or `` substitutions but where
we can prove their results will not be problematic, but proving
that such substitutions are safe makes the patch less trivial
compared to just being consistent).

In the qemu-iotests check script, fix unusual shell quoting
that would result in word-splitting if 'date' outputs a space.

In test 051, take an opportunity to shorten the line.

In test 068, get rid of a pointless second invocation of bash.

CC: qemu-trivial@nongnu.org
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-id: 20170703180950.9895-1-eblake@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
2017-07-11 17:45:00 +02:00
..
alpha
cris tests: Avoid non-portable 'echo -ARG' 2017-07-11 17:45:00 +02:00
lm32
mips
openrisc target/openrisc: Rename the cpu from or32 to or1k 2017-02-14 08:14:58 +11:00
xtensa target/xtensa: tests: clean up interrupt tests 2017-01-15 13:36:09 -08:00
hello-arm.c
hello-i386.c
hello-mips.c
linux-test.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
Makefile
pi_10.com
README qemu-tech: move TCG test documentation to tests/tcg/README 2016-10-07 10:05:30 +02:00
runcom.c
sha1.c
test_path.c
test-arm-iwmmxt.s
test-i386-code16.S
test-i386-fprem.c
test-i386-muldiv.h
test-i386-shift.h
test-i386-ssse3.c
test-i386-vm86.S
test-i386.c test-i386: fix bitrot for 64-bit 2016-10-24 15:27:19 +02:00
test-i386.h
test-mmap.c
testthread.c

This directory contains various interesting programs for
regression testing.

The target "make test" runs the programs and, if applicable,
runs "diff" to detect mismatches between output on the host and
output on QEMU.

i386
====

test-i386
---------

This program executes most of the 16 bit and 32 bit x86 instructions and
generates a text output, for comparison with the output obtained with
a real CPU or another emulator.

The Linux system call modify_ldt() is used to create x86 selectors
to test some 16 bit addressing and 32 bit with segmentation cases.

The Linux system call vm86() is used to test vm86 emulation.

Various exceptions are raised to test most of the x86 user space
exception reporting.

linux-test
----------

This program tests various Linux system calls. It is used to verify
that the system call parameters are correctly converted between target
and host CPUs.

test-i386-fprem
---------------

runcom
------

test-mmap
---------

sha1
----

hello-i386
----------


ARM
===

hello-arm
---------

test-arm-iwmmxt
---------------

MIPS
====

hello-mips
----------

hello-mipsel
------------

CRIS
====
The testsuite for CRIS is in tests/tcg/cris.  You can run it
with "make test-cris".

LM32
====
The testsuite for LM32 is in tests/tcg/cris.  You can run it
with "make test-lm32".