summaryrefslogtreecommitdiffstats
path: root/server/tests
Commit message (Collapse)AuthorAgeFilesLines
* Add missing license headersChristophe Fergeau2015-10-1916-0/+273
|
* syntax-check: Remove unused #include <strings.h>Christophe Fergeau2015-10-191-1/+0
|
* syntax-check: Add missing #include <config.h>Christophe Fergeau2015-10-191-0/+4
|
* Update the .gitignore files for the new manual,Jeremy White2015-10-161-0/+4
| | | | for a few newly generated tests, and for the spice-server.h.
* tests: Fix -Werror=format-zero-length build failureChristophe Fergeau2015-09-291-2/+0
| | | | | | | replay.c: In function 'replay_channel_event': replay.c:226:16: error: zero-length gnu_printf format string [-Werror=format-zero-length] g_printerr("");
* replay: compatibility with former versionFrediano Ziglio2015-09-011-5/+6
| | | | | | GMutex usage in replay.c was not working so replace with plain pthread. Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
* replay: do not define same type twiceFrediano Ziglio2015-09-011-4/+4
| | | | | | | | | | Avoid to use typedef twice for the same type as some compiler complaints about it. SpiceTimer and SpiceWatch are defined in server/spice-core.h as an abstract type which should be defined by some code (as server/tests/basic_event_loop.c does). Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
* build-sys: Remove test_spice_version.hChristophe Fergeau2015-08-261-42/+0
| | | | | | | This script was used at make distcheck time to verify consistency of the version number defined in configure.ac and in spice-server headers. Since commit ab12cf414c, these 2 version numbers can no longer be out of sync, so we can drop this script.
* server/tests/spice-server-replay: introduceAlon Levy2015-08-222-0/+355
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | usage: spice-server-replay -p <port> -c <client command line> <cmdfile> will run the commands from cmdfile ignoring timestamps, right after a connection is established from the client, and will SIGINT the client on end of cmdfile, and exit itself after waiting for the client. spicy-stats from spice-gtk is useful for testing, it prints the summary of the traffic on each channel. You can also run with no client by doing: spice-server-replay <cmdfile> For example, the 300 MB file (compressed to 4 MB with xz -9) available at [1] produces the following output: spicy-stats total bytes read: total bytes read: inputs: 214 display: 1968983 cursor: 390 main: 256373 You could run it directly like so: curl http://annarchy.freedesktop.org/~alon/win7_boot_shutdown.cmd.xz | \ xzcat | server/tests/spice-server-replay -p 12345 -c `which spicy-stats` - Known Problems: * Implementation is wrong. Should do a single device->host conversion (i.e. get_virt), and then marshall/demarshall that (i.e. RedDrawable). * segfault on file read done resulting in the above spicy-stats not being reproducable (well, up to 1% yes). [1] http://annarchy.freedesktop.org/~alon/win7_boot_shutdown.cmd.xz Now based on glib including using an asyncqueue for reading the playback file, and proper freeing of the allocated commands, with --slow, --compression and a progress timer, and doesn't use more then nsurfaces. Signed-off-by: Alon Levy <alon@pobox.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
* tests: use glib main loopMarc-André Lureau2015-08-202-190/+97
|
* build-sys: Remove spice-protocol submoduleChristophe Fergeau2015-08-201-0/+1
| | | | | It's seeing regular releases and is API stable, so we don't need to bundle it with spice-server
* Adjust to new SpiceImageCompress nameChristophe Fergeau2015-07-294-4/+4
| | | | | | | | This has been renamed to SpiceImageCompression in order to avoid clashes with older spice-server in the SPICE_IMAGE_COMPRESS_ namespace. This commit is a straight rename of SpiceImageCompress to SpiceImageCompression and SPICE_IMAGE_COMPRESS_ to SPICE_IMAGE_COMPRESSION_
* Add libraries such as -lm and -lpthread to the tests build line.Jeremy White2015-07-281-0/+1
| | | | | | | | | | | | | This prevents a compile error on Debian Jessie, from git, such as this: /usr/bin/ld: test_playback.o: undefined reference to symbol 'sin@@GLIBC_2.2.5' //lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line This is fairly subtle, and Debian specific. It only happens when you use autoreconf to generate a new libtool script. Debian patches that script to require an explicit setting to link with all dependent libraries. It should be harmless on other distros, and it does save us Debian guys some hassle.
* tests: Fix build on HurdFabiano Fidêncio2015-02-241-0/+4
| | | | | | | As PATH_MAX is not defined on Hurd, let's check for it and define whenever it is necessary. https://bugs.freedesktop.org/show_bug.cgi?id=74313
* build-sys: fix out-of-tree build of testsMarc-André Lureau2014-11-291-0/+1
| | | | | | | | | | | | Fixes the following build error: In file included from /home/elmarco/src/spice-new/src/spice/server/tests/test_display_base.h:4:0, from /home/elmarco/src/spice-new/src/spice/server/tests/test_display_no_ssl.c:11: /home/elmarco/src/spice-new/src/spice/server/spice.h:23:27: fatal error: spice-version.h: No such file or directory #include "spice-version.h" ^
* server/tests/Makefile.am: White-space cleanupChristophe Fergeau2014-09-181-12/+12
| | | | Make sure the \ at the end of lines are nicely aligned
* Fix -Wunused-functionFabiano Fidêncio2014-09-122-73/+0
|
* Fix -Wmissing-field-initializersFabiano Fidêncio2014-09-125-37/+31
|
* Fix -WnonnullFabiano Fidêncio2014-09-121-1/+2
|
* Fix -WformatFabiano Fidêncio2014-09-121-1/+1
|
* Fix -WswitchFabiano Fidêncio2014-09-121-0/+2
|
* Fix -WsignFabiano Fidêncio2014-09-122-3/+3
|
* Fix -Wunused-valueFabiano Fidêncio2014-09-121-1/+1
|
* Fix -Wunused-parameterFabiano Fidêncio2014-09-127-31/+58
|
* build-sys: check for spicy-screenshotMarc-André Lureau2014-09-081-3/+3
|
* tests: Avoid malloc failuresChristophe Fergeau2014-01-022-2/+8
| | | | | | test-display-streaming is calling malloc() without checking its return value. Coverity warns about this. This commit switches to g_malloc() to sidestep this warning (g_malloc() never returns NULL but aborts instead).
* tests: Remove unused variablesChristophe Fergeau2014-01-022-3/+0
| | | | | coverity spotted some variables that were declared but not used in server/tests
* server/tests: avoid using deprecated symbolsMarc-André Lureau2013-10-071-7/+6
|
* build-sys: fix some automake warningMarc-André Lureau2013-09-171-2/+2
| | | | | client/Makefile.am:199: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') server/tests/Makefile.am:3: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
* syntax-check: make sure config.h is the first included .h fileUri Lublin2013-07-161-1/+1
|
* syntax-check: fix no-newline or empty line at EOFUri Lublin2013-07-161-1/+1
|
* syntax-check: fix cast_of_argument_to_freeUri Lublin2013-07-161-1/+2
| | | | | | | | In this case, make syntax-check is wrong, and we actually do need the cast. A cast is needed when types are uint64_t <--> pointer Using a local "ptr" variable makes both gcc and syntax-check happy.
* server/tests: fix timer for test_empty_successUri Lublin2013-07-161-1/+9
|
* server/tests: test_display_width_stride: add destroy commandUri Lublin2013-07-161-0/+9
| | | | | Otherwise, the test exits after the first iteration over all tests, on the second attempt to create an already created surface.
* server/tests: remove option from usage if AUTOMATED_TESTS is not configuredUri Lublin2013-07-161-6/+19
|
* server/tests: invalid-option: print the bad argumentUri Lublin2013-07-161-1/+1
| | | | optind points to the next argument to parse.
* server/tests: fix produce_command for create surfaceUri Lublin2013-07-161-2/+4
| | | | | | | | | | | Earlier in this function, test->target_surface is set to 1, which is the only allowed non-primary surface currently. If surface parameters are given (and specifically data is checked) they are being used, otherwise a default surface is used. Earlier in this function, "command" is set to a non-NULL value. Thus, the else part was unreachable code, which is fixed now.
* server/tests: test_display_base: set rect according to appropriate surfaceUri Lublin2013-07-161-5/+2
| | | | | | | | | When surface_id == 0, primary is used. Otherwise (currently 1), secondary is used. Also, remove unused test_width and test_height. Since commit caea7699434c20dceef8fc79d21b8eeb663fbf53, test->width and test->height are used.
* server/tests: test_display_width_strideAlon Levy2013-05-174-7/+154
|
* server/tests/test_display_base: add missing set_client_capabilities, fix ↵Alon Levy2013-05-171-1/+11
| | | | client_monitors_config signature
* Revert "server: add websockets support via libwebsockets"Alon Levy2012-11-041-3/+1
| | | | This reverts commit 63bb37276e028ab1b1c156c9e7907bf22b6d5952.
* server: add websockets support via libwebsocketsAlon Levy2012-10-251-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New API: spice_server_set_ws_ports This adds an optional dependency on libwebsockets. You need to get my patched 0.0.3 version here: git://people.freedesktop.org/~alon/libwebsockets There is no qemu patches yet, to test change in reds.c the default value of spice_ws_port to 5959 (for the default of spice-html5). For testing there is an online client at http://spice-space.org/spice-html5/spice.html Known issues: 1. The tester (server/tests/test_display_no_ssl) gets into dropping all data after a few seconds, I think it's an issue with the implemented watches, but haven't figured it out. 2. libwebsocket's read interface is inverted to what our code expects, i.e. there is no libwebsocket_read, so there is an additional copy involved (see RedsWebSocket). This can be fixed. 3. Listening on a separate port. Since the headers are different, we could listen on the same port (first three bytes RED/GET). I don't know if we want to? Todos: 1. SSL not implemented yet. Needs some thought as to how. 2. Serve spice-html5 when accessed as a http server. Nice to have.
* server/tests/test_display_base: fix segfault in testAlon Levy2012-10-251-1/+5
|
* server/tests: agent mock, client_monitors_configAlon Levy2012-09-134-1/+49
|
* server/tests/test_display_base: fix update_area abortAlon Levy2012-09-031-1/+3
| | | | | Don't do zero area update_areas, server now aborts on those. This tester is not supposed to test those aborts.
* server: add dist-hook to prevent spice version configure/spice.h differenceAlon Levy2012-09-031-0/+42
|
* add server/tests/test_vdagentAlon Levy2012-09-022-0/+115
|
* server/tests/test_two_serversAlon Levy2012-09-022-0/+47
|
* server/tests: introduce Test structAlon Levy2012-09-025-146/+170
|
* tests: add missing file to .gitignoreMarc-André Lureau2012-07-161-0/+1
| | | | TODO: some day, switch to git.mk