浏览代码

ktest: Sync before reboot

Before rebooting the target, run the sync command, as it seems that
either Grub2 or systemd gets screwed up if you update to reboot a kernel
once and do a reboot without doing a sync.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Steven Rostedt 12 年之前
父节点
当前提交
a496872212
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      tools/testing/ktest/ktest.pl

+ 3 - 0
tools/testing/ktest/ktest.pl

@@ -1147,6 +1147,9 @@ sub wait_for_monitor;
 sub reboot {
 sub reboot {
     my ($time) = @_;
     my ($time) = @_;
 
 
+    # Make sure everything has been written to disk
+    run_ssh("sync");
+
     if (defined($time)) {
     if (defined($time)) {
 	start_monitor;
 	start_monitor;
 	# flush out current monitor
 	# flush out current monitor