Changeset 2571
- Timestamp:
- 01/07/08 13:29:47
(1 year ago)
- Author:
- pebenito
- Message:
tools: print test suite in error messages.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r2413 |
r2571 |
|
| 114 | 114 | einfo "Building conf (extref; mon)" |
|---|
| 115 | 115 | $SANDBOX make -C $START conf || die "Failed make conf (extref; mon)" |
|---|
| 116 | | grep -q ^testapp policy/modules.conf || die "testapp missing from modules.conf" |
|---|
| 117 | | grep -q ^testsrv policy/modules.conf || die "testsrv missing from modules.conf" |
|---|
| 118 | | grep -q '^test ' policy/modules.conf || die "test missing from modules.conf" |
|---|
| | 116 | grep -q ^testapp policy/modules.conf || die "testapp missing from modules.conf (extref; mon)" |
|---|
| | 117 | grep -q ^testsrv policy/modules.conf || die "testsrv missing from modules.conf (extref; mon)" |
|---|
| | 118 | grep -q '^test ' policy/modules.conf || die "test missing from modules.conf (extref; mon)" |
|---|
| 119 | 119 | einfo "Building fc_sort" |
|---|
| 120 | 120 | # need to figure out why this gets "Aborted" when run in sandbox |
|---|
| 121 | 121 | make -C $START ${LOCAL_ROOT}/tmp/fc_sort || die |
|---|
| 122 | 122 | einfo "Building policy (extref; mon)" |
|---|
| 123 | | $SANDBOX make -C $START policy || die "failed building policy" |
|---|
| 124 | | grep -q 'type test_t;' policy.conf || die "test_t missing from policy.conf" |
|---|
| 125 | | grep -q 'type testapp_t;' policy.conf || die "testapp_t missing from policy.conf" |
|---|
| 126 | | grep -q 'type testsrv_t;' policy.conf || die "testsrv_t missing from policy.conf" |
|---|
| 127 | | [ -f policy.20 ] || die "policy.20 is missing" |
|---|
| 128 | | $SANDBOX make -C $START ${LOCAL_ROOT}/file_contexts || die "failed building file_contexts" |
|---|
| 129 | | [ -f file_contexts ] || die "file_contexts is missing" |
|---|
| | 123 | $SANDBOX make -C $START policy || die "failed building policy (extref; mon)" |
|---|
| | 124 | grep -q 'type test_t;' policy.conf || die "test_t missing from policy.conf (extref; mon)" |
|---|
| | 125 | grep -q 'type testapp_t;' policy.conf || die "testapp_t missing from policy.conf (extref; mon)" |
|---|
| | 126 | grep -q 'type testsrv_t;' policy.conf || die "testsrv_t missing from policy.conf (extref; mon)" |
|---|
| | 127 | [ -f policy.20 ] || die "policy.20 is missing (extref; mon)" |
|---|
| | 128 | $SANDBOX make -C $START ${LOCAL_ROOT}/file_contexts || die "failed building file_contexts (extref; mon)" |
|---|
| | 129 | [ -f file_contexts ] || die "file_contexts is missing (extref; mon)" |
|---|
| 130 | 130 | if [ ! -z "$SANDBOX" ]; then |
|---|
| 131 | 131 | einfo "Touch test--this should fail (extref; mod)" |
|---|
| 132 | | $SANDBOX touch $START/EPERM && die "Touch test failed" |
|---|
| | 132 | $SANDBOX touch $START/EPERM && die "Touch test failed (extref; mon)" |
|---|
| 133 | 133 | fi |
|---|
| 134 | 134 | einfo "Cleaning up (extref; mon)" |
|---|
| … | … | |
| 145 | 145 | einfo "Building conf (extref; mod)" |
|---|
| 146 | 146 | $SANDBOX make -C $START conf || die |
|---|
| 147 | | grep -q ^testapp policy/modules.conf || die "testapp missing from modules.conf" |
|---|
| 148 | | grep -q ^testsrv policy/modules.conf || die "testsrv missing from modules.conf" |
|---|
| | 147 | grep -q ^testapp policy/modules.conf || die "testapp missing from modules.conf (extref; mod)" |
|---|
| | 148 | grep -q ^testsrv policy/modules.conf || die "testsrv missing from modules.conf (extref; mod)" |
|---|
| 149 | 149 | einfo "Building fc_sort" |
|---|
| 150 | 150 | # need to figure out why this gets "Aborted" when run in sandbox |
|---|
| 151 | 151 | make -C $START ${LOCAL_ROOT}/tmp/fc_sort || die |
|---|
| 152 | 152 | einfo "Building all policy (extref; mod)" |
|---|
| 153 | | $SANDBOX make -C $START base || die "failed building base module" |
|---|
| 154 | | [ -f base.pp ] || die "base.pp is missing" |
|---|
| 155 | | $SANDBOX make -C $START modules || die "failed building all modules" |
|---|
| 156 | | [ -f apache.pp ] || die "apache.pp is missing" |
|---|
| 157 | | [ -f testapp.pp ] || die "testapp.pp is missing" |
|---|
| 158 | | einfo "Verifying policy linking" |
|---|
| 159 | | $SANDBOX make -C $START validate || die "failed validating linking" |
|---|
| | 153 | $SANDBOX make -C $START base || die "failed building base module (extref; mod)" |
|---|
| | 154 | [ -f base.pp ] || die "base.pp is missing (extref; mod)" |
|---|
| | 155 | $SANDBOX make -C $START modules || die "failed building all modules (extref; mod)" |
|---|
| | 156 | [ -f apache.pp ] || die "apache.pp is missing (extref; mod)" |
|---|
| | 157 | [ -f testapp.pp ] || die "testapp.pp is missing (extref; mod)" |
|---|
| | 158 | einfo "Verifying policy linking (extref; mod)" |
|---|
| | 159 | $SANDBOX make -C $START validate || die "failed validating linking (extref; mod)" |
|---|
| 160 | 160 | $SANDBOX make -C $START clean || die |
|---|
| 161 | 161 | einfo "Building policy by name (extref; mod)" |
|---|
| 162 | | $SANDBOX make -C $START ${LOCAL_ROOT}/apache.pp ${LOCAL_ROOT}/testapp.pp || die "Failed building modules by name" |
|---|
| 163 | | [ -f apache.pp ] || die "apache.pp is missing" |
|---|
| 164 | | [ -f testapp.pp ] || die "testapp.pp is missing" |
|---|
| | 162 | $SANDBOX make -C $START ${LOCAL_ROOT}/apache.pp ${LOCAL_ROOT}/testapp.pp || die "Failed building modules by name (extref; mod)" |
|---|
| | 163 | [ -f apache.pp ] || die "apache.pp is missing (extref; mod)" |
|---|
| | 164 | [ -f testapp.pp ] || die "testapp.pp is missing (extref; mod)" |
|---|
| 165 | 165 | # need to figure out why this gets "Aborted" when run in sandbox |
|---|
| 166 | 166 | make -C $START ${LOCAL_ROOT}/tmp/fc_sort || die |
|---|
| 167 | | $SANDBOX make -C $START ${LOCAL_ROOT}/base.pp || die "Failed building base by name" |
|---|
| 168 | | [ -f base.pp ] || die "base.pp is missing" |
|---|
| | 167 | $SANDBOX make -C $START ${LOCAL_ROOT}/base.pp || die "Failed building base by name (extref; mod)" |
|---|
| | 168 | [ -f base.pp ] || die "base.pp is missing (extref; mod)" |
|---|
| 169 | 169 | if [ ! -z "$SANDBOX" ]; then |
|---|
| 170 | 170 | einfo "Touch test--this should fail (extref; mod)" |
|---|
| 171 | | $SANDBOX touch $START/EPERM && die "Touch test failed" |
|---|
| | 171 | $SANDBOX touch $START/EPERM && die "Touch test failed (extref; mod)" |
|---|
| 172 | 172 | fi |
|---|
| 173 | 173 | einfo "Cleaning up (extref; mod)" |
|---|
| … | … | |
| 182 | 182 | ################# headers build (flat) |
|---|
| 183 | 183 | einfo "Installing headers (headers; flat)" |
|---|
| 184 | | make DESTDIR=$BOX install-headers || die "Failed to install headers" |
|---|
| | 184 | make DESTDIR=$BOX install-headers || die "Failed to install headers (headers; flat)" |
|---|
| 185 | 185 | mkdir $BOX/policy |
|---|
| 186 | 186 | cp doc/example.* $BOX/policy |
|---|
| … | … | |
| 189 | 189 | cd ${BOX}/policy |
|---|
| 190 | 190 | einfo "Building all policy (headers; flat)" |
|---|
| 191 | | $SANDBOX make QUIET=n NAME=refpolicy all || die "Failed to build all policy" |
|---|
| 192 | | [ -f example.pp ] || die "example.pp is missing" |
|---|
| | 191 | $SANDBOX make QUIET=n NAME=refpolicy all || die "Failed to build all policy (headers; flat)" |
|---|
| | 192 | [ -f example.pp ] || die "example.pp is missing (headers; flat)" |
|---|
| 193 | 193 | $SANDBOX make QUIET=n NAME=refpolicy clean |
|---|
| 194 | 194 | einfo "Building policy by name (headers; flat)" |
|---|
| 195 | | $SANDBOX make QUIET=n NAME=refpolicy example.pp || die "Failed to build by name" |
|---|
| 196 | | [ -f example.pp ] || die "example.pp is missing" |
|---|
| | 195 | $SANDBOX make QUIET=n NAME=refpolicy example.pp || die "Failed to build by name (headers; flat)" |
|---|
| | 196 | [ -f example.pp ] || die "example.pp is missing (headers; flat)" |
|---|
| 197 | 197 | einfo "Building XML (headers; flat)" |
|---|
| 198 | | $SANDBOX make QUIET=n NAME=refpolicy xml || die "Failed to build XML" |
|---|
| 199 | | grep -q '<layer name="third_party">' doc/policy.xml || die "third_party layer missing from XML" |
|---|
| 200 | | grep -q '<layer name="kernel">' doc/policy.xml || die "kernel layer missing from XML" |
|---|
| 201 | | egrep -q '<module name="example" .*>' doc/policy.xml || die "example module missing from XML" |
|---|
| 202 | | egrep -q '<module name="apache" .*>' doc/policy.xml || die "apache module missing from XML" |
|---|
| | 198 | $SANDBOX make QUIET=n NAME=refpolicy xml || die "Failed to build XML (headers; flat)" |
|---|
| | 199 | grep -q '<layer name="third_party">' doc/policy.xml || die "third_party layer missing from XML (headers; flat)" |
|---|
| | 200 | grep -q '<layer name="kernel">' doc/policy.xml || die "kernel layer missing from XML (headers; flat)" |
|---|
| | 201 | egrep -q '<module name="example" .*>' doc/policy.xml || die "example module missing from XML (headers; flat)" |
|---|
| | 202 | egrep -q '<module name="apache" .*>' doc/policy.xml || die "apache module missing from XML (headers; flat)" |
|---|
| 203 | 203 | if [ ! -z "$SANDBOX" ]; then |
|---|
| 204 | 204 | einfo "Touch test--this should fail (headers; flat)" |
|---|
| … | … | |
| 219 | 219 | einfo "Building all policy (headers; layered)" |
|---|
| 220 | 220 | $SANDBOX make QUIET=n NAME=refpolicy SHAREDIR=$BOX/usr/share/selinux all || die |
|---|
| 221 | | [ -f testsrv.pp ] || die "testsrv.pp is missing" |
|---|
| 222 | | [ -f test.pp ] || die "test.pp is missing" |
|---|
| | 221 | [ -f testsrv.pp ] || die "testsrv.pp is missing (headers; layered)" |
|---|
| | 222 | [ -f test.pp ] || die "test.pp is missing (headers; layered)" |
|---|
| 223 | 223 | $SANDBOX make QUIET=n NAME=refpolicy SHAREDIR=$BOX/usr/share/selinux clean || die |
|---|
| 224 | 224 | einfo "Building policy by name (headers; layered and flat)" |
|---|
| 225 | 225 | $SANDBOX make QUIET=n NAME=refpolicy SHAREDIR=$BOX/usr/share/selinux testsrv.pp test.pp || die |
|---|
| 226 | | [ -f testsrv.pp ] || die "testsrv.pp is missing" |
|---|
| 227 | | [ -f test.pp ] || die "test.pp is missing" |
|---|
| 228 | | einfo "Building XML (headers; layered)" |
|---|
| | 226 | [ -f testsrv.pp ] || die "testsrv.pp is missing (headers; layered)" |
|---|
| | 227 | [ -f test.pp ] || die "test.pp is missing (headers; layered)" |
|---|
| | 228 | einfo "Building XML (headers; layered) (headers; layered)" |
|---|
| 229 | 229 | $SANDBOX make QUIET=n NAME=refpolicy SHAREDIR=$BOX/usr/share/selinux xml || die |
|---|
| 230 | | grep -q '<layer name="kernel">' doc/policy.xml || die "kernel layer missing from XML" |
|---|
| 231 | | grep -q '<layer name="test">' doc/policy.xml || die "test layer missing from XML" |
|---|
| 232 | | egrep -q '<module name="test" .*>' doc/policy.xml || die "test module missing from XML" |
|---|
| 233 | | egrep -q '<module name="testsrv" .*>' doc/policy.xml || die "testsrv module missing from XML" |
|---|
| 234 | | egrep -q '<module name="testapp" .*>' doc/policy.xml || die "testapp module missing from XML" |
|---|
| 235 | | egrep -q '<module name="apache" .*>' doc/policy.xml || die "apache module missing from XML" |
|---|
| | 230 | grep -q '<layer name="kernel">' doc/policy.xml || die "kernel layer missing from XML (headers; layered)" |
|---|
| | 231 | grep -q '<layer name="test">' doc/policy.xml || die "test layer missing from XML (headers; layered)" |
|---|
| | 232 | egrep -q '<module name="test" .*>' doc/policy.xml || die "test module missing from XML (headers; layered)" |
|---|
| | 233 | egrep -q '<module name="testsrv" .*>' doc/policy.xml || die "testsrv module missing from XML (headers; layered)" |
|---|
| | 234 | egrep -q '<module name="testapp" .*>' doc/policy.xml || die "testapp module missing from XML (headers; layered)" |
|---|
| | 235 | egrep -q '<module name="apache" .*>' doc/policy.xml || die "apache module missing from XML (headers; layered)" |
|---|
| 236 | 236 | if [ ! -z "$SANDBOX" ]; then |
|---|
| 237 | 237 | einfo "Touch test--this should fail (headers; layered)" |
|---|
| … | … | |
| 243 | 243 | |
|---|
| 244 | 244 | ################# headers build (layered and flat) |
|---|
| 245 | | einfo "Installing headers (layered and flat)" |
|---|
| | 245 | einfo "Installing headers (headers; layered and flat)" |
|---|
| 246 | 246 | make DESTDIR=$BOX install-headers |
|---|
| 247 | 247 | mkdir $BOX/policy |
|---|
| … | … | |
| 253 | 253 | einfo "Building all policy (headers; layered and flat)" |
|---|
| 254 | 254 | $SANDBOX make QUIET=n NAME=refpolicy SHAREDIR=$BOX/usr/share/selinux all || die |
|---|
| 255 | | [ -f example.pp ] || die "example.pp is missing" |
|---|
| 256 | | [ -f testapp.pp ] || die "testapp.pp is missing" |
|---|
| 257 | | [ -f testsrv.pp ] || die "testsrv.pp is missing" |
|---|
| 258 | | [ -f test.pp ] || die "test.pp is missing" |
|---|
| | 255 | [ -f example.pp ] || die "example.pp is missing (headers; layered and flat)" |
|---|
| | 256 | [ -f testapp.pp ] || die "testapp.pp is missing (headers; layered and flat)" |
|---|
| | 257 | [ -f testsrv.pp ] || die "testsrv.pp is missing (headers; layered and flat)" |
|---|
| | 258 | [ -f test.pp ] || die "test.pp is missing (headers; layered and flat)" |
|---|
| 259 | 259 | $SANDBOX make QUIET=n NAME=refpolicy SHAREDIR=$BOX/usr/share/selinux clean || die |
|---|
| 260 | 260 | einfo "Building policy by name (headers; layered and flat)" |
|---|
| 261 | 261 | $SANDBOX make QUIET=n NAME=refpolicy SHAREDIR=$BOX/usr/share/selinux test.pp example.pp testapp.pp || die |
|---|
| 262 | | [ -f testapp.pp ] || die "testapp.pp is missing" |
|---|
| 263 | | [ -f test.pp ] || die "test.pp is missing" |
|---|
| | 262 | [ -f testapp.pp ] || die "testapp.pp is missing (headers; layered and flat)" |
|---|
| | 263 | [ -f test.pp ] || die "test.pp is missing (headers; layered and flat)" |
|---|
| 264 | 264 | einfo "Building XML (headers; layered and flat)" |
|---|
| 265 | 265 | $SANDBOX make QUIET=n NAME=refpolicy SHAREDIR=$BOX/usr/share/selinux xml || die |
|---|
| 266 | | grep -q '<layer name="kernel">' doc/policy.xml || die "kernel layer missing from XML" |
|---|
| 267 | | grep -q '<layer name="test">' doc/policy.xml || die "test layer missing from XML" |
|---|
| 268 | | grep -q '<layer name="third_party">' doc/policy.xml || die "third_party layer missing from XML" |
|---|
| 269 | | egrep -q '<module name="test" .*>' doc/policy.xml || die "test module missing from XML" |
|---|
| 270 | | egrep -q '<module name="testsrv" .*>' doc/policy.xml || die "testsrv module missing from XML" |
|---|
| 271 | | egrep -q '<module name="testapp" .*>' doc/policy.xml || die "testapp module missing from XML" |
|---|
| 272 | | egrep -q '<module name="apache" .*>' doc/policy.xml || die "apache module missing from XML" |
|---|
| 273 | | egrep -q '<module name="example" .*>' doc/policy.xml || die "example module missing from XML" |
|---|
| | 266 | grep -q '<layer name="kernel">' doc/policy.xml || die "kernel layer missing from XML (headers; layered and flat)" |
|---|
| | 267 | grep -q '<layer name="test">' doc/policy.xml || die "test layer missing from XML (headers; layered and flat)" |
|---|
| | 268 | grep -q '<layer name="third_party">' doc/policy.xml || die "third_party layer missing from XML (headers; layered and flat)" |
|---|
| | 269 | egrep -q '<module name="test" .*>' doc/policy.xml || die "test module missing from XML (headers; layered and flat)" |
|---|
| | 270 | egrep -q '<module name="testsrv" .*>' doc/policy.xml || die "testsrv module missing from XML (headers; layered and flat)" |
|---|
| | 271 | egrep -q '<module name="testapp" .*>' doc/policy.xml || die "testapp module missing from XML (headers; layered and flat)" |
|---|
| | 272 | egrep -q '<module name="apache" .*>' doc/policy.xml || die "apache module missing from XML (headers; layered and flat)" |
|---|
| | 273 | egrep -q '<module name="example" .*>' doc/policy.xml || die "example module missing from XML (headers; layered and flat)" |
|---|
| 274 | 274 | if [ ! -z "$SANDBOX" ]; then |
|---|
| 275 | 275 | einfo "Touch test--this should fail (headers; layered and flat)" |
|---|
Download in other formats:
* Generating other formats may take time.