aboutsummaryrefslogtreecommitdiff
path: root/libs/steam_appinfo_ffi/vendor/steam-vdf-parser/tests
diff options
context:
space:
mode:
authorSulfurNitride <SulfurNitride@users.noreply.github.com>2026-04-17 00:53:20 -0500
committerSulfurNitride <SulfurNitride@users.noreply.github.com>2026-04-17 00:53:20 -0500
commit06c396fd27f55929b40161e587cb9b596b549f3f (patch)
tree40fdb465d2fe6e7d4487bbd237582868c8332459 /libs/steam_appinfo_ffi/vendor/steam-vdf-parser/tests
parente583d6dda3cde9e8bccee313fe1ad69634593708 (diff)
Symlink saves, rank prefixes by Steam app type, ntsync safeguards
- Replace copy-in/copy-out save deployment with a direct symlink from the prefix's __MO_Saves to the profile's saves/. Writes land in the profile immediately; afterRun reverts the symlink + prefix INI so a vanilla launch outside MO2 uses the default Saves dir. - Parse Steam's binary appinfo.vdf (v41) via a new Rust FFI crate backed by steam-vdf-parser. Rank detected games by common.type so real Games beat Tools/Editors when multiple prefixes share a My Games folder name (fixes Creation Kit shadowing Skyrim SE). Top-ranked candidate overwrites stale symlinks from earlier runs. - Switch bundled Steam Linux Runtime downloader from sniper (steamrt3) to steamrt4 so Proton 11+ works out of the box. steamrt4 omits xrandr so we inject it from the Debian x11-xserver-utils .deb into a dedicated dir and prepend it to PATH via `env PATH=...` inside the pressure-vessel container (PATH env doesn't propagate). - Auto-kill stale wineboot/wineserver/pv-adverb processes still bound to the prefix before starting a new wineboot -u; match by /proc/<pid>/environ WINEPREFIX / STEAM_COMPAT_DATA_PATH since Wine cmdlines are Windows-style. Same sweep runs in destroyPrefix so a delete actually frees file handles. - Blacklist Proton 11 (Steam-bundled) — its current Wine tree deadlocks during wineboot -u on modern kernels via ntsync / futex_wait_multiple races. Use "waitforexitandrun" (not "run") for prefix init so use_sessions=1 Protons don't fork into a persistent session manager. - Drop WINEDEBUG=-all during prefix init so wineboot progress is visible. Suppress focus-stealing by setting WA_ShowWithoutActivating on the PrefixSetupDialog and SLR download progress dialogs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'libs/steam_appinfo_ffi/vendor/steam-vdf-parser/tests')
-rw-r--r--libs/steam_appinfo_ffi/vendor/steam-vdf-parser/tests/fixtures/appinfo_10.vdfbin0 -> 44443 bytes
-rwxr-xr-xlibs/steam_appinfo_ffi/vendor/steam-vdf-parser/tests/fixtures/localconfig.vdf100
-rwxr-xr-xlibs/steam_appinfo_ffi/vendor/steam-vdf-parser/tests/fixtures/packageinfo.vdfbin0 -> 31612 bytes
-rw-r--r--libs/steam_appinfo_ffi/vendor/steam-vdf-parser/tests/real_files.rs123
4 files changed, 223 insertions, 0 deletions
diff --git a/libs/steam_appinfo_ffi/vendor/steam-vdf-parser/tests/fixtures/appinfo_10.vdf b/libs/steam_appinfo_ffi/vendor/steam-vdf-parser/tests/fixtures/appinfo_10.vdf
new file mode 100644
index 0000000..39e5137
--- /dev/null
+++ b/libs/steam_appinfo_ffi/vendor/steam-vdf-parser/tests/fixtures/appinfo_10.vdf
Binary files differ
diff --git a/libs/steam_appinfo_ffi/vendor/steam-vdf-parser/tests/fixtures/localconfig.vdf b/libs/steam_appinfo_ffi/vendor/steam-vdf-parser/tests/fixtures/localconfig.vdf
new file mode 100755
index 0000000..c239422
--- /dev/null
+++ b/libs/steam_appinfo_ffi/vendor/steam-vdf-parser/tests/fixtures/localconfig.vdf
@@ -0,0 +1,100 @@
+"UserLocalConfigStore"
+{
+ "Broadcast"
+ {
+ "Permissions" "1"
+ }
+ "streaming_v2"
+ {
+ "EnableStreaming" "1"
+ "UnlockedH264Feature" "1"
+ }
+ "friends"
+ {
+ "10000001"
+ {
+ "NameHistory"
+ {
+ "0" "TestUser01"
+ }
+ "avatar" "0000000000000000000000000000000000000000"
+ "name" "TestUser01"
+ }
+ "PersonaName" "TestPersona"
+ "communitypreferences" "1899cc9284062000280330013800"
+ "contentdescriptorpreferences" ""
+ "10000002"
+ {
+ "name" "TestUser02"
+ "NameHistory"
+ {
+ "0" "TestUser02"
+ }
+ "avatar" "0000000000000000000000000000000000000000"
+ }
+ "10000003"
+ {
+ "name" "TestUser03"
+ "NameHistory"
+ {
+ "0" "TestUser03"
+ }
+ "avatar" "0000000000000000000000000000000000000000"
+ }
+ "Notifications_ShowIngame" "1"
+ "Notifications_ShowOnline" "0"
+ "Notifications_ShowMessage" "1"
+ "Notifications_EventsAndAnnouncements" "1"
+ "Sounds_PlayIngame" "0"
+ "Sounds_PlayOnline" "0"
+ "Sounds_PlayMessage" "1"
+ "Sounds_EventsAndAnnouncements" "0"
+ "ChatFlashMode" "0"
+ "DoNotDisturb" "0"
+ "SignIntoFriends" "0"
+ }
+ "ParentalSettings"
+ {
+ "settings" "09edc39b07000000004800"
+ "Signature" "30c818bcbcaad3ccf7597dadeabc2d03f71ce5070700dac271143a8cc9eda2fb32f7317a12e6e0adcda622d4dfc9d46f650ead2a5091c66565f975478091bcf7a510a858d988e41e5dec2fe0fd6365ea7a3be2bb43ed364896e521193cd41379260cc4be9b35f4df382990a545c3c55af8f70aa1f7740ecc8c2880dd9e9b572482690fae060f798237bfb1132bec9307ed8bedeb52de09b1b1e41e19f476811919bb301a99d1fa8c05a91c7a160ee3454064225978ef12fac54640ecb7266b14cb3b02fa79208b644a301b2d0aca1c654d1ce3335d42733e38dbab190dd16eb87ab8bc8d75c0b0efc128e8b18032639c5813895f7110864936e67f7da954562b"
+ }
+ "SharedAuth"
+ {
+ "id" "1234567890"
+ "AuthData" "0000000000000000000000000000000000000000000000000000000000000000"
+ }
+ "Offline"
+ {
+ "Ticket" "00000000000000000"
+ "Signature" "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
+ "EncryptedTicket" "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
+ "EncryptedSignature" "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
+ }
+ "apptickets"
+ {
+ "7" "3200000004000000edc39b0701001001070000005fff515d2301a8c0000000005aa45b69da537769010000000000000000003e6f542da8eb4b0d9dd8290178b4c5a2d0a20b857f60ad18ea51a922c53c7017a0cc352564ebe078da357fdca604dd748439254abd1b23766c424405fa545ae90c8bb944506316543c49a39133b4eff547b53d420969fb2ff892f5299d3f45d0c7e5723adb3ec12daf2532032619db48cb9ee82ba7420747634f3c5a160bb222"
+ "1282730" "3200000004000000edc39b0701001001aa9213005fff515d2301a8c0000000001a56cb679a05e767010011d20600000000002b6b8cb43dc4fce94043ca172a0cc9cd1f4a6acb14a1c268970cfdf4164b5d156e1cae9631cb326ee4cc30d033f358f6ff680ff85437008059f4bda89fb035cf178febe8b3668a4f668fda95df4c85a5b9598493c0361bdd054df4912b5f88d159d05a117e7534252676a12949aabe9bee25e5c2078861d97a71e8939458d0c8"
+ }
+ "AppInfoChangeNumber" "12345678"
+ "Software"
+ {
+ "Valve"
+ {
+ "Steam"
+ {
+ "BetaPassword" ""
+ "running"
+ {
+ "id" "0"
+ "Steam2Tickets"
+ {
+ }
+ }
+ }
+ }
+ }
+ "WebStorage"
+ {
+ "keyboard_trackpding_typing_trigger_as_click" "true"
+ }
+}
diff --git a/libs/steam_appinfo_ffi/vendor/steam-vdf-parser/tests/fixtures/packageinfo.vdf b/libs/steam_appinfo_ffi/vendor/steam-vdf-parser/tests/fixtures/packageinfo.vdf
new file mode 100755
index 0000000..67de2ae
--- /dev/null
+++ b/libs/steam_appinfo_ffi/vendor/steam-vdf-parser/tests/fixtures/packageinfo.vdf
Binary files differ
diff --git a/libs/steam_appinfo_ffi/vendor/steam-vdf-parser/tests/real_files.rs b/libs/steam_appinfo_ffi/vendor/steam-vdf-parser/tests/real_files.rs
new file mode 100644
index 0000000..6f36aec
--- /dev/null
+++ b/libs/steam_appinfo_ffi/vendor/steam-vdf-parser/tests/real_files.rs
@@ -0,0 +1,123 @@
+//! Integration tests against real Steam VDF files.
+
+use std::path::Path;
+use steam_vdf_parser::{parse_binary, parse_packageinfo, parse_text};
+
+#[test]
+fn test_parse_real_localconfig_text() {
+ let path = Path::new("tests/fixtures/localconfig.vdf");
+ let content = std::fs::read_to_string(path).expect("Failed to read localconfig.vdf");
+
+ let result = parse_text(&content);
+ assert!(
+ result.is_ok(),
+ "Failed to parse localconfig.vdf: {:?}",
+ result.err()
+ );
+
+ let vdf = result.unwrap();
+ assert_eq!(vdf.key(), "UserLocalConfigStore");
+
+ let obj = vdf.as_obj().expect("Root should be an object");
+ assert!(!obj.is_empty(), "Root should have keys");
+
+ // Check for known keys that should exist in localconfig
+ assert!(obj.get("Broadcast").is_some());
+ assert!(obj.get("friends").is_some());
+}
+
+#[test]
+fn test_parse_real_appinfo_binary() {
+ let path = Path::new("tests/fixtures/appinfo_10.vdf");
+ let data = std::fs::read(path).expect("Failed to read appinfo_10.vdf");
+
+ let result = parse_binary(&data);
+ assert!(
+ result.is_ok(),
+ "Failed to parse appinfo_10.vdf: {:?}",
+ result.err()
+ );
+
+ let vdf = result.unwrap();
+ assert!(vdf.key().starts_with("appinfo_universe_"));
+
+ let obj = vdf.as_obj().expect("Root should be an object");
+ assert!(!obj.is_empty(), "Root should have keys");
+
+ // appinfo_10.vdf should contain 10 apps (numeric keys as strings)
+ assert_eq!(
+ obj.len(),
+ 10,
+ "Should have exactly 10 apps in appinfo_10.vdf"
+ );
+}
+
+#[test]
+fn test_parse_real_packageinfo_binary() {
+ let path = Path::new("tests/fixtures/packageinfo.vdf");
+ let data = std::fs::read(path).expect("Failed to read packageinfo.vdf");
+
+ let result = parse_packageinfo(&data);
+ assert!(
+ result.is_ok(),
+ "Failed to parse packageinfo.vdf: {:?}",
+ result.err()
+ );
+
+ let vdf = result.unwrap();
+ assert!(vdf.key().starts_with("packageinfo_universe_"));
+
+ let obj = vdf.as_obj().expect("Root should be an object");
+ assert!(!obj.is_empty(), "Root should have keys");
+
+ // packageinfo.vdf should contain packages
+ // Check that we have at least some entries
+ assert!(
+ obj.len() > 50,
+ "Should have many packages in packageinfo.vdf"
+ );
+
+ // Check that package 0 exists and has the expected metadata
+ let pkg0 = obj.get("0").expect("Package 0 should exist");
+ let pkg0_obj = pkg0.as_obj().expect("Package 0 should be an object");
+
+ // Check metadata fields
+ assert_eq!(
+ pkg0_obj.get("packageid").and_then(|v| v.as_i32()),
+ Some(0),
+ "Package 0 should have packageid = 0"
+ );
+
+ assert!(
+ pkg0_obj
+ .get("change_number")
+ .and_then(|v| v.as_u64())
+ .is_some(),
+ "Package 0 should have change_number"
+ );
+
+ assert!(
+ pkg0_obj.get("sha1").and_then(|v| v.as_str()).is_some(),
+ "Package 0 should have sha1 hash"
+ );
+
+ // Check that the VDF data is present under the "0" key
+ let vdf_data = pkg0_obj
+ .get("0")
+ .expect("Package 0 should have VDF data under '0' key");
+ let vdf_obj = vdf_data.as_obj().expect("VDF data should be an object");
+
+ // Check for known fields in the VDF data
+ assert!(
+ vdf_obj.get("packageid").is_some(),
+ "VDF data should contain packageid"
+ );
+ assert!(
+ vdf_obj.get("billingtype").is_some(),
+ "VDF data should contain billingtype"
+ );
+ assert!(
+ vdf_obj.get("licensetype").is_some(),
+ "VDF data should contain licensetype"
+ );
+}