Project

General

Profile

action #176319

Updated by tinita about 1 month ago

https://progress.opensuse.org/issues/176319 

 testapi power function call "off" needs to be handled gracefully by os-autoinst size:S 

 ## Observation 
 See #175060. TinyCore which we use for testing within os-autoinst does not support handling the ACPI poweroff command so we tried `power('off')` which sends the QMP command "quit". That however tears down the complete qemu stack and then os-autoinst looking like this: 

 ``` 
 [2025-01-29T12:25:20.107196+01:00] [debug] [pid:32470] <<< testapi::power(action="off") 
 [2025-01-29T12:25:20.108408+01:00] [debug] [pid:32485] EVENT {"data":{"guest":false,"reason":"host-qmp-quit"},"event":"SHUTDOWN","timestamp":{"microseconds":108236,"seconds":1738149920}} 
 [2025-01-29T12:25:20.142808+01:00] [debug] [pid:32470] tests/shutdown.pm:10 called testapi::assert_shutdown 
 [2025-01-29T12:25:20.143067+01:00] [debug] [pid:32470] <<< testapi::check_shutdown(timeout=90) 
 [2025-01-29T12:25:20.146514+01:00] [info] [pid:32485] ::: backend::baseclass::die_handler: Backend process died, backend errors are reported below in the following lines: 
   Can't syswrite(IO::Socket::UNIX=GLOB(0x55b38b999888), <BUFFER>): Broken pipe at backend/qemu.pm line 1130 
 … 
 [2025-01-29T12:25:22.249780+01:00] [warn] [pid:32460] !!! OpenQA::Isotovideo::Runner::_read_response: THERE IS NOTHING TO READ 18 4 3 
 ``` 

 ## Acceptance criteria 
 * **AC1:** All supported `testapi::power` methods should be usable within os-autoinst test modules without causing isotovideo to crash when just checking for shutdown 

 ## Suggestions 
 * Try to fix the usage of `power('off')`. If not possible as the 'off' actually sends "quit" over QMP and then tears down complete qemu consider to remove the implementation 

 ## Out of scope 
 Any other testapi method.

Back