~ubuntu-branches/ubuntu/wily/keyutils/wily

« back to all changes in this revision

Viewing changes to debian/patches/0011-Disable-some-tests.patch

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-10-16 11:45:19 UTC
  • mfrom: (1.1.7) (10.2.16 sid)
  • Revision ID: package-import@ubuntu.com-20141016114519-cqt8zwrg92c31m31
Tags: 1.5.9-5ubuntu1
Disable the tests, hanging on the distro buildd kernels (12.04 LTS).
Verified that the tests succeed with the 14.04 LTS kernels.
Addresses: LP: #1381973.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From: Christian Kastner <debian@kvr.at>
 
2
Date: Mon, 26 May 2014 00:44:59 +0200
 
3
Subject: Disable some tests
 
4
 
 
5
Some tests do not properly check whether features they need are available.
 
6
These will be fixed in the next upstream release.
 
7
 
 
8
Forwarded: no
 
9
Last-Update: 2014-05-29
 
10
 
 
11
---
 
12
 tests/bugzillas/bz1031154/runtest.sh | 87 ------------------------------------
 
13
 1 file changed, 87 deletions(-)
 
14
 delete mode 100644 tests/bugzillas/bz1031154/runtest.sh
 
15
 
 
16
diff --git a/tests/bugzillas/bz1031154/runtest.sh b/tests/bugzillas/bz1031154/runtest.sh
 
17
deleted file mode 100644
 
18
index e4d64d4..0000000
 
19
--- a/tests/bugzillas/bz1031154/runtest.sh
 
20
+++ /dev/null
 
21
@@ -1,87 +0,0 @@
 
22
-#!/bin/sh
 
23
-
 
24
-# Test for https://bugzilla.redhat.com/show_bug.cgi?id=1031154
 
25
-
 
26
-. ../../prepare.inc.sh
 
27
-. ../../toolbox.inc.sh
 
28
-
 
29
-
 
30
-# ---- do the actual testing ----
 
31
-
 
32
-result=PASS
 
33
-echo "++++ BEGINNING TEST" >$OUTPUTFILE
 
34
-
 
35
-# we need a reference time to scan the audit log from so as not to pick up old
 
36
-# results from this test.
 
37
-base_date=`date +"%x@%X"`
 
38
-base_time=${base_date#*@}
 
39
-base_date=${base_date%@*}
 
40
-sleep 1
 
41
-
 
42
-# reset the permissive audit log autocancel thing
 
43
-load_policy
 
44
-
 
45
-# we need to be in permissive mode
 
46
-marker "ENTER SELINUX PERMISSIVE MODE"
 
47
-
 
48
-mode=`getenforce`
 
49
-
 
50
-if [ "$mode" != "Permissive" ]
 
51
-then
 
52
-       echo setenforce Permissive >>$OUTPUTFILE
 
53
-       if ! setenforce Permissive
 
54
-       then
 
55
-               failed
 
56
-       fi
 
57
-fi
 
58
-
 
59
-# create a big key to probe
 
60
-marker "CREATE BIG KEY"
 
61
-pcreate_key_by_size 8192 big_key test-key @s
 
62
-expect_keyid id
 
63
-
 
64
-# check the big key is file backed and the right size
 
65
-marker "CHECK BIG KEY"
 
66
-xid=`printf %08x $id`
 
67
-
 
68
-pk=`cat /proc/keys | grep "^$xid.*test-key: 8192 \\[file\\]"`
 
69
-echo $pk >>$OUTPUTFILE
 
70
-if [ -z "$pk" ]
 
71
-then
 
72
-       echo "+++ Incorrectly created key" >>$OUTPUTFILE
 
73
-       cat /proc/keys | grep "^$xid" >>$OUTPUTFILE
 
74
-       failed
 
75
-fi
 
76
-
 
77
-# use a separate context to access the key
 
78
-marker "ACCESS INTERCONTEXT"
 
79
-
 
80
-echo runcon system_u:system_r:httpd_t:s0-s0:c0.c1023 keyctl print $id >>$OUTPUTFILE
 
81
-if ! runcon system_u:system_r:httpd_t:s0-s0:c0.c1023 keyctl print $id >/dev/null 2>>$OUTPUTFILE
 
82
-then
 
83
-       failed
 
84
-fi
 
85
-
 
86
-# examine the audit logs
 
87
-marker "EXAMINE AUDIT LOGS"
 
88
-
 
89
-echo ausearch -m AVC -i --subject httpd_t -ts $base_date $base_time \| audit2allow \| grep '-P "allow httpd_t user_tmpfs_t:file [{] (open |read )+[}];"' >>$OUTPUTFILE
 
90
-if ausearch -m AVC -i --subject httpd_t -ts $base_date $base_time 2>>$OUTPUTFILE | audit2allow 2>>$OUTPUTFILE | grep -P "allow httpd_t user_tmpfs_t:file [{] (open |read )+[}];"
 
91
-then
 
92
-       failed
 
93
-fi
 
94
-
 
95
-marker "RESTORE SELINUX MODE"
 
96
-if [ "$mode" != "Permissive" ]
 
97
-then
 
98
-       echo setenforce $mode >>$OUTPUTFILE
 
99
-       if ! setenforce $mode
 
100
-       then
 
101
-               failed
 
102
-       fi
 
103
-fi
 
104
-
 
105
-echo "++++ FINISHED TEST: $result" >>$OUTPUTFILE
 
106
-
 
107
-# --- then report the results in the database ---
 
108
-toolbox_report_result $TEST $result
 
109
-- 
 
110
2.0.0.rc4
 
111