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

« back to all changes in this revision

Viewing changes to tests/bugzillas/bz1033467/runtest.sh

  • 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
#!/bin/sh
 
2
 
 
3
# Test for https://bugzilla.redhat.com/show_bug.cgi?id=1033467
 
4
 
 
5
. ../../prepare.inc.sh
 
6
. ../../toolbox.inc.sh
 
7
 
 
8
 
 
9
# ---- do the actual testing ----
 
10
 
 
11
result=PASS
 
12
echo "++++ BEGINNING TEST" >$OUTPUTFILE
 
13
 
 
14
# create a keyring and attach it to the session keyring
 
15
marker "ADD SANDBOX KEYRING"
 
16
create_keyring sandbox @s
 
17
expect_keyid sandbox
 
18
 
 
19
# create a bunch of nested keyrings in the sandbox
 
20
marker "ADD NESTED KEYRINGS"
 
21
for ((i=0; i<=16; i++))
 
22
do
 
23
    create_keyring ring$i $sandbox
 
24
    expect_keyid tmp
 
25
done
 
26
 
 
27
# create a key in each of those keyrings
 
28
marker "ADD KEYS"
 
29
keys=""
 
30
for ((i=0; i<=16; i++))
 
31
do
 
32
    create_key user a$i a %:ring$i
 
33
    expect_keyid id
 
34
    keys="$keys $id"
 
35
done
 
36
 
 
37
# search for the added keys, beginning at sandbox and exercising the nesting
 
38
marker "SEARCH KEYS"
 
39
keys2=""
 
40
for ((i=0; i<=16; i++))
 
41
do
 
42
    search_for_key $sandbox user a$i
 
43
    expect_keyid id
 
44
    keys2="$keys2 $id"
 
45
done
 
46
 
 
47
marker "COMPARE KEY LISTS"
 
48
if [ "$keys" != "$keys2" ]
 
49
then
 
50
        echo "Key lists differ" >>$OUTPUTFILE
 
51
        echo List 1: "\"$keys\"" >>$OUTPUTFILE
 
52
        echo List 2: "\"$keys2\"" >>$OUTPUTFILE
 
53
        failed
 
54
fi
 
55
 
 
56
# search for some unadded keys and make sure we get an error
 
57
marker "SEARCH MISSES"
 
58
for ((i=17; i<=20; i++))
 
59
do
 
60
    search_for_key --fail $sandbox user a$i
 
61
    expect_error ENOKEY
 
62
done
 
63
 
 
64
echo "++++ FINISHED TEST: $result" >>$OUTPUTFILE
 
65
 
 
66
# --- then report the results in the database ---
 
67
toolbox_report_result $TEST $result