mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-31 02:41:52 +00:00
Remove warnings like:
In file included from /usr/include/glib-2.0/glib.h:86,
from ../server/tests/test-glib-compat.h:21,
from ../server/tests/test-channel.cpp:25:
In function 'void send_ack_sync(int, uint32_t)',
inlined from 'void channel_loop()' at ../server/tests/test-channel.cpp:250:18:
../server/sys-socket.h:28:43: error: 'ssize_t write(int, const void*, size_t)' reading 10 bytes from a region of size 2 [-Werror=stringop-overread]
28 | #define socket_write(sock, buf, len) write(sock, buf, len)
/usr/include/glib-2.0/glib/gtestutils.h:50:61: note: in definition of macro 'g_assert_cmpint'
50 | gint64 __n1 = (n1), __n2 = (n2); \
| ^~
../server/tests/test-channel.cpp:132:21: note: in expansion of macro 'socket_write'
132 | g_assert_cmpint(socket_write(socket, &msg.type, 10), ==, 10);
| ^~~~~~~~~~~~
../server/tests/test-channel.cpp: In function 'void channel_loop()':
../server/tests/test-channel.cpp:123:18: note: source object 'send_ack_sync(int, uint32_t)::<unnamed struct>::type' of size 2
123 | uint16_t type;
| ^~~~
In file included from ../server/tests/test-channel.cpp:22:
/usr/include/unistd.h:367:16: note: in a call to function 'ssize_t write(int, const void*, size_t)' declared with attribute 'access (read_only, 2, 3)'
367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
| ^~~~~
cc1plus: all warnings being treated as errors
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
||
|---|---|---|
| .. | ||
| pki | ||
| valgrind | ||
| .gitignore | ||
| autobahn-check-report | ||
| base_test.ppm | ||
| basic-event-loop.c | ||
| basic-event-loop.h | ||
| fuzzingclient.json | ||
| Makefile.am | ||
| meson.build | ||
| README | ||
| regression-test.py | ||
| replay.c | ||
| stat-test.c | ||
| test-agent-msg-filter.c | ||
| test-channel.cpp | ||
| test-codecs-parsing.c | ||
| test-dispatcher.cpp | ||
| test-display-base.cpp | ||
| test-display-base.h | ||
| test-display-no-ssl.c | ||
| test-display-resolution-changes.c | ||
| test-display-streaming.c | ||
| test-display-width-stride.c | ||
| test-empty-success.c | ||
| test-fail-on-null-core-interface.c | ||
| test-glib-compat.h | ||
| test-gst.cpp | ||
| test-leaks.c | ||
| test-listen.c | ||
| test-loop.c | ||
| test-multiple.py | ||
| test-options.c | ||
| test-playback.c | ||
| test-qxl-parsing.c | ||
| test-record.c | ||
| test-sasl.c | ||
| test-set-ticket.c | ||
| test-smartcard.cpp | ||
| test-stat-file.c | ||
| test-stat.c | ||
| test-stream-device.cpp | ||
| test-stream.c | ||
| test-two-servers.c | ||
| test-vdagent.c | ||
| test-video-encoders | ||
| test-websocket.c | ||
| vmc-emu.cpp | ||
| vmc-emu.h | ||
| win-alarm.c | ||
| win-alarm.h | ||
What is here ============ This directory will contain a testsuite for the server. You can run all the tests and use libtool to debug any of them: libtool --mode=execute gdb test-just-sockets-no-ssl Overview of tests ================= test-just-sockets-no-ssl A complete server, only provides the main and inputs channels. Doesn't actually produce anything on the channels. Essentially a test of the regular link code (reds.c), good for multiple connect/disconnect tests. test-empty-success tests calling test-fail-on-null-core-interface should abort when run (when spice tries to watch_add) basic-event-loop.c event loop to provide core interface. Automated tests =============== test-display-streaming.c this test can be used to check regressions. For this, test-display-streaming needs to be called passing --automated-tests as parameter