Skip to content

Commit

Permalink
debug: add sleep after reboot
Browse files Browse the repository at this point in the history
  • Loading branch information
HuijingHei committed Jan 15, 2025
1 parent 631a0b7 commit 6bc96f5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mantle/kola/tests/ostree/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ storage:
contents:
inline: |
[Manager]
DefaultTimeoutStopSec=5s
DefaultTimeoutStopSec=10s
- path: /usr/local/bin/nfs-random-write.sh
mode: 0755
overwrite: true
Expand Down Expand Up @@ -229,14 +229,15 @@ func doSyncTest(c cluster.TestCluster, client platform.Machine) {
}
c.Log("Set link down and rebooting.")
// Skip the error check as it is expected
cmd := fmt.Sprintf("sudo systemd-run sh -c 'ip link set %s down && sleep 5 && systemctl reboot'", netdevice)
cmd := fmt.Sprintf("sudo systemd-run sh -c 'ip link set %s down && sleep 2 && systemctl reboot'", netdevice)
_, _ = c.SSH(client, cmd)

time.Sleep(10 * time.Second)
err = util.Retry(8, 10*time.Second, func() error {
// Look for the kernel argument test=1
kernelArguments, err := c.SSH(client, "cat /proc/cmdline")
if err != nil {
return fmt.Errorf("failed to read /proc/cmdline: %w", err)
return err
} else if !strings.Contains(string(kernelArguments), "test=1") {
c.Fatalf("Not found test=1 in kernel argument after rebooted")
}
Expand Down

0 comments on commit 6bc96f5

Please sign in to comment.