NEX-15891 Latest grep from illumos broke zvol_swap tests and swapadd Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com> Reviewed by: Rob Gittins <rob.gittins@nexenta.com> 4206 history_003_pos relies on exact size of history log and entries 4207 history_008_pos depends on obsolete internal history log message 4208 Typo in zfs_main.c: "posxiuser" 4209 Populate zfstest with the remainder of the STF tests Reviewed by: Sonu Pillai <sonu.pillai@delphix.com> Reviewed by: Will Guyette <will.guyette@delphix.com> Reviewed by: Eric Diven <eric.diven@delphix.com> Reviewed by: Christopher Siden <christopher.siden@delphix.com> Approved by: Richard Lowe <richlowe@richlowe.net>
116 typeset volume=$1
117
118 if [[ -z $volume ]] ; then
119 log_note "No volume specified."
120 return 1
121 fi
122
123 zdb -dddd $volume 2 | grep "dumpsize" > /dev/null 2>&1
124 return $?
125 }
126
127 function is_swap_inuse
128 {
129 typeset device=$1
130
131 if [[ -z $device ]] ; then
132 log_note "No device specified."
133 return 1
134 fi
135
136 swap -l | grep -w $device > /dev/null 2>&1
137 return $?
138 }
|
116 typeset volume=$1
117
118 if [[ -z $volume ]] ; then
119 log_note "No volume specified."
120 return 1
121 fi
122
123 zdb -dddd $volume 2 | grep "dumpsize" > /dev/null 2>&1
124 return $?
125 }
126
127 function is_swap_inuse
128 {
129 typeset device=$1
130
131 if [[ -z $device ]] ; then
132 log_note "No device specified."
133 return 1
134 fi
135
136 swap -l | nawk 'BEGIN {rc=1} {if ($1 == "'$device'") { rc=0}} END {exit rc}'
137 return $?
138 }
|