Changeset 98992 in vbox for trunk/src/VBox/ValidationKit/tests
- Timestamp:
- Mar 15, 2023 3:53:43 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/additions/tdAddBasic1.py
r98872 r98992 83 83 84 84 # Wether to reboot guest after Guest Additions installation. 85 self.fReb botAfterInstall = True;85 self.fRebootAfterInstall = True; 86 86 87 87 self.addSubTestDriver(SubTstDrvAddGuestCtrl(self)); … … 119 119 120 120 elif asArgs[iArg] == '--no-reboot-after-install': 121 self.fReb botAfterInstall = False;121 self.fRebootAfterInstall = False; 122 122 reporter.log('Guest will not be rebooted after Guest Additions installation, ' + 123 123 'kernel modules and user services should be reloaded automatically without reboot'); … … 491 491 # The actual install. 492 492 # Also tell the installer to produce the appropriate log files. 493 # 493 494 # Deploy signing keys into guest if VM has Secure Boot enabled. 495 if oTestVm.fSecureBoot: 496 reporter.log('Deploying Secure Boot signing keys to the guest'); 497 fRc = self.txsMkDirPath(oSession, oTxsSession, '/var/lib/shim-signed/mok'); 498 if fRc: 499 fRc = self.txsUploadFile(oSession, oTxsSession, 500 self.getFullResourceName(oTestVm.sUefiMokPathPrefix) + '.der', 501 '/var/lib/shim-signed/mok/MOK.der') 502 if fRc: 503 fRc = self.txsUploadFile(oSession, oTxsSession, 504 self.getFullResourceName(oTestVm.sUefiMokPathPrefix) + '.priv', 505 '/var/lib/shim-signed/mok/MOK.priv') 506 if fRc and oTxsSession.isSuccess(): 507 pass 508 else: 509 reporter.testFailure('Unable to deploy Secure Boot signing keys to the guest'); 510 494 511 # Make sure to add "--nox11" to the makeself wrapper in order to not getting any blocking 495 512 # xterm window spawned. … … 498 515 (self.getGuestSystemShell(oTestVm), 499 516 '${CDROM}/%s/VBoxLinuxAdditions.run' % self.sGstPathGaPrefix, '--nox11')); 500 if not fRc: 501 iRc = self.getAdditionsInstallerResult(oTxsSession); 502 # Check for rc == 0 just for completeness. 503 if iRc in (0, 2): # Can happen if the GA installer has detected older VBox kernel modules running and needs a reboot. 504 reporter.log('Guest has old(er) VBox kernel modules still running; requires a reboot'); 505 fRc = True; 517 if fRc and oTxsSession.isSuccess(): 518 reporter.log('Installation completed'); 519 else: 520 # Guest Additions installer which requires guest reboot after installation might return 521 # special exit code which can indicate that all was installed, but kernel modules were 522 # not rebooted. Handle this case here. 523 if self.fRebootAfterInstall: 524 iRc = self.getAdditionsInstallerResult(oTxsSession); 525 # Check for rc == 0 just for completeness. 526 if iRc in (0, 2): # Can happen if the GA installer has detected older VBox kernel modules running and needs a reboot. 527 reporter.log('Guest has old(er) VBox kernel modules still running; requires a reboot'); 528 fRc = True; 506 529 507 530 if not fRc: … … 519 542 # Do the final reboot to get the just installed Guest Additions up and running. 520 543 if fRc: 521 if self.fReb botAfterInstall:544 if self.fRebootAfterInstall: 522 545 reporter.testStart('Rebooting guest w/ updated Guest Additions active'); 523 546 (fRc, oTxsSession) = self.txsRebootAndReconnectViaTcp(oSession, oTxsSession, cMsTimeout = 15 * 60 * 1000); … … 530 553 (self.getGuestSystemShell(oTestVm), 531 554 '/sbin/rcvboxadd', 'status-kernel')); 532 iRc = self.getAdditionsInstallerResult(oTxsSession); 533 if fRc and iRc == 0: 555 if fRc and oTxsSession.isSuccess(): 534 556 fRc = self.txsRunTest(oTxsSession, 'Check Guest Additions user services status', 5 * 60 * 1000, 535 557 self.getGuestSystemShell(oTestVm), 536 558 (self.getGuestSystemShell(oTestVm), 537 559 '/sbin/rcvboxadd', 'status-user')); 538 iRc = self.getAdditionsInstallerResult(oTxsSession); 539 if fRc and iRc == 0: 560 if fRc and oTxsSession.isSuccess(): 540 561 pass; 541 562 else:
Note:
See TracChangeset
for help on using the changeset viewer.