mirror of
https://github.com/NohamR/Reclass.git
synced 2026-05-10 19:59:21 +00:00
ci: disable UI tests in CI, delete test_com_security
CI now passes -DBUILD_UI_TESTS=OFF so only headless tests (core, format, compose, provider, command_row, generator, import_xml, import_source, export_xml, disasm) build and run. Removed xvfb-run and exclude-regex hacks from both Windows and Linux CI — the CMake option handles it cleanly. Deleted test_com_security (windbg-only, not needed in CI).
This commit is contained in:
10
.github/workflows/build.yml
vendored
10
.github/workflows/build.yml
vendored
@@ -31,13 +31,13 @@ jobs:
|
|||||||
arch: x64
|
arch: x64
|
||||||
|
|
||||||
- name: Configure
|
- name: Configure
|
||||||
run: cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
|
run: cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_UI_TESTS=OFF
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build
|
run: cmake --build build
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: ctest --test-dir build --output-on-failure --exclude-regex "test_editor|test_controller|test_windbg_provider|test_com_security"
|
run: ctest --test-dir build --output-on-failure
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
@@ -118,15 +118,13 @@ jobs:
|
|||||||
sudo apt-get install -y ninja-build libgl1-mesa-dev libfuse2 libxcb-cursor0
|
sudo apt-get install -y ninja-build libgl1-mesa-dev libfuse2 libxcb-cursor0
|
||||||
|
|
||||||
- name: Configure
|
- name: Configure
|
||||||
run: cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
|
run: cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_UI_TESTS=OFF
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build
|
run: cmake --build build
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: xvfb-run ctest --test-dir build --output-on-failure --exclude-regex "test_editor|test_controller"
|
run: ctest --test-dir build --output-on-failure
|
||||||
env:
|
|
||||||
QT_QPA_PLATFORM: offscreen
|
|
||||||
|
|
||||||
- name: Create AppImage
|
- name: Create AppImage
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -345,14 +345,6 @@ if(BUILD_TESTING)
|
|||||||
add_test(NAME test_windbg_provider COMMAND test_windbg_provider)
|
add_test(NAME test_windbg_provider COMMAND test_windbg_provider)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Standalone test: proves whether CoInitializeSecurity is needed for DebugConnect
|
|
||||||
# Requires a running WinDbg debug server on port 5055
|
|
||||||
if(WIN32)
|
|
||||||
add_executable(test_com_security tests/test_com_security.cpp)
|
|
||||||
target_link_libraries(test_com_security PRIVATE dbgeng ole32 version)
|
|
||||||
add_test(NAME test_com_security COMMAND test_com_security)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Deploy Qt runtime DLLs for tests (run windeployqt on a representative test exe
|
# Deploy Qt runtime DLLs for tests (run windeployqt on a representative test exe
|
||||||
# that links the broadest set of Qt modules; all test exes share the same output dir)
|
# that links the broadest set of Qt modules; all test exes share the same output dir)
|
||||||
if(TARGET ${QT}::windeployqt)
|
if(TARGET ${QT}::windeployqt)
|
||||||
|
|||||||
@@ -1,185 +0,0 @@
|
|||||||
/**
|
|
||||||
* test_com_security.cpp — DebugConnect transport diagnostic
|
|
||||||
*
|
|
||||||
* Tests EVERY transport to find what works from MinGW:
|
|
||||||
* 1. TCP to WinDbg .server (port 5055)
|
|
||||||
* 2. Named pipe to WinDbg .server
|
|
||||||
* 3. TCP with various COM security configs
|
|
||||||
* 4. DebugCreate local (baseline)
|
|
||||||
*
|
|
||||||
* SETUP: In WinDbg, run BOTH of these:
|
|
||||||
* .server tcp:port=5055
|
|
||||||
* .server npipe:pipe=reclass
|
|
||||||
*
|
|
||||||
* Then run this test.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <cstdio>
|
|
||||||
#include <cstdlib>
|
|
||||||
#include <cstring>
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#include <windows.h>
|
|
||||||
#include <objbase.h>
|
|
||||||
#include <initguid.h>
|
|
||||||
#include <dbgeng.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
static void try_connect(const char* label, const char* connStr)
|
|
||||||
{
|
|
||||||
printf(" %-40s → ", label);
|
|
||||||
fflush(stdout);
|
|
||||||
|
|
||||||
IDebugClient* client = nullptr;
|
|
||||||
HRESULT hr = DebugConnect(connStr, IID_IDebugClient, (void**)&client);
|
|
||||||
|
|
||||||
if (SUCCEEDED(hr) && client) {
|
|
||||||
printf("SUCCESS (hr=0x%08lX)\n", (unsigned long)hr);
|
|
||||||
|
|
||||||
// Try to get data spaces and read something
|
|
||||||
IDebugDataSpaces* ds = nullptr;
|
|
||||||
IDebugSymbols* sym = nullptr;
|
|
||||||
IDebugControl* ctrl = nullptr;
|
|
||||||
client->QueryInterface(IID_IDebugDataSpaces, (void**)&ds);
|
|
||||||
client->QueryInterface(IID_IDebugSymbols, (void**)&sym);
|
|
||||||
client->QueryInterface(IID_IDebugControl, (void**)&ctrl);
|
|
||||||
|
|
||||||
if (ctrl) {
|
|
||||||
HRESULT hrWait = ctrl->WaitForEvent(0, 5000);
|
|
||||||
printf(" WaitForEvent: hr=0x%08lX\n", (unsigned long)hrWait);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sym) {
|
|
||||||
ULONG numMods = 0, numUnloaded = 0;
|
|
||||||
sym->GetNumberModules(&numMods, &numUnloaded);
|
|
||||||
printf(" Modules: %lu loaded\n", numMods);
|
|
||||||
|
|
||||||
if (numMods > 0 && ds) {
|
|
||||||
ULONG64 base = 0;
|
|
||||||
sym->GetModuleByIndex(0, &base);
|
|
||||||
unsigned char buf[2] = {};
|
|
||||||
ULONG got = 0;
|
|
||||||
ds->ReadVirtual(base, buf, 2, &got);
|
|
||||||
printf(" Read at 0x%llX: got=%lu bytes=[%02X %02X]\n",
|
|
||||||
(unsigned long long)base, got, buf[0], buf[1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sym) sym->Release();
|
|
||||||
if (ds) ds->Release();
|
|
||||||
if (ctrl) ctrl->Release();
|
|
||||||
client->Release();
|
|
||||||
} else {
|
|
||||||
char buf[256] = {};
|
|
||||||
FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
|
|
||||||
nullptr, (DWORD)hr, 0, buf, sizeof(buf), nullptr);
|
|
||||||
for (char* p = buf + strlen(buf) - 1; p >= buf && (*p == '\r' || *p == '\n'); --p)
|
|
||||||
*p = '\0';
|
|
||||||
printf("FAIL hr=0x%08lX (%s)\n", (unsigned long)hr, buf);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
#ifdef _WIN32
|
|
||||||
char hostname[256] = {};
|
|
||||||
DWORD hsize = sizeof(hostname);
|
|
||||||
GetComputerNameA(hostname, &hsize);
|
|
||||||
|
|
||||||
printf("=== DebugConnect Transport Diagnostic ===\n");
|
|
||||||
printf("Machine: %s\n\n", hostname);
|
|
||||||
|
|
||||||
// ── Baseline: DebugCreate (local) ──
|
|
||||||
printf("[1] DebugCreate (local, no network)\n");
|
|
||||||
{
|
|
||||||
IDebugClient* client = nullptr;
|
|
||||||
HRESULT hr = DebugCreate(IID_IDebugClient, (void**)&client);
|
|
||||||
printf(" DebugCreate: %s (hr=0x%08lX)\n\n",
|
|
||||||
SUCCEEDED(hr) ? "OK" : "FAIL", (unsigned long)hr);
|
|
||||||
if (client) client->Release();
|
|
||||||
}
|
|
||||||
|
|
||||||
// ── TCP variants ──
|
|
||||||
printf("[2] TCP connections (need: .server tcp:port=5055)\n");
|
|
||||||
try_connect("tcp:Port=5055,Server=localhost",
|
|
||||||
"tcp:Port=5055,Server=localhost");
|
|
||||||
try_connect("tcp:Port=5055,Server=127.0.0.1",
|
|
||||||
"tcp:Port=5055,Server=127.0.0.1");
|
|
||||||
{
|
|
||||||
char conn[512];
|
|
||||||
snprintf(conn, sizeof(conn), "tcp:Port=5055,Server=%s", hostname);
|
|
||||||
try_connect(conn, conn);
|
|
||||||
}
|
|
||||||
printf("\n");
|
|
||||||
|
|
||||||
// ── Named pipe variants ──
|
|
||||||
printf("[3] Named pipe connections (need: .server npipe:pipe=reclass)\n");
|
|
||||||
try_connect("npipe:Pipe=reclass,Server=localhost",
|
|
||||||
"npipe:Pipe=reclass,Server=localhost");
|
|
||||||
{
|
|
||||||
char conn[512];
|
|
||||||
snprintf(conn, sizeof(conn), "npipe:Pipe=reclass,Server=%s", hostname);
|
|
||||||
try_connect(conn, conn);
|
|
||||||
}
|
|
||||||
try_connect("npipe:Pipe=reclass",
|
|
||||||
"npipe:Pipe=reclass");
|
|
||||||
printf("\n");
|
|
||||||
|
|
||||||
// ── TCP with COM security ──
|
|
||||||
printf("[4] TCP with explicit COM init (MTA + IMPERSONATE)\n");
|
|
||||||
{
|
|
||||||
// This runs in-process so CoInitialize affects subsequent calls
|
|
||||||
CoInitializeEx(nullptr, COINIT_MULTITHREADED);
|
|
||||||
CoInitializeSecurity(
|
|
||||||
nullptr, -1, nullptr, nullptr,
|
|
||||||
RPC_C_AUTHN_LEVEL_DEFAULT,
|
|
||||||
RPC_C_IMP_LEVEL_IMPERSONATE,
|
|
||||||
nullptr, EOAC_NONE, nullptr);
|
|
||||||
try_connect("tcp:Port=5055,Server=localhost (MTA+SEC)",
|
|
||||||
"tcp:Port=5055,Server=localhost");
|
|
||||||
try_connect("npipe:Pipe=reclass (MTA+SEC)",
|
|
||||||
"npipe:Pipe=reclass,Server=localhost");
|
|
||||||
CoUninitialize();
|
|
||||||
}
|
|
||||||
printf("\n");
|
|
||||||
|
|
||||||
// ── Check if dbgeng.dll is the system one ──
|
|
||||||
printf("[5] DbgEng DLL info\n");
|
|
||||||
{
|
|
||||||
HMODULE hmod = GetModuleHandleA("dbgeng.dll");
|
|
||||||
if (hmod) {
|
|
||||||
char path[MAX_PATH] = {};
|
|
||||||
GetModuleFileNameA(hmod, path, MAX_PATH);
|
|
||||||
printf(" dbgeng.dll loaded from: %s\n", path);
|
|
||||||
|
|
||||||
// Get version
|
|
||||||
DWORD verSize = GetFileVersionInfoSizeA(path, nullptr);
|
|
||||||
if (verSize > 0) {
|
|
||||||
auto* verData = (char*)malloc(verSize);
|
|
||||||
if (GetFileVersionInfoA(path, 0, verSize, verData)) {
|
|
||||||
VS_FIXEDFILEINFO* fileInfo = nullptr;
|
|
||||||
UINT len = 0;
|
|
||||||
if (VerQueryValueA(verData, "\\", (void**)&fileInfo, &len)) {
|
|
||||||
printf(" Version: %d.%d.%d.%d\n",
|
|
||||||
HIWORD(fileInfo->dwFileVersionMS),
|
|
||||||
LOWORD(fileInfo->dwFileVersionMS),
|
|
||||||
HIWORD(fileInfo->dwFileVersionLS),
|
|
||||||
LOWORD(fileInfo->dwFileVersionLS));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
free(verData);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
printf(" dbgeng.dll not loaded yet\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
printf("\n=== Done ===\n");
|
|
||||||
return 0;
|
|
||||||
#else
|
|
||||||
printf("Windows only.\n");
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user