Project

General

Profile

Actions

action #136226

open

os-autoinst IPMI backend incorrectly handle empty return value

Added by dawei_pang about 1 year ago. Updated about 1 year ago.

Status:
New
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
2023-09-21
Due date:
% Done:

0%

Estimated time:

Description

Refer to the link: https://github.com/os-autoinst/os-autoinst/blob/a91a4f773eeb9a14902dadec4f5c5eca85644710/backend/ipmi.pm#L35

if $ret is empty or undefined, $ret == 0 is true, the code in line 36 and 37 will run incorrectly.

35        if ($ret == 0) {
36            $self->dell_sleep;
37            last;
38        } else {
39            sleep 4;
40        }

Example code:

# The code can print hello
if ($ret == 0) {
    print "hello\n";
}
Actions

Also available in: Atom PDF