open-power / petitboot

GNU General Public License v2.0
214 stars 56 forks source link

Adding petitboot hooks to aid test frameworks #36

Open sathnaga opened 6 years ago

sathnaga commented 6 years ago

It would be helpful if we can add petitboot cmdline utilities to aid test frameworks

E:g:- discover_nw discover_disk

it can just return true or false based on the discovery status, it can be even be sub options to pb-discover also

pridhiviraj commented 6 years ago

There are some tests which depends on discover of host n/w interfaces and disk device discovery. @sammj This is some thing can be implementable? We need it on op-test in some code instances.

sammj commented 6 years ago

Sounds like a helpful thing to add, perhaps via pb-event or pb-config. What kind of information are we looking for? We can do things such as "is a disk with this UUID present", or "have we done PXE on eth0" and so on, but we can't do something like "is all disk discovery finished" because Petitboot doesn't know how many disks it should expect - discovery never really "finishes".

ghost commented 6 years ago

Sam Mendoza-Jonas notifications@github.com writes:

Sounds like a helpful thing to add, perhaps via pb-event or pb-config. What kind of information are we looking for? We can do things such as "is a disk with this UUID present", or "have we done PXE on eth0" and so on, but we can't do something like "is all disk discovery finished" because Petitboot doesn't know how many disks it should expect - discovery never really "finishes".

For some reason I have a memory of there being some SCSI subsystem something something to be able to wait until all controllers had finished scanning for things.... is that a thing? Was I dreaming?

-- Stewart Smith OPAL Architect, IBM.

sathnaga commented 6 years ago

@sammj yes that's right, requirement can be

1.  given mac-id(incase of network) is discovered
2. given disk/by-id(incase of disk) is discovered... etc

And always we can bail out with a reasonable timeout in test framework , as we can just poll for defined time and fail...