mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-02 06:35:36 +00:00
Add testcases to ensure that overwriting bootcode does not trash label.
This commit is contained in:
parent
97b902efd2
commit
6fd54d593e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=113897
|
@ -119,6 +119,32 @@ else
|
|||
echo "PASS: Could not delete ...a by writing to ...a" 1>&2
|
||||
fi
|
||||
|
||||
if ./sunlabel -B -b ${TMP}i0 ${MD} ; then
|
||||
if [ ! -c /dev/${MD}a ] ; then
|
||||
echo "FAILED: Writing bootcode killed ...a" 1>&2
|
||||
exit 2
|
||||
else
|
||||
echo "PASS: Could write bootcode while closed" 1>&2
|
||||
fi
|
||||
else
|
||||
echo "FAILED: Could not write bootcode while closed" 1>&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
exec 7> /dev/${MD}c
|
||||
if ktrace ./sunlabel -B -b ${TMP}i0 ${MD} ; then
|
||||
if [ ! -c /dev/${MD}a ] ; then
|
||||
echo "FAILED: Writing bootcode killed ...a" 1>&2
|
||||
exit 2
|
||||
else
|
||||
echo "PASS: Could write bootcode while open" 1>&2
|
||||
fi
|
||||
else
|
||||
echo "FAILED: Could not write bootcode while open" 1>&2
|
||||
exit 2
|
||||
fi
|
||||
exec 7> /dev/null
|
||||
|
||||
if dd if=${TMP}i0 of=/dev/${MD}c 2>/dev/null ; then
|
||||
echo "PASS: Could delete ...a by writing to ...c" 1>&2
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue