health: Add ProbeCPUInfo.keylocker test

Check that we can probe cros_healthd for CPU info and Keylocker

Sample command to execute:
tast run  <DUT_IP> health.ProbeCPUInfo.keylocker

BUG=b:198745197

TEST=Ran on DUT locally

Cq-Depend: chromium:3095345
Change-Id: I2babd984a858c64b22cc6d0f77bb39443fe4ce80
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/tast-tests/+/3141302
Tested-by: Pathan Jilani <pathan.jilani@intel.com>
Commit-Queue: Meng-Huan Yu <menghuan@chromium.org>
Reviewed-by: Ambalavanan M M <ambalavanan.m.m@intel.com>
Reviewed-by: Judy Wu <jinrongwu@google.com>
diff --git a/src/chromiumos/tast/local/bundles/cros/health/probe_cpu_info.go b/src/chromiumos/tast/local/bundles/cros/health/probe_cpu_info.go
index 3cea33d..0d3f5d5 100644
--- a/src/chromiumos/tast/local/bundles/cros/health/probe_cpu_info.go
+++ b/src/chromiumos/tast/local/bundles/cros/health/probe_cpu_info.go
@@ -11,6 +11,7 @@
 	"chromiumos/tast/local/croshealthd"
 	"chromiumos/tast/local/jsontypes"
 	"chromiumos/tast/testing"
+	"chromiumos/tast/testing/hwdep"
 )
 
 type temperatureChannelInfo struct {
@@ -37,12 +38,15 @@
 	ModelName   *string          `json:"model_name"`
 	LogicalCPUs []logicalCPUInfo `json:"logical_cpus"`
 }
-
+type keylockerinfo struct {
+	KeylockerConfigured bool `json:"keylocker_configured"`
+}
 type cpuInfo struct {
 	Architecture        string                   `json:"architecture"`
 	NumTotalThreads     jsontypes.Uint32         `json:"num_total_threads"`
 	TemperatureChannels []temperatureChannelInfo `json:"temperature_channels"`
 	PhysicalCPUs        []physicalCPUInfo        `json:"physical_cpus"`
+	KeylockerInfo       keylockerinfo            `json:"keylocker_info"`
 }
 
 func init() {
@@ -52,11 +56,20 @@
 		Contacts: []string{
 			"khegde@google.com",
 			"pmoy@google.com",
-			"cros-tdm@google.com",
+			"cros-tdm-tpe-eng@google.com",
+			"pathan.jilani@intel.com",
+			"intel-chrome-system-automation-team@intel.com",
 		},
 		Attr:         []string{"group:mainline"},
 		SoftwareDeps: []string{"chrome", "diagnostics"},
 		Fixture:      "crosHealthdRunning",
+		Params: []testing.Param{{
+			Val: false,
+		}, {
+			Name:              "keylocker",
+			Val:               true,
+			ExtraHardwareDeps: hwdep.D(hwdep.Model("brya")),
+		}},
 	})
 }
 
@@ -114,6 +127,13 @@
 	return nil
 }
 
+func validateKeyLocker(keylocker keylockerinfo) error {
+	if !keylocker.KeylockerConfigured {
+		return errors.Errorf("failed to configure keylocker: %t", keylocker)
+	}
+	return nil
+}
+
 func ProbeCPUInfo(ctx context.Context, s *testing.State) {
 	params := croshealthd.TelemParams{Category: croshealthd.TelemCategoryCPU}
 	var info cpuInfo
@@ -124,4 +144,10 @@
 	if err := validateCPUData(info); err != nil {
 		s.Fatalf("Failed to validate cpu data, err [%v]", err)
 	}
+
+	if s.Param().(bool) {
+		if err := validateKeyLocker(info.KeylockerInfo); err != nil {
+			s.Fatal("Failed to validate KeyLocker: ", err)
+		}
+	}
 }