Files
kata-containers/cli/kata-check_data_ppc64le_test.go
Nitesh Konkar c93aa53187 runtime: Check SMT=on/off only for P8 or lesser
Set testCPUInfoTemplate to systems /proc/cpuinfo
and check if SMT is on/off only on P8 and lower
systems as Power 9 systems support virtualization
irrespective of SMT being on/off.

Fixes: #1114

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2019-01-22 22:04:52 +05:30

25 lines
425 B
Go

// Copyright (c) 2018 IBM
//
// SPDX-License-Identifier: Apache-2.0
//
package main
import (
"github.com/sirupsen/logrus"
"io/ioutil"
)
var testCPUInfoTemplate = setTestCPUInfoTemplate()
func setTestCPUInfoTemplate() string {
var kataLog *logrus.Entry
content, err := ioutil.ReadFile("/proc/cpuinfo")
if err != nil {
kataLog.WithError(err).Error("failed to read file /proc/cpuinfo")
}
return string(content)
}