Commit Graph

4416 Commits

Author SHA1 Message Date
Frediano Ziglio
01bbdbd281 red-qxl: Fix spice_qxl_update_area function indentation
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2020-04-17 18:59:55 +01:00
Frediano Ziglio
974692bda1 spice-qxl: Fix typo in callback name and remove obsolete parameter
attache_worker was always spelled wrongly.
Use anonymous union (standard feature already used in different
code in SPICE) to have an aliased attached_worker function.
Also removed a parameter from this new callback and deprecate
the old.
Due to C ABI removing a parameter is not an issue,
red-qxl.c:red_qxl_attach_worker will continue to pass the parameter,
new code will ignore, old code will receive it.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-04-16 11:08:14 +01:00
Frediano Ziglio
6826487237 red-qxl: Avoid function that just call another static function
Inline the function directly, avoid useless function and developers
having to go up and down the code just to understand what these
function do.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-04-16 11:08:14 +01:00
Frediano Ziglio
6aa1a17c69 spice-qxl: Remove QXLWorker definition
It was made obsolete more than 6 years ago by

  commit fe0941fb02
  Author: Marc-André Lureau <marcandre.lureau@gmail.com>
  Date:   Thu Oct 3 22:52:38 2013 +0200

      server: mark deprecated symbols

For compatibility with spice_replay_next_cmd pass a QXLInstance
pointer. For more information see comment on
red-qxl.c:red_qxl_attach_worker.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-04-16 11:08:13 +01:00
Frediano Ziglio
2f130edfdd test-display-base: Remove only written "qxl_worker" from Test
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-04-13 15:55:11 +01:00
Frediano Ziglio
78a9aa943a spice_protocol: Small protocol documentation updates
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-04-10 15:30:00 +01:00
James Le Cuirot
b4d767bdcc build: Change Autotools pkg-config name field to match Meson
The file and library are both called spice-server so the name should
therefore be spice-server rather than just spice.

Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2020-04-10 15:28:16 +01:00
James Le Cuirot
f00224a094 build: Use Meson's pkgconfig module to generate the .pc file
The existing .pc file had the wrong dependencies for Windows and was
missing the optional private dependencies for static linking.

Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2020-04-08 18:57:52 +01:00
Frediano Ziglio
eb31f13459 build: Tell SPICE common the SPICE protocol version we require
This allows SPICE common to request the right version.
This is also implemented by Autoconf build already.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2020-04-08 14:33:13 +01:00
Frediano Ziglio
94a4578c87 Set SPICE_COMMON_CAP_PROTOCOL_AUTH_SELECTION in RedChannel
Is set in any case, but do it once instead of every time
one client connects.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-04-08 07:42:47 +01:00
Frediano Ziglio
9dde316c91 Update spice-common submodule
This brings in the following changes:

Frediano Ziglio (8):
      ci: Fix build of spice-protocol
      lz_common: Remove unused commented out define
      test-logging: Do not use G_PASTE to join level
      ci: Use spice-protocol master for make-win job
      build: Allow to build disabling code generation
      proto: Allows to specify @deprecated option for flags and enums
      messages: Remove obsolete structure definition
      proto: Generate correct constants for smartcard support

Kevin Pouget (1):
      spice.proto: add quality_indicator messages

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-04-08 07:41:11 +01:00
James Le Cuirot
26bbb85c15 build: Fix librt and libm dependencies in Meson
They need to be requested without the lib prefix, otherwise a
generated pkg-config file ends up with absolute paths instead of -l
flags.

Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2020-04-08 07:10:30 +01:00
Frediano Ziglio
595132dca8 ci: Fix for test-set-ticket leak detection
This suppression was present in former glib.supp version however
the suppression in glib.supp was updated to only catch "reachable"
leaks.
In early stages and few objects the leak could be detected as
"possible".

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-04-03 14:57:25 +01:00
Frediano Ziglio
aa199e6bc6 test-set-ticket: Test we can set the ticket before spice_server_init
Program should not crash.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-04-03 08:49:20 +01:00
Frediano Ziglio
f77f7d74a1 test-record: Fix a race condition running the test
This could happen if the machine is pretty busy.
I saw intermittent failures on CI and it happened on my
machine also while doing other batch job.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-04-03 08:48:43 +01:00
Frediano Ziglio
9ea93ab52b spicevmc: Check capabilities of the only possible client
RedVmcChannel can have only one client so check directly it
(the RedChannel version just iterate all clients).
Even if the channel would support multiple clients in this case
we would need to check only the one we are sending the message to.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-04-01 09:20:00 +01:00
Frediano Ziglio
948ec8b81b dispatcher: Move thread_id field from Dispatcher to MainDispatcher
Dispatcher is just storing the thead_id for MainDispatcher,
move thread_if to MainDispatcher to avoid useless field and API.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-03-26 14:36:14 +00:00
Frediano Ziglio
137ae60c9a build: Respect Meson's default_library option
Distributions like to be in control of this.
From a patch from  James Le Cuirot.

Instead of always build both shared and static libraries for
SPICE server (static is used for the tests) compile library
as user requested. In case we need the static library for tests
(which now can be disabled) create a static library extracting
objects from shared library.
This also fixes the problem that Meson installed the static
library even if not requested and just used for tests.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2020-03-26 14:35:23 +00:00
Frediano Ziglio
832ab9709c build: Fix a warning for Autoconf
Remove this warning:

server/Makefile.am:5: warning: SUBDIRS was already defined in condition TRUE, which includes condition ENABLE_TESTS ...
server/Makefile.am:2: ... 'SUBDIRS' previously defined here

This was caused by the recent commit 38c7964d53
("build: Make building the test binaries optional under Autoconf")

This problems was also causing some issues as "noinst_PROGRAMS" target
were not compiled as expected.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-03-26 14:11:38 +00:00
Frediano Ziglio
38c7964d53 build: Make building the test binaries optional under Autoconf
Following similar change for Meson.
Allow to save some time packaging and some dependencies.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-03-26 09:10:39 +00:00
James Le Cuirot
7a2b915551 build: Make building the test binaries optional under Meson
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2020-03-24 08:38:49 +00:00
Frediano Ziglio
271dd5de41 video-encoder: Use enumeration for encode_frame result type
Better clear the result type instead of a generic "int".

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Kevin Pouget <kpouget@redhat.com>
2020-03-24 08:38:05 +00:00
Frediano Ziglio
153e408f9f ci: Minor command simplification
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2020-03-19 14:44:18 +00:00
Frediano Ziglio
cf94bdffa6 ci: Use --werror for Meson
We want to get rid of warnings

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2020-03-19 14:44:16 +00:00
Frediano Ziglio
a6c9e499fd ci: Reuse code to install newer spice-protocol
Avoid duplications for these commands

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2020-03-19 14:44:14 +00:00
Frediano Ziglio
e9dabf7c89 ci: Remove useless command
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2020-03-19 14:44:10 +00:00
Frediano Ziglio
70c71fe487 Remove Celt support
Take from spice-common this changeset:

Victor Toso (1):
      sound: remove celt support

Remove and update reference from CI and documentation.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2020-03-17 17:15:51 +00:00
Frediano Ziglio
c6a0844422 ci: Fix build of spice-protocol
spice-protocol is not using Autoconf anymore.
Autobahn suite is now run on normal Fedora docker image.
Drop testing with CentOS 7 i386 in favour of a Debian i386,
CentOS 7 does not support i386 anymore, EPEL 7 is missing for
CentOS 7 i386 so to check a 32 machine better to move to Debian.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2020-03-17 16:01:19 +00:00
Frediano Ziglio
b196e9e78d Update spice-common submodule
This brings in the following changes:

Frediano Ziglio (3):
      Add missing dependency in Autoconf integration
      test-utils: Add a test for some utils.h functions
      build: Use warning_level option for Meson

Kevin Pouget (1):
      utils: add set_bitmap/test_bitmap functions

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-03-17 15:34:49 +00:00
Victor Toso
4194659c98 sound: default to Opus 48000 Hz
As celt's default 44100 Hz is deprecated.
Related: https://gitlab.freedesktop.org/spice/spice-protocol/-/merge_requests/15

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2020-03-17 15:33:23 +00:00
Victor Toso
9136c639a2 sound: remove celt support
Follow up of spice-protocol's deprecation of celt mode.
See: https://gitlab.freedesktop.org/spice/spice-protocol/-/merge_requests/15

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2020-03-17 15:33:20 +00:00
Frediano Ziglio
734582ed99 syntax-check: Add missing contributor name to AUTHORS
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-03-17 10:01:38 +00:00
James Le Cuirot
6ee5f5d8b1 build: Add missing dependency on pthreads under Meson
This fixes building against MinGW.

There is some discussion around how Meson might handle other threading
APIs but at least for now, dependency('threads') is for pthreads.

Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2020-03-17 09:38:47 +00:00
Frediano Ziglio
3f851e4f5c red-worker: Fix debugging code
If file was compiled with DEBUG defined code did not compile.
Update code of the surrounded section.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-03-17 08:18:18 +00:00
Frediano Ziglio
75eaa618a7 dispatcher: Remove some obsolete debugging code
I've never seen used and Dispatcher is quite a code piece of
code, hard to break it.
I also tried to enable and it does not even compile anymore.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-03-17 08:17:32 +00:00
Frediano Ziglio
cc95067a39 dispatcher: Remove unused "stage" field
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-03-14 11:53:23 +00:00
Frediano Ziglio
fff6e7da69 smartcard: Avoid useless cast
We just created the object, we know is a RedCharDeviceSmartcard,
avoid to cast the pointer using RED_CHAR_DEVICE_SMARTCARD.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-03-12 18:57:54 +00:00
Frediano Ziglio
a59cfc0cc3 build: Use warning_level option for Meson
warning_level 2 setting for Meson add the same "-Wall -Wextra"
options to GCC compiler.
This removes a warning using Meson.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2020-03-12 18:57:11 +00:00
Frediano Ziglio
ac38d4bbf9 build: By default use debugoptimized build type for Meson
Usually the default options for C are "-O2 -g".
So this build type is more conservative.
Normal users wanting to build the package won't find themselves
with a bad performance executable.
This will catch some potentially warning not detected with
debug build.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2020-03-12 18:57:08 +00:00
Frediano Ziglio
7a4ca27f98 build: Cleanup old comment
In Meson better to use --werror option instead to manually add to
options

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2020-03-12 18:57:02 +00:00
Frediano Ziglio
892639a696 inputs-channel: Remove unused macros
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Francesco Giudici <fgiudici@redhat.com>
2020-03-09 13:32:46 +00:00
Frediano Ziglio
1a91da8689 migrate.py: By default try to search system qemu executable
Do not look to "../../qemu/x86_64-softmmu/qemu-system-x86_64",
this will be searched with which if no found, just use the name.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2020-03-09 12:28:45 +00:00
Frediano Ziglio
768360018a migrate.py: Use python3 as executable interpreter
The script was updated to use Python 3 syntax.
Although you can launch with "python3 ./tests/migrate.py ..."
better to also update the script source to make it
executable directly.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2020-03-09 12:28:39 +00:00
Frediano Ziglio
2c2e5bd531 spice_protocol: Minor updates
Update many "red" prefixes.
Add some capabilities for audio.
Update some structure names.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Francesco Giudici <fgiudici@redhat.com>
2020-03-05 10:52:23 +00:00
Victor Toso
84f257e263 migrate.py: add seamless migration option
Now we always add seamless-migration option to qemu command line and
disabled (off) by default although seamless migration is supported for
over 7 years already!

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Kevin Pouget <kpouget@redhat.com>
2020-03-04 16:09:49 +00:00
Victor Toso
81d28cac55 migrate.py: cosmetic changes
Make one argument per line;
Indent with arguments;

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Kevin Pouget <kpouget@redhat.com>
2020-03-04 16:09:46 +00:00
Victor Toso
4882e01370 migrate.py: add option for hostname change
This is used in the migrate message and being able to tweak it allows
clients from different machines to test this local migration test.

Example of usage:
    ./migrate.py --hostname 192.168.122.1 --wait-user-connect

In a VM with access to 192.168.122.1:
    remote-viewer spice://192.168.122.1:5911

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Kevin Pouget <kpouget@redhat.com>
2020-03-04 16:09:44 +00:00
Victor Toso
49e3e7a6d4 migrate.py: style, break line of qmp's command
Preparatory patch for adding support to change hostname.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Kevin Pouget <kpouget@redhat.com>
2020-03-04 16:09:41 +00:00
Victor Toso
632cfa1c3d migrate.py: cosmetic changes on start_qemu()
This function can be tweak quite a bit due all possibilities around
QEMU configuration. This patch removes incoming_args and extra_args
and move their values to the right place in the function.

I'm also applying a more extensive coding style for parameters, so
when we need to do changes it should happen with fewer lines.

While at it, change to string interpolation from 3.6+, suggested by
Kevin Pouget.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Kevin Pouget <kpouget@redhat.com>
2020-03-04 16:09:39 +00:00
Victor Toso
57af035749 migrate.py: simplify wait_active()
We are only interested in the running state of qmp (or VCPUS) here
which is what we check. Moving this check to the try branch allows
removing some extra checks.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Kevin Pouget <kpouget@redhat.com>
2020-03-04 16:09:37 +00:00