Whamcloud - gitweb
LU-1625 test: reduce test duration for nfs mode
[fs/lustre-release.git] / lustre / tests / e2fsck.exp
1 #!/usr/bin/expect -f
2 #
3 # This expect script invokes e2fsck to check the filesystem
4 # on a device and allows e2fsck to be run interactively.
5 #
6 set env(PATH) "/usr/bin:/bin:/usr/sbin:/sbin"
7
8 log_user 1
9
10 if {$argc == 1} {
11         set dev [lindex $argv 0]
12 } else {
13         set prog [lindex [split $argv0 "/"] end]
14         send_user "Usage: $prog <device>\r\n"
15         exit 1
16 }
17
18 spawn e2fsck -f $dev
19 expect {
20         -gl "<y>? " {
21                 sleep 30
22                 send "yes\r"
23                 exp_continue
24         }
25         -gl "FILE SYSTEM WAS MODIFIED" {
26                 exit 0
27         }
28 }