Skip to content

Commit d58aeea

Browse files
committed
fix(test): Improve UDP tests, super flash and sparse handling
Refactor tests and driver behavior: - FastbootCLI: remove the unused --force flag and related variable/help text. - Tests (UdpTransportTests): make UDP timeouts/attempts configurable via env vars, enable SO_REUSEADDR when binding test sockets, harden CompleteHandshake with proper packet handling and timeout handling, wrap flaky tests with a RunWithRetries helper, and restructure server/transport lifecycles to avoid port conflicts and race conditions. - InternalFlashSparseFile: materialize Resparse() results with ToList() to avoid deferred enumeration issues. - FastbootDriver: add using for sparse core, suppress verbose step notifications for sparse/flashing steps, add an overloaded FlashImage supporting super-partition optimization and a progress callback; implement AOSP-style super optimization path (uses SuperFlashHelper) while allowing disabling of the optimization. - Project: bump FirmwareKit.Sparse package from 1.0.1 to 1.0.2. These changes improve test stability, add a super-partition optimization pathway, and fix potential runtime enumeration and race issues.
1 parent c3120ac commit d58aeea

File tree

5 files changed

+243
-179
lines changed

5 files changed

+243
-179
lines changed

FastbootCLI/Program.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ class Program
1010
private static string? slot = null;
1111
private static bool wipeUserdata = false;
1212
private static bool skipReboot = false;
13-
private static bool force = false;
1413
private static string? fsOptions = null;
1514
private static long? sparseLimit = null;
1615

@@ -36,7 +35,6 @@ static void Main(string[] args)
3635
}
3736
else if (arg == "-w") wipeUserdata = true;
3837
else if (arg == "--skip-reboot") skipReboot = true;
39-
else if (arg == "--force") force = true;
4038
else if (arg == "--fs-options" && i < args.Length) fsOptions = args[i++];
4139
else if (arg == "-S" && i < args.Length)
4240
{
@@ -441,7 +439,6 @@ static void ShowHelp()
441439
Console.Error.WriteLine(" it will set the inactive slot to active.");
442440
Console.Error.WriteLine(" -S <size>[k|m|g] Break into sparse files no larger than SIZE.");
443441
Console.Error.WriteLine(" --skip-reboot Don't reboot device after flashing all.");
444-
Console.Error.WriteLine(" --force Force execute command (e.g. skip snapshot check).");
445442
Console.Error.WriteLine(" --fs-options <opt> File system options for format (e.g. casefold).");
446443
Console.Error.WriteLine(" --fallback Use platform native USB backend instead of libusb (on Linux libusb is default).");
447444

0 commit comments

Comments
 (0)