SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
Check return value of calls to File::CreateTempDir() from CoreTiming,
FileSystem, and MMIO test classes to verify the test user directory
exists, and fail the tests otherwise.
This fixes CreateFullPath to not create directories when it is known
that they already exist, instead of calling CreateDirectory anyway
and checking if the error is AlreadyExists. (That doesn't work
now that we have an accurate implementation of CreateDirectory
that performs permission checks before checking for existence.)
I'm not sure what I was thinking when I wrote that function.
Also adds some tests for CreateFullPath.
Files cannot be given a different file name, only moved across
directories.
Add a test for that behaviour and fix the existing
RenameWithExistingTargetFile test.
As suggested here: https://dolp.in/pr7059#pullrequestreview-125401778
More descriptive than having a std::tuple of FS::Mode, and lets us
give names to known triplets of modes (like in ES). Functions that
only forward mode arguments are slightly less verbose now too.
The existing backend did not handle cases where the target exists
correctly.
This is a bug that has been around forever but was only recently
exposed when ES started to use our FS code.
Also adds some unit tests to make sure this won't get broken again.
This adds unit tests for the Wii filesystem now that the filesystem
interface is neatly separated from the IPC code.
Basic FS functionality is tested, in addition to problematic usages and
edge cases that Dolphin used to handle incorrectly (which of course
broke emulated software).
These tests should make it quite a bit harder to introduce regressions.
Issues that are covered by the tests in particular:
* Metadata: issue 10234 (though tests are commented out for now because
Dolphin doesn't support NAND images yet so it can't track metadata);
* EOF seeks/reads: https://github.com/dolphin-emu/dolphin/pull/4942
* Read/write operations from multiple handles: see issue 2917, 5232 and
8702 and https://github.com/dolphin-emu/dolphin/pull/2649
This adds unit tests for IOS/ESFormats, and in particular, for the
TMDReader. It is tested using invalid TMDs (to check IsValid()) and
two valid, properly signed TMDs.
Things which are now tested:
* Title type helper functions.
* TMDReader: Validity check.
* TMDReader: General information returned by the Get*() methods.
* TMDReader: Raw TMD and generated TMD view, compared against IOS.
* TMDReader: Game ID generation code (which is Dolphin specific).
* TMDReader: Content information: getting by ID/index, order, metadata.