aboutsummaryrefslogtreecommitdiff
path: root/src/tests/core
Commit message (Collapse)AuthorAgeFilesLines
* tests: compare the socket receive count without a sign mismatchkraibse15 hours1-1/+1
| | | | | | | Recv reports a signed int count and payload.size() is size_t, which trips -Werror=sign-compare and stops the tests target from building. Assisted-by: DeepSeek V4.1 Flash (diagnosis and patch)
* tests: cover room packet matching and size-checked ZSTD decompressioncirakg28 hours1-3/+34
| | | | Assisted-by: Claude Opus 5.5 (investigation and implementation)
* tests: queue decompressed packets in the room socket testscirakg29 hours1-2/+1
| | | | | | HandleProxyPacket now receives data that bsd has already decompressed. Assisted-by: Claude Opus 5.5 (investigation and implementation)
* tests: cover room ProxySocket receives and the LDN join handshakecirakg29 hours2-0/+433
| | | | | | | | | | | Add unit tests for the room LAN fixes in this branch. The socket tests check datagram truncation, TCP remainders and peeks, timeouts, wakeups on close and on a new packet, and stream behavior with the default protocol. The LDN tests check that a join waits for the host's reply, rejects bad or duplicate joins, ignores late replies and uses fresh identities. Assisted-by: Sol (LDN join tests) Assisted-by: Claude Opus 5.5 (room socket tests)
* Merge pull request #327 from daniel-cabral/fix/nup-writer-msvcJonas30 hours1-1/+1
|\ | | | | tests when building on Windows: compare FindBestUpdatePackage with a size_t
| * tests when building on Windows: compare FindBestUpdatePackage with a size_tDaniel Cabral34 hours1-1/+1
| | | | | | | | | | | | | | | | | | | | FindBestUpdatePackage returns std::optional<std::size_t>, and comparing it with an int makes MSVC emit C4388 inside <optional>, which WERROR turns into an error, so the tests target does not build on Windows. Part of #326. Assisted-by: Claude Opus 5.5 (diagnosis, fix and commit message draft)
* | Merge pull request #334 from snowstormxd/codex/upstream-mkw-testJonas30 hours3-1/+118
|\ \ | | | | | | MKW performance improvements
| * | loader: find mixed-case loose RomFS directories consistentlysnowstormxd33 hours1-1/+4
| | | | | | | | | | | | | | | | | | Linux missed base version metadata for Base/RomFS while Windows included it. Use a case-insensitive fallback for the loose directory and check the version and resulting archive checksum. Assisted by Codex.
| * | tests: restore batched page accounting and isolate timer fixturessnowstormxd33 hours1-0/+3
| | | | | | | | | | | | | | | | | | | | | Apply batch updates in the rasterizer mock, check cached writes do not untrack twice, and reset callback state between timer cases. Assisted-by: Codex (implementation, review and automated validation) (cherry picked from commit 225ad4e5d1da4ec9883b17aea7273b6c8f76fe17)
| * | core: skip empty bitmap ranges during cache and scheduler traversalsnowstormxd34 hours1-0/+111
| |/ | | | | | | | | | | Adapted bitmap scans from sylvieistaken/selevet-eglantine performance build 4. Keep the wide-priority fallback and fix the first live slot after empty bitmap words. Include randomized lifecycle and ordering checks. Assisted by Codex.
* | file_sys: reject NUP tables with wrapping bounds or cyclic directoriesSssnowyyy33 hours1-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 31b901b93b checked the TOC with unchecked arithmetic on counts and offsets read from the file. The record-table size (u64 count times record size) and u32 first_child + child_count can wrap, so the bounds checks pass and later reads go out of bounds; the same holds for the TOC range, name ranges, file extents and the meta range. A directory that lists its own ancestor as a child also made BuildDirTree recurse until the stack overflowed. Bound the counts by the TOC size before multiplying, compare ranges by subtraction, and widen the child range to u64. Walk the directory graph once after parsing with an explicit stack and reject cycles and nesting deeper than 128, so BuildDirTree can no longer recurse without bound. The file is rejected with ErrorNUPBadFormat. Assisted-by: Claude Sonnet 5.5 (implementation and commit message)
* | file_sys: decompress large NUP zstd members onceSssnowyyy33 hours1-0/+52
|/ | | | | | | | | | | | | | | | | | | 31b901b93b only cached a zstd member while it fit the 512 MiB cache. Anything larger was never cached, so every Read() allocated the full uncompressed size and decompressed the whole extent again, which makes a multi-GB RomFS read in small chunks unusably slow. Members between 256 and 512 MiB evicted each other on alternate reads, and Insert copied the vector so memory briefly doubled. Two threads decompressing the same member also left a duplicate LRU entry and a wrong byte count. The writer emits one zstd frame per member, so there are no frame boundaries to seek by. Members larger than half the cache are now streamed once into a temporary file under the cache directory and read from there, using bounded memory. The file is removed when the container is released. Smaller members stay in the LRU, which now moves the vector in and ignores a duplicate insert. Assisted-by: Claude Sonnet 5.5 (implementation and commit message)
* loader: read the display version from GameDataList.Product.NNN tookraibse37 hours1-0/+22
| | | | | | | | | Donkey Kong Bananza names its resource size table without a version, so no version was found for a loose dump. Its GameData/GameDataList.Product .320.* files carry it (3.2.0), so read them as well and use the newest tag from either source. Assisted-by: Claude Sonnet 5.5 (wrote the GameDataList version lookup and its test)
* file_sys: let the NUP packer override and probe the name, icon and versionkraibse37 hours1-0/+31
| | | | | | | | | | PackOptions::metadata overrides the title name, icon and display version found in the dump. A version override is written to the base and to the newest update, since the NUP loader reads the version from the newest update first. ProbeMetadata reads what a dump would be packed with, the version coming from the newest update that reports one, else the base. Assisted-by: Claude Sonnet 5.5 (wrote the metadata overrides, ProbeMetadata and their test)
* file_sys: add a deterministic NUP packer, Convert to NUP in Qt and eden-cli ↵Jonas45 hours1-0/+392
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --pack-nup (#271) * file_sys: add a NUP packer for loose dumps Packs a loose dump (exefs/romfs, base/, updates/<version>/ and dlc/<titleid>/<n>/) into a NUP v1 container with the aligned record layout. Every package is kept, files are deduplicated by SHA-256 and compressed with zstd unless that does not shrink them, and files over 256 MiB are stored raw. Output is byte-identical on every platform: compression is single-threaded with every frame parameter set explicitly, and zstd is always bundled so all builds use the same version. A low-storage mode deletes each source file once its extent is synced and journaled, and an interrupted run resumes from the journal. Assisted-by: Claude Opus 5.5 (wrote the packer, its EdenPack-free dump detection, the aligned record layout and the deterministic zstd setup; ran the Raiders and Donkey Kong Bananza packs and boot checks) * tests: cover the NUP packer Round-trips a dump through NupContainer, checks standalone updates, a bare exefs/romfs dump, low-storage resume and overwrite rejection, and pins the hash of a packed dump so changes to the output are deliberate. Assisted-by: Claude Opus 5.5 (wrote the tests, including the pinned output hash) * qt: add Convert to NUP to the game list Shown for loose dumps. Asks for confirmation with the estimated space, offers low-storage mode, runs in the background with progress and cancel, and resumes an interrupted low-storage conversion. Assisted-by: Claude Opus 5.5 (wrote the Convert to NUP action and its progress and resume handling) * cli: add --pack-nup <dump> [out.nup] Assisted-by: Claude Opus 5.5 (wrote the --pack-nup option)
* Revert "Import experimental NS2 support and accumulated GPU fixes"Takoroka6 days3-673/+0
| | | | | This reverts commit 535b676970. The Switch 2 support comes from the nx2 work instead, merged next.
* Import experimental NS2 support and accumulated GPU fixesyumekiru6 days3-0/+673
| | | | | | | | | | | Bring the NS2 patch and local follow-up fixes onto Eglantine master. Includes native graphics services, instruction translation, syncpoint cancellation acknowledgement, texture handling and diagnostics. Experimental checkpoint; not ready to merge. The original Eden build passed, but this rebased branch has not been built or tested. Assisted-by: OpenAI Codex (implementation, debugging, tests and PR preparation)
* core_timing: remove user data valueLiam2023-12-231-9/+5
|
* tests: update catch2 to 3.0.1Alexandre Bouvier2023-01-052-2/+2
|
* core: Partially persist emulation state across game boots.bunnei2022-10-181-3/+0
|
* Revert Coretiming PRs 8531 and 7454 (#8591)Maide2022-07-271-3/+1
|
* yuzu: Add ui files for multiplayer roomsFearlessTobi2022-07-251-2/+2
|
* Rework CoreTimingKelebek12022-07-101-1/+4
|
* Core: Fix tests.Fernando Sahmkow2022-06-281-0/+3
|
* Core: Reimplement Core Timing.Fernando Sahmkow2022-06-281-1/+0
|
* chore: add missing SPDX tagsAndrea Pappacoda2022-04-281-3/+2
| | | | Follow-up to 2b87305d319f0bd04da36fb96314934f37b12637
* general: Convert source file copyright comments over to SPDXMorph2022-04-231-3/+2
| | | | | This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
* common: fs: Rework the Common Filesystem interface to make use of ↵Morph2021-05-251-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | std::filesystem (#6270) * common: fs: fs_types: Create filesystem types Contains various filesystem types used by the Common::FS library * common: fs: fs_util: Add std::string to std::u8string conversion utility * common: fs: path_util: Add utlity functions for paths Contains various utility functions for getting or manipulating filesystem paths used by the Common::FS library * common: fs: file: Rewrite the IOFile implementation * common: fs: Reimplement Common::FS library using std::filesystem * common: fs: fs_paths: Add fs_paths to replace common_paths * common: fs: path_util: Add the rest of the path functions * common: Remove the previous Common::FS implementation * general: Remove unused fs includes * string_util: Remove unused function and include * nvidia_flags: Migrate to the new Common::FS library * settings: Migrate to the new Common::FS library * logging: backend: Migrate to the new Common::FS library * core: Migrate to the new Common::FS library * perf_stats: Migrate to the new Common::FS library * reporter: Migrate to the new Common::FS library * telemetry_session: Migrate to the new Common::FS library * key_manager: Migrate to the new Common::FS library * bis_factory: Migrate to the new Common::FS library * registered_cache: Migrate to the new Common::FS library * xts_archive: Migrate to the new Common::FS library * service: acc: Migrate to the new Common::FS library * applets/profile: Migrate to the new Common::FS library * applets/web: Migrate to the new Common::FS library * service: filesystem: Migrate to the new Common::FS library * loader: Migrate to the new Common::FS library * gl_shader_disk_cache: Migrate to the new Common::FS library * nsight_aftermath_tracker: Migrate to the new Common::FS library * vulkan_library: Migrate to the new Common::FS library * configure_debug: Migrate to the new Common::FS library * game_list_worker: Migrate to the new Common::FS library * config: Migrate to the new Common::FS library * configure_filesystem: Migrate to the new Common::FS library * configure_per_game_addons: Migrate to the new Common::FS library * configure_profile_manager: Migrate to the new Common::FS library * configure_ui: Migrate to the new Common::FS library * input_profiles: Migrate to the new Common::FS library * yuzu_cmd: config: Migrate to the new Common::FS library * yuzu_cmd: Migrate to the new Common::FS library * vfs_real: Migrate to the new Common::FS library * vfs: Migrate to the new Common::FS library * vfs_libzip: Migrate to the new Common::FS library * service: bcat: Migrate to the new Common::FS library * yuzu: main: Migrate to the new Common::FS library * vfs_real: Delete the contents of an existing file in CreateFile Current usages of CreateFile expect to delete the contents of an existing file, retain this behavior for now. * input_profiles: Don't iterate the input profile dir if it does not exist Silences an error produced in the log if the directory does not exist. * game_list_worker: Skip parsing file if the returned VfsFile is nullptr Prevents crashes in GetLoader when the virtual file is nullptr * common: fs: Validate paths for path length * service: filesystem: Open the mod load directory as read only
* [network] Error handling reformcomex2021-02-281-0/+28
| | | | | | | | | | | | | | | | | | | | | `network.cpp` has several error paths which either: - report "Unhandled host socket error=n" and return `SUCCESS`, or - switch on a few possible errors, log them, and translate them to Errno; the same switch statement is copied and pasted in multiple places in the code Convert these paths to use a helper function `GetAndLogLastError`, which is roughly the equivalent of one of the switch statements, but: - handling more cases (both ones that were already in `Errno`, and a few more I added), and - using OS functions to convert the error to a string when logging, so it'll describe the error even if it's not one of the ones in the switch statement. - To handle this, refactor the logic in `GetLastErrorMsg` to expose a new function `NativeErrorToString` which takes the error number explicitly as an argument. And improve the Windows version a bit. Also, add a test which exercises two random error paths.
* memory: Remove MemoryHookMerryMage2021-01-012-238/+0
|
* tests/core_timing: Remove pragma optimize(off)Lioncash2020-08-031-9/+5
| | | | | | | | | | | | | I made a review comment about this in the PR that this was introduced in (#3955, commit 4df46e052579925c27e178ef61eadfb5adbffac2), but it seems to have been missed. We shouldn't be using this pragma here because it's MSVC specific. This causes warnings on other compilers. The test it's surrounding is *extremely* dubious, but for the sake of silencing warnings on other compilers, we can mark "placebo" as volatile and be on with it.
* core_timing: Make use of uintptr_t to represent user_dataLioncash2020-07-271-2/+2
| | | | Makes the interface future-proofed for supporting other platforms in the event we ever support platforms with differing pointer sizes. This way, we have a type in place that is always guaranteed to be able to represent a pointer exactly.
* core_timing: Make TimedCallback take std::chrono::nanosecondsLioncash2020-07-151-6/+8
| | | | Enforces our desired time units directly with a concrete type.
* core_timing: Make use of std::chrono with ScheduleEventLioncash2020-07-151-5/+8
|
* Tests/CoreTiming: Correct host timing tests.Fernando Sahmkow2020-06-272-157/+14
|
* CoreTiming: Correct rebase bugs and other miscellaneous things.Fernando Sahmkow2020-06-271-4/+6
|
* General: Cleanup legacy code.Fernando Sahmkow2020-06-271-0/+1
|
* General: Recover Prometheus project from harddrive failure Fernando Sahmkow2020-06-271-99/+85
| | | | | | | This commit: Implements CPU Interrupts, Replaces Cycle Timing for Host Timing, Reworks the Kernel's Scheduler, Introduce Idle State and Suspended State, Recreates the bootmanager, Initializes Multicore system.
* Tests/HostTiming: Correct GCC Compile error.Fernando Sahmkow2020-06-181-15/+14
|
* Common/Tests: Address FeedbackFernando Sahmkow2020-06-181-14/+14
|
* Common: Implement WallClock Interface and implement a native clock for x64Fernando Sahmkow2020-06-181-26/+19
|
* Tests: Add base tests to host timingFernando Sahmkow2020-06-181-0/+150
|
* Merge pull request #3697 from lioncash/declarationsbunnei2020-04-231-8/+10
|\ | | | | CMakeLists: Enable -Wmissing-declarations on Linux builds
| * General: Resolve warnings related to missing declarationsLioncash2020-04-161-8/+10
| |
* | arm_test_common: Updates for new VMM.bunnei2020-04-171-6/+2
|/
* core/memory: Migrate over memory mapping functions to the new Memory classLioncash2019-11-261-7/+8
| | | | | | Migrates all of the direct mapping facilities over to the new memory class. In the process, this also obsoletes the need for memory_setup.h, so we can remove it entirely from the project.
* core_timing: Use better reference tracking for EventType. (#3159)bunnei2019-11-261-66/+18
| | | | | | | * core_timing: Use better reference tracking for EventType. - Moves ownership of the event to the caller, ensuring we don't fire events for destroyed objects. - Removes need for unique names - we won't be using this for save states anyways.
* Core_Timing: Fix tests.Fernando Sahmkow2019-10-121-2/+2
|
* Core Timing: General corrections and added tests.Fernando Sahmkow2019-10-091-3/+153
|
* Tests: Eliminate old Core Timing TestsFernando Sahmkow2019-10-091-193/+0
|