Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.14
3.0.15
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ namespace VirtualClient.Actions

[TestFixture]
[Category("Functional")]
[Ignore("MLPerf profiles archived - no longer in active profiles directory")]
public class MLPerfProfileTests
{
private DependencyFixture mockFixture;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void SuperBenchmarkWorkloadProfileParametersAreInlinedCorrectly(string pr
}

[Test]
[TestCase("SETUP-NVIDIA-A100.json")]
[TestCase("SETUP-GPU-NVIDIA-A100.json")]
public async Task SuperBenchmarkWorkloadProfileExecutesTheExpectedDependenciesAndReboot(string profile)
{
List<string> expectedCommands = new List<string>
Expand Down Expand Up @@ -74,7 +74,7 @@ public async Task SuperBenchmarkWorkloadProfileExecutesTheExpectedDependenciesAn
}

[Test]
[TestCase("SETUP-NVIDIA-A100.json")]
[TestCase("SETUP-GPU-NVIDIA-A100.json")]
public async Task SuperBenchmarkWorkloadProfileExecutesTheExpectedDependenciesAndWorkloadsAfterReboot(string profile)
{
IEnumerable<string> expectedCommands = this.GetProfileExpectedCommands(PlatformID.Unix);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ public async Task HammerDBClientExecutorRunsTheExpectedWorkloadCommand(PlatformI

if (platform == PlatformID.Unix)
{
expectedCommands.Add($"sudo python3 {this.fixture.PlatformSpecifics.Combine(this.mockPackagePath, "configure-workload-generator.py")} --workload tpcc --sqlServer postgresql --port 5432 --virtualUsers 1 --password [A-Za-z0-9+/=]+ --dbName hammerdbtest --hostIPAddress [0-9.]+ --warehouseCount 1 --duration 1");
expectedCommands.Add($"sudo python3 {this.fixture.PlatformSpecifics.Combine(this.mockPackagePath, "configure-workload-generator.py")} --workload tpcc --sqlServer postgresql --port 5432 --virtualUsers 1 --password [A-Fa-f0-9]+ --dbName hammerdbtest --hostIPAddress [0-9.]+ --warehouseCount 1 --duration 1");
expectedCommands.Add($"python3 {this.fixture.PlatformSpecifics.Combine(this.mockPackagePath, "run-workload.py")} --runTransactionsTCLFilePath runTransactions.tcl");
}
else
{
expectedCommands.Add($"python3 {this.fixture.PlatformSpecifics.Combine(this.mockPackagePath, "configure-workload-generator.py")} --workload tpcc --sqlServer postgresql --port 5432 --virtualUsers 1 --password [A-Za-z0-9+/=]+ --dbName hammerdbtest --hostIPAddress [0-9.]+ --warehouseCount 1 --duration 1");
expectedCommands.Add($"python3 {this.fixture.PlatformSpecifics.Combine(this.mockPackagePath, "configure-workload-generator.py")} --workload tpcc --sqlServer postgresql --port 5432 --virtualUsers 1 --password [A-Fa-f0-9]+ --dbName hammerdbtest --hostIPAddress [0-9.]+ --warehouseCount 1 --duration 1");
expectedCommands.Add($"python3 {this.fixture.PlatformSpecifics.Combine(this.mockPackagePath, "run-workload.py")} --runTransactionsTCLFilePath runTransactions.tcl");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,25 @@ public void HammerDBPExecutorThrowsOnUnsupportedDistroAsync()
}
}

[Test]
public void SuperUserPasswordUsesHexEncodingWithNoSpecialCharacters()
{
using (TestHammerDBExecutor executor = new TestHammerDBExecutor(this.fixture.Dependencies, this.fixture.Parameters))
{
string password = executor.SuperUserPassword;

// Password must be hex-encoded (alphanumeric only) to avoid breaking
// HammerDB TCL diset command argument parsing.
Assert.IsTrue(System.Text.RegularExpressions.Regex.IsMatch(password, "^[A-Fa-f0-9]+$"),
$"SuperUserPassword must be hex-encoded (alphanumeric only). Got: {password}");

// Must not contain Base64 special characters that break TCL parsing
Assert.IsFalse(password.Contains("+"), "Password must not contain '+' (breaks TCL parsing)");
Assert.IsFalse(password.Contains("="), "Password must not contain '=' (breaks TCL parsing)");
Assert.IsFalse(password.Contains("/"), "Password must not contain '/' (breaks TCL parsing)");
}
}

private class TestHammerDBExecutor : HammerDBExecutor
{
public TestHammerDBExecutor(IServiceCollection dependencies, IDictionary<string, IConvertible> parameters = null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public string SuperUserPassword
get
{
byte[] hashBytes = SHA256.HashData(Encoding.UTF8.GetBytes("default"));
return Convert.ToBase64String(hashBytes);
return Convert.ToHexString(hashBytes);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public string SuperUserPassword
get
{
byte[] hashBytes = SHA256.HashData(Encoding.UTF8.GetBytes("default"));
return Convert.ToBase64String(hashBytes);
return Convert.ToHexString(hashBytes);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public string SuperUserPassword
get
{
byte[] hashBytes = SHA256.HashData(Encoding.UTF8.GetBytes("default"));
return Convert.ToBase64String(hashBytes);
return Convert.ToHexString(hashBytes);
}
}

Expand Down
Loading