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

« back to all changes in this revision

Viewing changes to tests/keyctl/padd/useradd/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
 
1
#!/bin/bash
2
2
 
3
3
. ../../../prepare.inc.sh
4
4
. ../../../toolbox.inc.sh
40
40
marker "UNLINK KEY"
41
41
unlink_key $keyid @s
42
42
 
43
 
keyctl show
 
43
old_root_quota=`cat /proc/sys/kernel/keys/root_maxbytes`
 
44
 
 
45
if [ $skip_root_required -ne 1 ]
 
46
then
 
47
        # add keys with huge payloads
 
48
        if [ $old_root_quota -lt 65536 ]
 
49
        then
 
50
                marker "INCREASE QUOTA"
 
51
                echo 65536 >/proc/sys/kernel/keys/root_maxbytes
 
52
        fi
 
53
 
 
54
        marker "ADD LARGE USER KEY"
 
55
        pcreate_key_by_size 32767 user large @s
 
56
        expect_keyid keyid
 
57
        md5sum_key $keyid
 
58
        expect_payload payload "f128f774ede3fe931e7c6745c4292f40"
 
59
 
 
60
        if ! version_less_than `uname -r` 3.13
 
61
        then
 
62
                marker "ADD SMALL BIG KEY"
 
63
                pcreate_key_by_size 128 big_key small @s
 
64
                expect_keyid keyid
 
65
                md5sum_key $keyid
 
66
                expect_payload payload "f09f35a5637839458e462e6350ecbce4"
 
67
 
 
68
                marker "ADD HUGE BIG KEY"
 
69
                pcreate_key_by_size $((1024*1024-1)) big_key huge @s
 
70
                expect_keyid keyid
 
71
                md5sum_key $keyid
 
72
                expect_payload payload "e57598cd670284cf7d09e16ed9d4b2ac"
 
73
        fi
 
74
fi
 
75
 
 
76
marker "CLEAR KEYRING"
 
77
clear_keyring @s
 
78
 
 
79
if [ $skip_root_required -ne 1 ]
 
80
then
 
81
        if [ $old_root_quota -lt 65536 ]
 
82
        then
 
83
                marker "RESET QUOTA"
 
84
                echo $old_root_quota >/proc/sys/kernel/keys/root_maxbytes
 
85
                sleep 1
 
86
        fi
 
87
fi
44
88
 
45
89
echo "++++ FINISHED TEST: $result" >>$OUTPUTFILE
46
90