Commit Graph

83 Commits

Author SHA1 Message Date
matt335672
c3d697de16 Add list_add_strdup() etc 2023-03-06 15:58:13 +00:00
matt335672
a317c3de5d Fix regression in list module 2023-03-06 15:47:49 +00:00
Nexarian
89e178e7c9 Add function to split string into list.
- With working unit tests.
2023-03-03 18:33:33 -05:00
Nexarian
ba0e75f8be Utility functions for xrdp regions and tests
- xrdp_region_get_bounds
- xrdp_region_not_empty
- Incorporate example usage of cmocka
- Cmocka doesn't work with C++
2023-02-13 23:46:39 -05:00
matt335672
994418cd90 Add simple list test cases 2023-02-13 10:37:46 +00:00
Nexarian
259be09334 Add free to egfx unit tests 2023-02-11 00:39:03 -05:00
matt335672
7a190bf709 Add tests for libipm file descriptor calls 2023-01-30 14:31:16 +00:00
matt335672
02a3821f4d Remove libipm_msg_in_start()
The semantics of this call allowed it to be called more than once when
parsing a message to restart a parse. This is not likely to be
useful in practice, and it also makes reading file descriptors
more complicated. Consequently this function has been removed and
replaced with with libipm_msg_in_get_msgno()
2023-01-30 14:31:16 +00:00
matt335672
2c6419475c Add basic tests for os_calls routines 2023-01-30 14:31:16 +00:00
matt335672
57bd1be5b1 Disable stdout buffering for LOG() when running tests
Normally the test runners run in 'forking mode'. When a lot of
messages are logged to stdout, the child process can still be writing
data when the parent writes 'ok' or 'not ok'. This can confuse
the tap-driver.sh process.
2023-01-30 14:31:16 +00:00
Nexarian
db5ea2f214 Initial EGFX tests.
- Rearranging imports.
- Remove unnecessary check to g_is_wait_obj_set.
- Use g_get_term everywhere.
- Misc updates.
2023-01-23 23:05:24 -05:00
matt335672
c3bb7dc294 guid_new() returns GUIDs compatible with RFC4122 2022-11-10 14:19:19 +00:00
Koichiro IWAO
32da5a7ed6 Replace guid_to_str() with ms_guid_to_str() 2022-11-02 00:20:31 +09:00
Koichiro IWAO
791f055e18 common: add function to convert from Microsoft's GUID to string 2022-11-01 19:24:02 +09:00
a1346054
048e3c9e99
add missing final newline 2022-09-03 02:01:49 +00:00
a1346054
7fe18cc1c0
fix typos 2022-09-03 02:01:48 +00:00
Christopher Pitstick
07dbd0e032 Update handling of scale factor
Looking at 2.2.2.2.1 DISPLAYCONTROL_MONITOR_LAYOUT (https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpedisp/ea2de591-9203-42cd-9908-be7a55237d1c),
the way we were handling it was slightly off. device_scale_factor and
desktop_scale_factor are interdependent. If either one is out of spec,
both are set to default. That wasn't how it was previously being handled.
2022-07-02 18:28:59 -04:00
matt335672
a16695efd4 Added unit tests for bitmask<->charstr calls 2022-05-18 12:35:07 +01:00
matt335672
7868622a79
Merge pull request #2216 from matt335672/fix_stream_overflow_in_sextuple_monitor_happy_path_test
Fixes a stream overflow in the test suite
2022-04-20 12:43:37 +01:00
matt335672
7cfd3bb3d8 Fix off-by-one errors in monitor resize logic 2022-04-08 12:11:14 +01:00
matt335672
94a6f6282f Fixes a stream overflow in the test suite
This is triggered when xrdp is built with --enable-devel-logging

Also, the logging sub-system is initialised for libxrdp tests
2022-04-06 11:59:23 +01:00
Christopher Pitstick
bd9147d18f Updating to refactor xrdp_client_info
- Eliminate duplicaiton for display_size_description
- monitorCount needs to be uint32_t
- width/height -> session_width/session_height
- Update CLIENT_INFO_CURRENT_VERSION
- Also some misc unit test updates.
- Minor log updates.
2022-03-27 16:38:32 -04:00
Christopher Pitstick
4a0db63be7 Unify monitor processing logic.
There are two places where monitor descriptions are passed through the
RDP protocol:

- TS_UD_CS_MONITOR ([MS-RDPBCGR] 2.2.1.3.6 Client Monitor Data)
- DISPLAYCONTROL_PDU_TYPE_MONITOR_LAYOUT ([MS-RDPEDISP] 2.2.2.2)

The processing logic for both of them is similar enough that they should be unified.

Also update to define the constants for the maximum and minimum desktop width/height for monitors and total area.

Also a large number of clarifications for the constants and protocol
requirements.

Note that this is also the first step to making resizing work with the extension GFX channel as well as an important
foundational step to enable HiDPI compatibility.

Also some misc logging updates.
2022-03-26 23:45:16 -04:00
matt335672
3d91ba6a22 libipm: Make sockets always non-blocking 2022-03-15 10:45:00 +00:00
matt335672
6cf053c9df Add libipm test suite 2022-03-15 10:23:27 +00:00
matt335672
4699dced14 Implement base64 without openssl 2022-01-28 12:23:40 +00:00
matt335672
e79bc7f181 Fix banner comments in test results 2022-01-28 12:23:40 +00:00
matt335672
fde161bac3 Add unit tests for SSL calls 2022-01-20 16:44:49 +00:00
matt335672
3146e624c4 Fix problems with check 0.15.2 (F36) 2022-01-19 11:08:13 +00:00
Kentaro Hayashi
69ea406440 Add g_str_to_bitmask utility function
It should be used for comma separated configuration to bitmask.

e.g. RestrictOutboundClipboard = text, file, image
2022-01-14 10:17:02 +09:00
matt335672
15b8578b54
Merge pull request #1932 from Nexarian/add_monitor_processing_unit_tests
Add monitor processing unit tests for existing xrdp_sec function
2022-01-05 10:23:55 +00:00
Koichiro IWAO
ab558213b7 tests: skip some tests until g_file_get_size() fixed 2021-12-10 17:08:44 +09:00
Koichiro IWAO
a57d8491c0 tests: add g_file_get_size() tests for files larger than 2GiB 2021-12-10 16:24:34 +09:00
Koichiro IWAO
c24b6d95dd tests: create sparse file for g_file_get_size() tests 2021-12-10 16:24:34 +09:00
Koichiro IWAO
8e4ea49532 tests: add test on g_file_get_size() 2021-12-10 16:24:34 +09:00
Christopher Pitstick
0a2562d33d Initial cut at a unit test for xrdp_sec_process_mcs_data_monitors 2021-12-08 01:41:07 -05:00
Koichiro IWAO
ed2fb6d739 tests(g_strtrim): string copy is not necessary here 2021-10-12 17:39:27 +09:00
Koichiro IWAO
fa3beb3694
tests: add tests on g_strtrim() 2021-10-12 15:57:08 +09:00
matt335672
62ca216d4d Improve security level logging at ISO layer 2021-09-03 12:30:02 +01:00
matt335672
e35507125c Address review comments and re-test 2021-09-01 10:09:30 +01:00
matt335672
971f911290 Add xrdp_bitmap_load() jpg and png test cases 2021-09-01 10:09:30 +01:00
matt335672
19d49e3622 Added code to cope with dithering in xrdp_bitmap_load tests 2021-09-01 10:09:30 +01:00
matt335672
8f8b4c5868 Add imlib2 support to xrdp_bitmap_load.c 2021-09-01 10:09:30 +01:00
matt335672
47737c7d13 Add unit tests for xrdp_bitmap_load() 2021-09-01 10:09:30 +01:00
matt335672
52a52daddd Split development option into separate things 2021-05-28 10:57:12 +01:00
Alexandre Quesnel
52707ac686 Fixing formatting with astyle 2021-05-08 16:58:11 +00:00
Koichiro IWAO
55f57e5a5d
make distcheck should only succeed if check is installed 2021-04-24 23:38:40 +09:00
Koichiro IWAO
25cb991e86
add missing CFLAGS to test_common 2021-04-24 23:38:17 +09:00
matt335672
cb0ab0d0d3
Merge branch 'devel' into add_logging_session_c 2021-04-14 10:26:48 +01:00
Alexandre Quesnel
09174ccd4d Adding g_strnjoin() with units tests 2021-04-14 04:41:53 +00:00