test: Improve waiting in software update tests
test: Improve waiting in software update tests

Instead of waiting for a fixed amount of time, we
can wait for a lock file to appear.
That way, the calling test process has control over
when (and if) the package installation should finish.

Closes #7328

larskarlitski/cockpit,petervo/cockpit,mvollmer/cockpit,mareklibra/cockpit,cockpit-project/cockpit,mareklibra/cockpit,michalskrivanek/cockpit,mvollmer/cockpit,SotolitoLabs/cockpit,cockpit-project/cockpit,andreasn/cockpit,andreasn/cockpit,mvollmer/cockpit,mareklibra/cockpit,larskarlitski/cockpit,mareklibra/cockpit,michalskrivanek/cockpit,harishanand95/cockpit,xhad/cockpit,martinpitt/cockpit,SotolitoLabs/cockpit,Scribery/cockpit,deryni/cockpit,stefwalter/cockpit,SotolitoLabs/cockpit,harishanand95/cockpit,stefwalter/cockpit,harishanand95/cockpit,andreasn/cockpit,petervo/cockpit,moraleslazaro/cockpit,stefwalter/cockpit,cockpit-project/cockpit,deryni/cockpit,martinpitt/cockpit,michalskrivanek/cockpit,moraleslazaro/cockpit,moraleslazaro/cockpit,larsu/cockpit,SotolitoLabs/cockpit,moraleslazaro/cockpit,Scribery/cockpit,xhad/cockpit,cockpit-project/cockpit,garrett/cockpit,SotolitoLabs/cockpit,SotolitoLabs/cockpit,petervo/cockpit,moraleslazaro/cockpit,larsu/cockpit,cockpituous/cockpit,andreasn/cockpit,stefwalter/cockpit,harishanand95/cockpit,garrett/cockpit,Scribery/cockpit,petervo/cockpit,stefwalter/cockpit,SotolitoLabs/cockpit,xhad/cockpit,deryni/cockpit,Scribery/cockpit,mareklibra/cockpit,andreasn/cockpit,mvollmer/cockpit,martinpitt/cockpit,deryni/cockpit,mareklibra/cockpit,deryni/cockpit,andreasn/cockpit,larskarlitski/cockpit,petervo/cockpit,larskarlitski/cockpit,larsu/cockpit,mvollmer/cockpit,stefwalter/cockpit,larskarlitski/cockpit,xhad/cockpit,cockpituous/cockpit,deryni/cockpit,deryni/cockpit,michalskrivanek/cockpit,moraleslazaro/cockpit,cockpituous/cockpit,larsu/cockpit,larskarlitski/cockpit,Scribery/cockpit,larskarlitski/cockpit,larsu/cockpit,larsu/cockpit,petervo/cockpit,mareklibra/cockpit,xhad/cockpit,cockpituous/cockpit,garrett/cockpit,garrett/cockpit,martinpitt/cockpit,cockpit-project/cockpit,Scribery/cockpit,harishanand95/cockpit,harishanand95/cockpit,garrett/cockpit,xhad/cockpit,stefwalter/cockpit,cockpituous/cockpit,petervo/cockpit,harishanand95/cockpit,moraleslazaro/cockpit,michalskrivanek/cockpit,xhad/cockpit,cockpituous/cockpit,michalskrivanek/cockpit,andreasn/cockpit,martinpitt/cockpit,Scribery/cockpit,michalskrivanek/cockpit