Blame tests/test-augtool-modify-root.sh
|
Packit Service |
a2ae7a |
#!/bin/sh
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
# Make sure changing the value of root works
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
exp="/ = root"
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
act=$(augtool --noautoload 2>&1 <
|
|
Packit Service |
a2ae7a |
set / root
|
|
Packit Service |
a2ae7a |
get /
|
|
Packit Service |
a2ae7a |
quit
|
|
Packit Service |
a2ae7a |
EOF
|
|
Packit Service |
a2ae7a |
)
|
|
Packit Service |
a2ae7a |
result=$?
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
if [ $result -ne 0 ]; then
|
|
Packit Service |
a2ae7a |
echo "augtool failed"
|
|
Packit Service |
a2ae7a |
exit 1
|
|
Packit Service |
a2ae7a |
fi
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
if [ "$act" != "$exp" ]; then
|
|
Packit Service |
a2ae7a |
echo "augtool produced unexpected output:"
|
|
Packit Service |
a2ae7a |
echo "Expected:"
|
|
Packit Service |
a2ae7a |
echo "$exp"
|
|
Packit Service |
a2ae7a |
echo "Actual:"
|
|
Packit Service |
a2ae7a |
echo "$act"
|
|
Packit Service |
a2ae7a |
exit 1
|
|
Packit Service |
a2ae7a |
fi
|