qemu/tests/qemu-iotests
Eric Blake 8803714b53 iotests: Restore stty settings on completion
Executing qemu with a terminal as stdin will temporarily alter stty
settings on that terminal (for example, disabling echo), because of
how we run both the monitor and any multiplexing with guest input.
Normally, qemu restores the original settings on exit; but if an
iotest triggers qemu to abort in the middle, we can be left with
the altered terminal setup.  This can make life very annoying when
debugging an iotest failure (not everyone remembers the trick of
blind-typing 'stty sane' without echo, and some people prefer
terminal settings that are slightly different than the defaults
picked by 'stty sane').

It is possible to avoid qemu corrupting the terminal by not passing
a terminal to qemu's stdin in the first place (as in, use
'./check ... </dev/null'), but that's extra typing to have to
remember.  But running 'exec </dev/null' in the harness seems like
it might be too heavy of a hammer.  So I instead went the the
solution of saving and restoring the stty settings, only when the
harness detects that it is run interactively.

I tested this patch by forcing an allocation failure (I can't
guarantee that this particular limit will work on all setups, but
it shows the idea):
 $ (ulimit -S -v 500000; ./check -qcow2 1)

Signed-off-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2017-10-06 16:28:58 +02:00
..
001
002
003
004
005
007
008
009
010
011
012
013
014
015
017
018
019
020
021
022
023
024
025
026
027
028
029
030
2017-10-06 16:28:58 +02:00
031
032
034
035
036
037
038
039
043
044
2017-07-11 17:45:02 +02:00
045
046
047
050
051
2017-09-26 14:46:23 +02:00
2017-09-26 14:46:23 +02:00
2017-09-26 14:46:23 +02:00
052
053
054
055
2017-07-24 15:06:04 +02:00
056
057
058
059
2017-08-01 18:09:33 +02:00
060
2017-07-10 13:18:05 +02:00
061
062
063
2017-08-01 18:09:33 +02:00
064
065
066
067
2017-09-26 14:46:23 +02:00
2017-09-26 14:46:23 +02:00
068
2017-09-06 15:19:01 +01:00
2017-09-06 15:19:01 +01:00
069
070
071
072
073
075
076
077
078
079
080
081
084
086
088
089
090
091
092
094
095
096
097
098
099
101
102
2017-09-26 15:00:32 +02:00
103
104
105
106
2017-09-26 15:00:32 +02:00
107
108
109
2017-08-08 14:36:59 +02:00
110
111
112
113
114
2017-07-10 13:18:05 +02:00
115
116
117
118
119
121
122
123
126
2017-07-11 17:45:00 +02:00
2017-07-11 17:45:00 +02:00
128
129
130
131
132
133
135
136
2017-08-08 15:19:16 +02:00
137
138
141
2017-08-01 18:09:33 +02:00
142
2017-07-11 17:45:00 +02:00
143
144
146
147
148
150
152
2017-07-10 13:18:05 +02:00
155
156
2017-08-01 18:09:33 +02:00
159
2017-07-11 17:44:59 +02:00
160
163
2017-09-26 15:00:32 +02:00
2017-09-26 15:00:32 +02:00
170
2017-07-11 17:44:59 +02:00
171
2017-07-11 17:45:00 +02:00
2017-09-18 19:43:38 -04:00
173
175
176
178
2017-07-11 17:45:01 +02:00
183
2017-06-09 11:45:03 +02:00
2017-06-09 11:45:03 +02:00
185
2017-08-11 14:44:39 +02:00
2017-10-06 16:28:58 +02:00

=== This is the QEMU I/O test suite ===

* Intro

This package contains a simple test suite for the I/O layer of qemu.
It does not require a guest, but only the qemu, qemu-img and qemu-io
binaries.  This does limit it to exercise the low-level I/O path only
but no actual block drivers like ide, scsi or virtio.

* Usage

Just run ./check to run all tests for the raw image format, or ./check
-qcow2 to test the qcow2 image format.  The output of ./check -h explains
additional options to test further image formats or I/O methods.

* Feedback and patches

Please send improvements to the test suite, general feedback or just
reports of failing tests cases to qemu-devel@nongnu.org with a CC:
to qemu-block@nongnu.org.