Skip to content

Commit

Permalink
test suite: Expect failure in modinfo/modprobe if there are no modules
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Feb 9, 2016
1 parent e899139 commit 0a6877e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions test/lib/completions/modinfo.exp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ proc teardown {} {
setup


set test "in<TAB> should complete modulename"
assert_complete_any "modinfo in" $test
set uname [exec bash -c "uname -r"]
if {[assert_exec "ls /lib/modules/$uname" "" "" "xfail"]} {
set test "in<TAB> should complete modulename"
assert_complete_any "modinfo in" $test
}


sync_after_int
Expand Down
7 changes: 5 additions & 2 deletions test/lib/completions/modprobe.exp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ assert_complete "--all" "modprobe --al" $test
sync_after_int


set test "in<TAB> should complete modulename"
assert_complete_any "modprobe in" $test
set uname [exec bash -c "uname -r"]
if {[assert_exec "ls /lib/modules/$uname" "" "" "xfail"]} {
set test "in<TAB> should complete modulename"
assert_complete_any "modprobe in" $test
}


sync_after_int
Expand Down

0 comments on commit 0a6877e

Please sign in to comment.