Commit 968026b
committed
common/rc: introduce _systemctl_start() and _systemctl_stop()
When test cases depend on specific systemctl services, the test cases
need to start the service. After the test case completion, it is better
to stop the service. However, if the service was already started and
active before executing the test cases, stopping the service will affect
test systems.
To avoid such affect on the test systems, introduce _systemctl_start()
and _systemctl_stop(). When _systemctl_start() check if the specified
service has already started or not. If the service has not yet started,
start it and record it in the global array SYSTEMCTL_UNITS_TO_STOP.
When _systemctl_stop() is called, stop the service recorded in the
array SYSTEMCTL_UNITS_TO_STOP.
Signed-off-by: Shin'ichiro Kawasaki <[email protected]>1 parent 7c26543 commit 968026b
1 file changed
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
511 | 512 | | |
512 | 513 | | |
513 | 514 | | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
514 | 535 | | |
515 | 536 | | |
516 | 537 | | |
| |||
0 commit comments