|
6268ba1c
|
2020-10-19T11:51:27
|
|
test: catch unrecognized keysyms in the xkeyboard-config test
Prompted by
https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/merge_requests/127
We run the keymap tool with --verbose which will print the messages from the
compiler to the log file as well. And then we can search for the warning
regarding an unrecognized keysym and fail our test based on that.
|
|
afdc9cee
|
2020-10-19T10:49:37
|
|
xkbcomp: where a keysym cannot be resolved, set it to NoSymbol
Where resolve_keysym fails we warn but use the otherwise uninitialized variable
as our keysym. That later ends up in the keymap as random garbage hex value.
Simplest test case, set this in the 'us' keymap:
key <TLDE> { [ xyz ] };
And without this patch we get random garbage:
./build/xkbcli-compile-keymap --layout us | grep TLDE:
key <TLDE> { [ 0x018a5cf0 ] };
With this patch, we now get NoSymbol:
./build/xkbcli-compile-keymap --layout us | grep TLDE:
key <TLDE> { [ NoSymbol ] };
|
|
6178924f
|
2020-09-07T12:27:26
|
|
test/tool-option-parsing: skip testing of disabled tools
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
c621319e
|
2020-09-07T10:36:18
|
|
test/tool-option-parsing: switch from pytest to unittest
For me, installing pytest for libxkbcommon is a bit problematic, so I
end up skipping it which is not great.
Switch to unittest which is built in to Python. It's not as nice as
pytest but good enough in this case.
Note: I was too lazy to switch the plain asserts to unittest
assertions...
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
c8f309a2
|
2020-09-07T11:10:19
|
|
test/tool-option-parsing: keep isolated by using our own test data
Make it possible to run the test on all machines.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
13745014
|
2020-09-07T19:24:12
|
|
test: include unstd.h in the registry test to cut down the MacOS warnings
mkdtmp, rmdir and unlink are in unstd.h on MacOS. Since including that it
doesn't hurt us on Linux, let's do it without ifdefs.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
534e54f6
|
2020-09-07T11:38:00
|
|
test/data: add rule registry files
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
1c352199
|
2020-09-07T11:35:22
|
|
test/data: sync from xkeyboard-config 2.30
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
461d7278
|
2020-09-07T11:15:43
|
|
test/data: change quartz.xkb from CRLF to LF
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
850ba7e6
|
2020-09-07T08:22:32
|
|
test: fix the xkbcli --version test
Fixes https://github.com/xkbcommon/libxkbcommon/issues/185
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
d7b39f6f
|
2020-07-10T08:50:02
|
|
Add /etc/xkb as extra lookup path for system data files
This completes the usual triplet of configuration locations available for most
processes:
- vendor-provided data files in /usr/share/X11/xkb
- system-specific data files in /etc/xkb
- user-specific data files in $XDG_CONFIG_HOME/xkb
The default lookup order user, system, vendor, just like everything else that
uses these conventions.
For include directives in rules files, the '%E' resolves to that path.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
9b9c5f20
|
2020-07-29T08:13:14
|
|
test: fix the xkeyboard-config test
'xkbcli compile-keymap' doesn't work unless we ninja install first. But for a
test that's to be run from the test directory, that's not a useful option so
let's call the binary directly. The script adds the meson builddir to the PATH
anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
03ecaa6b
|
2020-07-27T11:26:51
|
|
test: ignore the real XDG_CONFIG_HOME during tests
Let's not have our tests fail if the user has an incompatible
$XDG_CONFIG_HOME/xkb directory.
libxkbcommon has fallbacks when XDG_CONFIG_HOME isn't set so we need to override
this with a real directory instead of just unsetting it.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
fcc6b28f
|
2020-07-27T11:57:24
|
|
tools/interactive-evdev: fixup 64bff65
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
0df23ea8
|
2020-07-25T16:38:43
|
|
test/tool-option-parsing: remove --kccgst test, it's private for now
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
608e9361
|
2020-07-25T16:30:39
|
|
tools: run test-tool-option-parsing.py like a regular test
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
29e80e7b
|
2020-07-08T13:30:47
|
|
tools: install our tools as xkbcli subcommands
The xkbcli tool usage help is ifdef'd out where the tool isn't built but the
man page always includes all tools. Easier that way.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
f0b1441f
|
2020-07-23T08:49:54
|
|
test: make the symbols-leak-test executable
Python leaks like crazy when run under valgrind. But if we make the script
executable **and** it has uses the env invocation (i.e. #!/usr/bin/env python3),
the leaks disappear. This is not the case for a shebang of /usr/bin/python3.
Why exactly this is the case I'm not sure but executables we plan to run
should have the exec bit set. So this is a janitor patch with the nice side
effect of fixing our valgrind runs.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
a4901662
|
2020-07-22T20:02:25
|
|
PACKAING: remove bash
Converted to Python.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
fa300b24
|
2020-07-22T11:47:15
|
|
test: fix Windows CI by rewriting symbols-leak-test from bash to python
The CI started installing some wrapper instead of a real bash which is
what gets found.
See:
https://github.com/actions/virtual-environments/pull/1081
Given meson is written in python, it should always be available
hopefully.
Disabled valgrind wrapper for now because it now also applies to the
python interpreter which leaks like a sieve.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
41a7c975
|
2020-07-10T14:57:57
|
|
Add asprintf_safe helper function
We only ever care about whether we error out or not, so let's wrap this into
something more sane.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
afb26e7d
|
2020-05-12T14:09:50
|
|
Add libxkbregistry to query available RMLVO
This library is the replacement for clients parsing evdev.xml directly.
Instead, they should use the API here so that in the future we may even
be able to swap evdev.xml for a more suitable data format.
The library parses through evdev.xml (using libxml2) and - if requested -
through evdev.extras.xml as well. The merge approach is optimised for
the default case where we have a system-installed rules XML and another file in
$XDG_CONFIG_DIR that adds a few entries. We load the system file first, then
append any custom ones to that. It's not possible to overwrite the MLVO list
provided by the system files - if you want to do that, get the change upstream.
XML validation is handled through the DTD itself which means we only need to
check for a nonempty name, everything else the DTD validation should complain
about.
The logging system is effectively identical to xkbcommon.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
fe886133
|
2020-06-23T11:07:53
|
|
utils: add streq_null() for streq that allows NULL values
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
9b1b0c57
|
2020-06-16T10:34:07
|
|
Add a snprintf_safe() helper function
Returns true on success or false on error _or_ truncation. Since truncation is
almost always an error anyway, we might as well make this easier to check.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
43b9d092
|
2020-07-01T07:58:35
|
|
test: fix the xkeyboard-config test for the prefixed tool name
Regression introduced in 362130debb5d90d77f0d4f7549880b5f9699f647
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
314b6486
|
2020-06-24T08:30:50
|
|
test: drop some now-obsolete functions
These were moved to tools/tools-common.c and now that all tools are switched
over, they're no longer needed.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
3adbe54e
|
2020-06-23T16:20:08
|
|
tools: move the remaining tools from test to here
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
f525f9f0
|
2020-06-23T16:25:50
|
|
test: disentangle interactive-wayland from the test headers
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
1326d5ad
|
2020-06-23T16:23:24
|
|
test: untangle interactive-x11 from the test headers
Use the new tools headers and create a custom internal lib for the x11 tool.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
c09bf363
|
2020-06-23T14:01:48
|
|
test: untangle interactive-evdev from the test headers
Move (sometimes duplicate) the required bits into new shared files
tools-common.(c|h) that are compiled into the internal tools library. Rename the
test_foo() functions to tools_foo() and in one case just copy the code of the
keymap compile function to the tool.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
2eb5d2c8
|
2020-06-23T16:06:10
|
|
test: simplify error handling in interactive-evdev
Passing -errno around and having separate labels depending on failure types is
superfluous here. All the unref calls can handle NULL and nothing cares about
errno once we're out of the immediate scope. So let's simplify this and deal
with 0 and 1 only.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
ec2bbe59
|
2020-06-22T13:07:46
|
|
Move the various tools to a tools/ directory
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
725a3198
|
2020-06-22T13:08:51
|
|
test: how-to-type: prefer local headers over system ones
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
928771ed
|
2020-06-22T13:17:47
|
|
test: untangle rmlvo-to-kccgst from the test headers
Using test helpers to init the context gives it fairly specific behavior; unless
the user sets the right environment variables and/or calls it from the right
PWD, it may or may not include the test data.
Let's drop this behavior, make it a default tool to compile a keymap. If there
is a specific need to modify the include paths, we can add this later.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
e5d4056e
|
2020-06-22T13:04:43
|
|
test: untangle print-compiled-keymap from the test headers
Commit 16c84cdd819db516fff089c76b99248fb7dd4e8c removed the getopt handling for
RMLVO arguments, so now this tool only takes a keymap file and compiles it.
Using test helpers to init the context gives it fairly specific behavior; unless
the user sets the right environment variables and/or calls it from the right
PWD, it may or may not include the test data.
Let's drop this behavior, make it a default tool to compile a keymap. If there
is a specific need to modify the include paths, we can add this later.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
7d1aefdd
|
2020-06-22T13:01:41
|
|
test: simplify an exit path
The unref() functions take NULL as argument, so we don't need different labels
for every possible exit path.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
860cfc03
|
2020-04-05T00:07:57
|
|
keymap: don't forget about fallback mappings in xkb_keymap_key_get_mods_for_level()
If the active set of modifiers doesn't match any explicit entry of the
key type, the resulting level is 0 (i.e. Level 1). Some key types don't
explicitly map Level 1, taking advantage of this fallback.
Previously, xkb_keymap_key_get_mods_for_level didn't consider this, and
only reported masks for explicit mappings. But this causes some glaring
omissions, like matching "a" in the "us" keymap returning not results.
Since every mask which isn't explicitly mapped falls back to 0, we can't
return the all. Almost always the best choice for this is the empty
mask, so return that, when applicable.
Fixes https://github.com/xkbcommon/libxkbcommon/issues/140.
Reported-by: https://github.com/AliKet
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
0f1cae0c
|
2020-03-25T08:43:41
|
|
test: use flag instead of hardcoded value in examples
|
|
8a1709a4
|
2020-03-21T12:56:13
|
|
test/how-to-type: some code fixes/improvements
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
188a1c79
|
2020-03-20T18:29:03
|
|
test: add "how to type" demo program
The program takes a unicode codepoint and an RMLVO and prints out all
key + modifier combinations that would result in that codepoint.
The program was written to exercise the new
xkb_keymap_key_get_mods_for_level() function. It's handy and can be
extended in several ways, but enough for now.
Example:
$ ./build/how-to-type -l us,il,ru 0x41 | column -ts $'\t'
keysym: A (0x41)
KEYCODE KEY NAME LAYOUT# LAYOUT NAME LEVEL# MODIFIERS
38 AC01 1 English (US) 2 [ Shift ]
38 AC01 1 English (US) 2 [ Lock ]
38 AC01 2 Hebrew 2 [ Shift ]
38 AC01 2 Hebrew 2 [ Lock ]
$ ./build/how-to-type -l de -v neo 0x3b6 | column -ts $'\t'
keysym: Greek_zeta (0x7e6)
KEYCODE KEY NAME LAYOUT# LAYOUT NAME LEVEL# MODIFIERS
56 AB05 1 German (Neo 2) 4 [ Shift Mod5 ]
56 AB05 1 German (Neo 2) 4 [ Shift Mod2 Mod3 Mod5 ]
56 AB05 1 German (Neo 2) 4 [ Shift Lock Mod5 ]
56 AB05 1 German (Neo 2) 4 [ Lock Mod2 Mod3 Mod5 ]
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
d92a248c
|
2020-02-05T17:42:06
|
|
API to query modifier set required to type a keysym
The new API is useful to implement features like auto-type and
desktop automation. Since the inputs for these features is usually
specified in terms of the symbols that need to be typed, the
implementation needs to be able to invert the keycode->keysym
transformation and produce a sequence of keycodes that can be used
to type the requested character(s).
|
|
0345aba0
|
2020-02-12T23:44:42
|
|
Support translation Unicode codepoints to keysyms
In order to support features like auto-type and UI automation, the
relevant tools need to be able to invert the keycode->keysym->text
transformation. In order to facilitate that, a new API was added.
It allows querying the keysyms that correspond to particular Unicode
codepoints. For all practical purposes, it can be thought of as an
inverse of xkb_keysym_to_utf32().
|
|
f1186acf
|
2019-08-05T15:53:04
|
|
MSVC: Provide implementations of [un]setenv()
Reference:
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/putenv-s-wputenv-s
|
|
abb2f9d9
|
2019-08-05T15:44:33
|
|
MSVC: Provide implementations of test_{dis,en}able_stdin_echo
This provides implementations of the test_enable_stdin_echo and
test_disable_stdin_echo which do not require <termios.h>, which is
not available on Windows.
|
|
5354dee2
|
2019-08-05T13:52:18
|
|
MSVC: Use <io.h> as an alternative for <unistd.h>
Only the input/output functions from <unistd.h> options are used, so
using <io.h> when building with MSVC should be enough. The inclusion
of the header in context-priv.c does not seem to be needed (tested
on GNU/Linux) and so it is removed.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
faac4ba7
|
2019-12-28T15:52:20
|
|
test/data: ensure files are checked out with LF, not CRLF
The tests stringcomp and buffercomp do binary comparison on some files;
if the files are changed to CRLF on checkout, the tests fail.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
d1e39c11
|
2019-12-28T14:11:27
|
|
test/atom: use correct format specifier for size_t
From MSVC:
test\atom.c(98): note: consider using '%zu' in the format string
test\atom.c(98): warning C4477: 'fprintf' : format string '%lu' requires an argument of type 'unsigned long', but variadic argument 1 has type 'size_t'
test\atom.c(100): note: consider using '%zu' in the format string
test\atom.c(100): warning C4477: 'fprintf' : format string '%lu' requires an argument of type 'unsigned long', but variadic argument 1 has type 'size_t'
test\atom.c(114): note: consider using '%zu' in the format string
test\atom.c(114): warning C4477: 'fprintf' : format string '%lu' requires an argument of type 'unsigned long', but variadic argument 1 has type 'size_t'
test\atom.c(128): note: consider using '%zu' in the format string
test\atom.c(128): warning C4477: 'fprintf' : format string '%lu' requires an argument of type 'unsigned long', but variadic argument 1 has type 'size_t'
test\atom.c(130): note: consider using '%zu' in the format string
test\atom.c(130): warning C4477: 'fprintf' : format string '%lu' requires an argument of type 'unsigned long', but variadic argument 1 has type 'size_t'
test\atom.c(137): note: consider using '%zu' in the format string
test\atom.c(137): warning C4477: 'fprintf' : format string '%lu' requires an argument of type 'unsigned long', but variadic argument 2 has type 'size_t'
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
da4a90c1
|
2019-12-28T13:49:40
|
|
Open files in binary mode
This turns off some misfeatures on Windows, and does nothing on POSIX.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
fe417d84
|
2019-12-28T13:40:38
|
|
test/common: avoid double // in path
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
eb23982c
|
2019-12-28T13:32:02
|
|
test/common: simplify test_get_path()
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
f967d46b
|
2019-12-27T15:47:15
|
|
test/context: use a more portable directory-exists check
MSVC doesn't have opendir/closedir.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
670566f0
|
2019-12-27T15:03:10
|
|
Only add GCC diagnostic pragmas when compiler is GCC compatible
Avoid "unknown pragma" warnings on other compilers.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
40aab05e
|
2019-12-27T13:03:20
|
|
build: include config.h manually
Previously we included it with an `-include` compiler directive. But
that's not portable. And it's better to be explicit anyway.
Every .c file should have `include "config.h"` first thing.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
ca033a29
|
2019-09-03T11:23:14
|
|
rules: add include statements to rules files
The majority use-case for extending XKB on a machine is to override one or a
few keys with custom keycodes, not to define whole layouts.
Previously, we relied on the rules file to be a single file, making it hard to
extend. libxkbcommon parses $XDG_CONFIG_HOME/xkb/ but that only works as long
as there is a rule that matches the user-specified RMLVO. This works for MLV
but not for options which don't have a wildcard defined. Users have to copy
the whole rules file and then work from there - not something easy to extend
and maintain.
This patch adds a new ! include directive to rules files that allows including
another file. The file path must be without quotes and may not start with the
literal "include". Two directives are supported, %H to $HOME and %S for the
system-installed rules directory (usually /usr/share/X11/xkb/rules).
A user would typically use a custom rules file like this:
! option = symbols
custom:foo = +custom(foo)
custom:bar = +custom(baz)
! include %S/evdev
Where the above defines the two options and then includes the system-installed
evdev rule. Since most current implementations default to loading the "evdev"
ruleset, it's best to name this $XDG_CONFIG_HOME/xkb/rules/evdev, but any
valid name is allowed.
The include functionally replaces the line with the content of the included
file which means the behavior of rules files is maintained. Specifically,
custom options must be defined before including another file because the first
match usually wins. In other words, the following ruleset will not assign
my_model as one would expect:
! include %S/evdev
! model = symbols
my_model = +custom(foo)
The default evdev ruleset has wildcards for model and those match before the
my_model is hit.
The actual resolved components need only be in one of the XKB lookup
directories, e.g. for the example above:
$ cat $XDG_CONFIG_HOME/xkb/symbols/custom
partial alphanumeric_keys
xkb_symbols "foo" {
key <TLDE> { [ VoidSymbol ] };
};
partial alphanumeric_keys
xkb_symbols "baz" {
key <AB01> { [ k, K ] };
};
This can then be loaded with the XKB option "custom:foo,custom:bar".
The use of "custom" is just as an example, there are no naming requirements
beyond avoiding already-used ones. Also note the bar/baz above - the option
names don't have to match the component names.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
1de2f174
|
2019-11-13T13:42:11
|
|
test: let rmlvo-to-kccgst take long options like rmlvo-to-keymap
The short options were left for backwards compatibility.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
c79c8033
|
2019-11-09T21:25:01
|
|
atom: combine atom_intern() and atom_lookup()
Use an "add" bool parameter instead. This simplifies the code a bit.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
2a615593
|
2019-11-08T22:40:13
|
|
test/atom: increase iteration count and print random seed on failure
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
2af474e8
|
2019-11-02T13:31:44
|
|
parser: get rid of "stealing" atoms
This requires (well, at least implemented by) casting away `const` which
is undefined behavior, and clang started to warn about it.
The micro optimization didn't save too many allocations, anyway.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
31e561fc
|
2019-11-05T13:33:11
|
|
test: remove a superfluous string-is-null check
A few lines above we check path_rel[0], so any null pointer will blow up
before we get here.
Found by coverity
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
96ef14ac
|
2019-11-05T13:22:49
|
|
test: fix a potential memory leak
Found by coverity
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
3515ba19
|
2019-11-01T10:45:43
|
|
test: xkeyboard-config: bring back the progress bar
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
8f93e22a
|
2019-11-01T18:41:16
|
|
test: xkeyboard-config: invoke the python3 command (#120)
python3 is always python3, but python could be python2 in some cases. Or just
missing (e.g. RHEL8).
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
0609073c
|
2019-11-01T11:09:16
|
|
test: xkeyboard-config: add missing variant tests
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
f4a0f738
|
2019-11-01T09:54:29
|
|
test: xkeyboard-config: use universal_newlines instead of decode
This way stdin/stdout of the process are opened in text mode and we don't need
manually decode.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
7832cc72
|
2019-10-30T12:03:48
|
|
test: xkeyboard-config: flake8 fixes
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
cd5a24aa
|
2019-10-30T11:22:49
|
|
test: xkeyboard-config: handle keyboard interrupts correctly
In python multiprocessing, each process needs to handle (and ignore) the
KeyboardInterrupt to avoid exception logging. This is a separate patch for
easier reviewing, the first hunks merely re-indent all of the
xkbcommontool/xkbcomp functions into a try/except KeyboardInterrupt block.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
9fc0cb87
|
2019-10-30T10:53:58
|
|
test: xkeyboard-config: print to stderr on failure, stdout otherwise
This is a change in behavior and requires any automated callers to adjust
accordingly. Still, much easier to get the errors that way rather than it
being mixed into a thousands-of-lines output file.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
f5383847
|
2019-10-29T16:06:10
|
|
test: xkeyboard-config: add a multiprocessing.Pool() to speed up the test
Collect all options into a dictionary, then process that as async actions
through a process pool. This of course requires collecting the various print
statements to avoid mangled output.
This dropped the time to completion from around 14 min to 8 min on my local
machine (unscientific single run only for the original timing).
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
1e131906
|
2019-10-30T11:15:49
|
|
test: xkeyboard-config: use argparse for the path and the tool selection
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
255200fa
|
2019-10-28T11:40:56
|
|
test: add test for the various default include paths
All tests create a temporary directory, set up the environment for that
directory and then check the include paths for the presence of that directory,
ideally in the right position of the list.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
45496c33
|
2019-10-19T00:37:48
|
|
test: fix printf("%s", NULL) in error path
../test/common.c: In function ‘test_get_path’:
../test/common.c:171:9: warning: ‘%s’ directive argument is null [-Wformat-overflow=]
171 | fprintf(stderr, "Failed to allocate path (%d chars) for %s\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
172 | (int) path_len, path);
| ~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
076047b2
|
2019-10-16T10:32:19
|
|
keymap-dump: use consistent capitalization for "Group<N>"
It's used capitalized everywhere except a couple places.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
a6ed0304
|
2019-10-16T10:27:12
|
|
keymap-dump: fix invalid names used for levels above 8
xkbcomp only accepts the "Level" prefix for a level name for levels 1 to
8, but the keymap dumping code added it always, e.g. "Level15".
The plain integer, e.g. "8", "15" is always accepted, so just use that.
Fixes https://github.com/xkbcommon/libxkbcommon/issues/113
Signed-off-by: Ran Benita <ran@unusedvar.com>
Reported-by: progandy
|
|
ab4b4b7f
|
2019-07-25T10:12:53
|
|
travis: improve configuration and add macOS
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
7407d311
|
2019-07-25T13:49:41
|
|
test/symbols-leak-test: fix sed regex on macOS
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
97f41fe4
|
2019-07-25T13:24:00
|
|
test/symbols-leak-test: make it work with macOS diff
The <() stuff fails with an error:
diff: extra operand `/dev/fd/61'
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
6728ebca
|
2019-07-25T11:59:07
|
|
test/rmlvo-to-keymap: drop basename usage
It wants some libgen.h include which is POSIX only, let's just remove
it as it's hardly important.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
32d178b5
|
2019-07-19T02:56:41
|
|
test/rmlvo-to-keymap.c: fix compilation on Darwin (#101)
program_invocation_short_name isn't portable.
|
|
909cc04d
|
2019-07-02T13:48:32
|
|
interactive-wayland: Port to stable xdg-shell (#100)
xdg_shell v6 was pretty close to the finalised stable version of
xdg-shell. We can now just use the stable version, which is supported
everywhere (Enlightenment, KWin, Mutter, Weston, wlroots).
This requires bumping the wayland-protocols dependency.
Signed-off-by: Daniel Stone <daniels@collabora.com>
|
|
878bc085
|
2018-08-20T16:46:19
|
|
test: allow for absolute paths to be resolved
This makes it possible to check a keymap sitting elsewhere than in the test
directory.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
16c84cdd
|
2018-08-20T15:50:35
|
|
test: drop the rmlvo ability from print-compiled-keymap
This is now handled by the rmlvo-to-keymap tool
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
d1cb8ad4
|
2018-08-14T11:16:30
|
|
test: add a tool to test-compile all LVO combinations from xkeyboard-config
This test contains of two parts:
- a simple program to convert RMLVO commandline arguments into a keymap (and
print that keymap if requested).
- a python script that runs through rules/evdev.xml, and tries to compile a
keymap for sort-of every layout/variant/option combination. Sort-of, because
we can have multiple options and it really only does one per layout(variant)
combination.
Same thing can be done using xkbcomp, but right now it doesn't take that as
argument, it's hard-coded.
This takes quite a while, installing python-tqdm is recommended to see fancy
progress bars instead of just miles of dumps.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
5cee660f
|
2018-06-23T22:00:19
|
|
keysym-utf: reject out-of-range Unicode codepoints in xkb_keysym_to_utf{8,32}
It used to be UTF-8 was defined for inputs > 0x10FFFF, but nowadays
that's the maximum and a codepoint is encoded up to 4 bytes, not 6.
Fixes: https://github.com/xkbcommon/libxkbcommon/issues/58
Fixes: https://github.com/xkbcommon/libxkbcommon/issues/59
Reported-by: @andrecbarros
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
afea3dd0
|
2018-01-27T20:42:44
|
|
test/interactive-wayland: replace tabs with spaces
Match the style of all other files.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
767fa86d
|
2017-12-21T14:18:07
|
|
Convert http:// -> https:// where possible
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
29998c25
|
2017-12-12T15:57:58
|
|
test/x11: properly clean up also when skipping test
To make valgrind happy.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
6456835f
|
2017-12-03T13:04:35
|
|
test/data: sync with xkeyboard-config 2.22
Some tweaks to the de(neo) keyseq tests were required. It seems to have
improved.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
14686cd1
|
2017-08-16T20:24:27
|
|
test/interactive-wayland: avoid unused function warning due to configuration
test/interactive-wayland.c:95:1: warning: ‘set_cloexec_or_close’ defined but not used [-Wunused-function]
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
fbd86e44
|
2017-08-03T13:38:14
|
|
test/symbols-leak-test.bash: make it easier to read
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
4309735d
|
2017-07-31T11:24:28
|
|
build: use top_srcdir consistently
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
d44ba481
|
2017-07-29T22:43:08
|
|
build: remove unneeded preprocessor include flags
Better to avoid these unexpected include paths.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
daebdb5e
|
2017-07-31T10:18:54
|
|
x11/keymap,test/interactive-evdev: fix a couple of clang-analyzer warnings
From my analysis these values cannot be null, but the analyzer cannot
see this. So assert it.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
2d964065
|
2017-07-29T23:31:19
|
|
test/x11comp: fix compiler warnings
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
4f17fc60
|
2017-05-27T09:15:26
|
|
Fixed a minor bug in error detection in Wayland test
|
|
c9832d43
|
2017-04-28T09:33:25
|
|
test/interactive-x11: handle NULL from xcb_wait_for_event
Can happen in cases like:
- There was an error between the error check and the call.
- The internal poll() fails.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
5d821aed
|
2017-04-11T20:19:15
|
|
test/x11comp: be a bit more careful with kill()
We did it correctly but better be safe and appease clang.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
9d941458
|
2017-04-11T20:39:10
|
|
test/interactive-wayland: mark a local function static
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
03f4a03e
|
2017-04-11T20:06:01
|
|
test/interactive-wayland: handle unrecognized SHM format
The enum seems large, and we don't handle all of the values in it.
Previously if we got an unrecognized SHM format we would use an
uninitialized `stride`.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
0f43cfa2
|
2017-04-11T20:01:19
|
|
test/interactive-wayland: fix uninitialized `ret` in error path
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
90bd9fdb
|
2017-04-11T15:09:50
|
|
interactive-wayland: Port to xdg-shell v6
Mutter only implements v6 now, and Weston also implements that. Port
interactive-wayland to this so people can keep on using it.
Signed-off-by: Daniel Stone <daniels@collabora.com>
|