@@ -115,8 +115,11 @@ var _ = Describe("[ref_id: 40307][pao]Resizing Network Queues", func() {
115115
116116 It ("[test_id:40543] Add interfaceName and verify the interface netqueues are equal to reserved cpus count." , func () {
117117 nodesDevices := make (map [string ]map [string ]int )
118- err := checkDeviceSupport (workerRTNodes , nodesDevices )
118+ deviceSupport , err := checkDeviceSupport (workerRTNodes , nodesDevices )
119119 Expect (err ).ToNot (HaveOccurred ())
120+ if ! deviceSupport {
121+ Skip ("Skipping Test: There are no supported Network Devices" )
122+ }
120123 nodeName , device := getRandomNodeDevice (nodesDevices )
121124 profile , err = profiles .GetByNodeLabels (testutils .NodeSelectorLabels )
122125 Expect (err ).ToNot (HaveOccurred ())
@@ -159,8 +162,11 @@ var _ = Describe("[ref_id: 40307][pao]Resizing Network Queues", func() {
159162 It ("[test_id:40545] Verify reserved cpus count is applied to specific supported networking devices using wildcard matches" , func () {
160163 nodesDevices := make (map [string ]map [string ]int )
161164 var device , devicePattern string
162- err := checkDeviceSupport (workerRTNodes , nodesDevices )
165+ deviceSupport , err := checkDeviceSupport (workerRTNodes , nodesDevices )
163166 Expect (err ).ToNot (HaveOccurred ())
167+ if ! deviceSupport {
168+ Skip ("Skipping Test: There are no supported Network Devices" )
169+ }
164170 nodeName , device := getRandomNodeDevice (nodesDevices )
165171 devicePattern = device [:len (device )- 1 ] + "*"
166172 profile , err = profiles .GetByNodeLabels (testutils .NodeSelectorLabels )
@@ -202,8 +208,11 @@ var _ = Describe("[ref_id: 40307][pao]Resizing Network Queues", func() {
202208
203209 It ("[test_id:40668] Verify reserved cpu count is added to networking devices matched with vendor and Device id" , func () {
204210 nodesDevices := make (map [string ]map [string ]int )
205- err := checkDeviceSupport (workerRTNodes , nodesDevices )
211+ deviceSupport , err := checkDeviceSupport (workerRTNodes , nodesDevices )
206212 Expect (err ).ToNot (HaveOccurred ())
213+ if ! deviceSupport {
214+ Skip ("Skipping Test: There are no supported Network Devices" )
215+ }
207216 nodeName , device := getRandomNodeDevice (nodesDevices )
208217 node , err := nodes .GetByName (nodeName )
209218 Expect (err ).ToNot (HaveOccurred ())
@@ -254,8 +263,11 @@ var _ = Describe("[ref_id: 40307][pao]Resizing Network Queues", func() {
254263// Check a device that supports multiple queues and set with with reserved CPU size exists
255264func checkDeviceSetWithReservedCPU (workerRTNodes []corev1.Node , nodesDevices map [string ]map [string ]int , profile performancev2.PerformanceProfile ) error {
256265 return wait .PollImmediate (5 * time .Second , 90 * time .Second , func () (bool , error ) {
257- err := checkDeviceSupport (workerRTNodes , nodesDevices )
266+ deviceSupport , err := checkDeviceSupport (workerRTNodes , nodesDevices )
258267 Expect (err ).ToNot (HaveOccurred ())
268+ if ! deviceSupport {
269+ return false , nil
270+ }
259271 for _ , devices := range nodesDevices {
260272 for _ , size := range devices {
261273 if size == getReservedCPUSize (profile .Spec .CPU ) {
@@ -268,7 +280,7 @@ func checkDeviceSetWithReservedCPU(workerRTNodes []corev1.Node, nodesDevices map
268280}
269281
270282// Check if the device support multiple queues
271- func checkDeviceSupport (workernodes []corev1.Node , nodesDevices map [string ]map [string ]int ) error {
283+ func checkDeviceSupport (workernodes []corev1.Node , nodesDevices map [string ]map [string ]int ) ( bool , error ) {
272284 cmdGetPhysicalDevices := []string {"find" , "/sys/class/net" , "-type" , "l" , "-not" , "-lname" , "*virtual*" , "-printf" , "%f " }
273285 var channelCurrentCombined int
274286 var noSupportedDevices = true
@@ -309,9 +321,9 @@ func checkDeviceSupport(workernodes []corev1.Node, nodesDevices map[string]map[s
309321 }
310322 }
311323 if noSupportedDevices {
312- Skip ( "Skipping Test: There are no supported Network Devices" )
324+ return false , err
313325 }
314- return err
326+ return true , err
315327}
316328
317329func getReservedCPUSize (CPU * performancev2.CPU ) int {
0 commit comments