mirror of
https://github.com/intel/intel-device-plugins-for-kubernetes.git
synced 2025-06-03 03:59:37 +00:00
fpga_plugin: don't exit if OPAE driver is not loaded
This commit is contained in:
parent
7caf3adcab
commit
5231a9cc1f
@ -241,7 +241,8 @@ func (dp *devicePlugin) scanFPGAs() (dpapi.DeviceTree, error) {
|
||||
|
||||
fpgaFiles, err := ioutil.ReadDir(dp.sysfsDir)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "Can't read sysfs folder")
|
||||
fmt.Printf("WARNING: Can't read folder %s. Kernel driver not loaded?\n", dp.sysfsDir)
|
||||
return dp.getDevTree([]device{}), nil
|
||||
}
|
||||
|
||||
for _, fpgaFile := range fpgaFiles {
|
||||
|
@ -223,9 +223,8 @@ func TestScanFPGAs(t *testing.T) {
|
||||
mode string
|
||||
}{
|
||||
{
|
||||
name: "No sysfs folder given",
|
||||
mode: afMode,
|
||||
errorContains: "Can't read sysfs folder",
|
||||
name: "No sysfs folder exists",
|
||||
mode: afMode,
|
||||
},
|
||||
{
|
||||
name: "FPGA device without FME and ports",
|
||||
|
Loading…
Reference in New Issue
Block a user