Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Side by Side Diff: client/site_tests/platform_DaemonsRespawn/test_respawn.sh

Issue 2217001: fixed test to use htpdate (Closed) Base URL: ssh://git@chromiumos-git/autotest.git
Patch Set: added missing edits back Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « client/site_tests/platform_AccurateTime/platform_AccurateTime.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/sh 1 #!/bin/sh
2 2
3 # This script will kill some important system daemons and make sure 3 # This script will kill some important system daemons and make sure
4 # that they have been automatically restarted. 4 # that they have been automatically restarted.
5 5
6 OLD_PID=0 6 OLD_PID=0
7 PID=0 7 PID=0
8 8
9 # Time to wait for upstart to restart a daemon in seconds 9 # Time to wait for upstart to restart a daemon in seconds
10 RESTART_TIMEOUT=5 10 RESTART_TIMEOUT=5
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 echo "Upstart and daemon pids don't match: $upstart_pid vs $pgrep_pid" 42 echo "Upstart and daemon pids don't match: $upstart_pid vs $pgrep_pid"
43 return 1 43 return 1
44 fi 44 fi
45 45
46 # Everything checks out. 46 # Everything checks out.
47 PID=$upstart_pid 47 PID=$upstart_pid
48 } 48 }
49 49
50 # The set of jobs (and corresponding daemon names) to test. 50 # The set of jobs (and corresponding daemon names) to test.
51 # TODO: Test more jobs that have the respawn stanza 51 # TODO: Test more jobs that have the respawn stanza
52 UPSTART_JOBS_TO_TEST="ntp:ntpd udev:udevd" 52 UPSTART_JOBS_TO_TEST="htpdate:htpdate udev:udevd"
53 53
54 for job in $UPSTART_JOBS_TO_TEST ; do 54 for job in $UPSTART_JOBS_TO_TEST ; do
55 55
56 JOB=$(echo "$job" | awk -F':' '{ print $1 }') 56 JOB=$(echo "$job" | awk -F':' '{ print $1 }')
57 DAEMON=$(echo "$job" | awk -F':' '{ print $2 }') 57 DAEMON=$(echo "$job" | awk -F':' '{ print $2 }')
58 58
59 get_job_pid "$JOB" "$DAEMON" 59 get_job_pid "$JOB" "$DAEMON"
60 if [ $PID -le 0 ] ; then 60 if [ $PID -le 0 ] ; then
61 echo "Error: It looks like job '$JOB' is not running." 61 echo "Error: It looks like job '$JOB' is not running."
62 exit 255 62 exit 255
(...skipping 16 matching lines...) Expand all
79 exit 255 79 exit 255
80 fi 80 fi
81 if [ $PID -eq $OLD_PID ] ; then 81 if [ $PID -eq $OLD_PID ] ; then
82 echo "Error: Job '$JOB' retained the same pid; something went wrong." 82 echo "Error: Job '$JOB' retained the same pid; something went wrong."
83 exit 255 83 exit 255
84 fi 84 fi
85 85
86 done 86 done
87 87
88 exit 0 88 exit 0
OLDNEW
« no previous file with comments | « client/site_tests/platform_AccurateTime/platform_AccurateTime.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698