summaryrefslogtreecommitdiff
path: root/tests/keyctl/move/recursion/runtest.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/keyctl/move/recursion/runtest.sh')
-rw-r--r--tests/keyctl/move/recursion/runtest.sh45
1 files changed, 15 insertions, 30 deletions
diff --git a/tests/keyctl/move/recursion/runtest.sh b/tests/keyctl/move/recursion/runtest.sh
index 1e68963..36cd5cb 100644
--- a/tests/keyctl/move/recursion/runtest.sh
+++ b/tests/keyctl/move/recursion/runtest.sh
@@ -11,8 +11,7 @@ echo "++++ BEGINNING TEST" >$OUTPUTFILE
# create a keyring and attach it to the session keyring
marker "CREATE KEYRING 1"
-create_keyring "first" @s
-expect_keyid keyringid
+create_keyring --new=keyringid "first" @s
set_key_perm $keyringid 0x3f3f0000
# attempt to move a keyring to itself
@@ -25,8 +24,7 @@ expect_error EDEADLK
# create a second keyring in the first
marker "CREATE KEYRING 2"
-create_keyring "second" $keyringid
-expect_keyid keyring2id
+create_keyring --new=keyring2id "second" $keyringid
set_key_perm $keyring2id 0x3f3f0000
# attempt to move a keyring to its child keyring
@@ -39,8 +37,7 @@ expect_error EDEADLK
# create a third keyring in the second
marker "CREATE KEYRING 3"
-create_keyring "third" $keyring2id
-expect_keyid keyring3id
+create_keyring --new=keyring3id "third" $keyring2id
set_key_perm $keyring3id 0x3f3f0000
# attempt to move a keyring to its grandchild keyring
@@ -53,8 +50,7 @@ expect_error EDEADLK
# create a fourth keyring in the third
marker "CREATE KEYRING 4"
-create_keyring "fourth" $keyring3id
-expect_keyid keyring4id
+create_keyring --new=keyring4id "fourth" $keyring3id
set_key_perm $keyring4id 0x3f3f0000
# attempt to move a keyring to its great grandchild keyring
@@ -67,8 +63,7 @@ expect_error EDEADLK
# create a fifth keyring in the fourth
marker "CREATE KEYRING 5"
-create_keyring "fifth" $keyring4id
-expect_keyid keyring5id
+create_keyring --new=keyring5id "fifth" $keyring4id
set_key_perm $keyring5id 0x3f3f0000
# attempt to move a keyring to its great great grandchild keyring
@@ -81,8 +76,7 @@ expect_error EDEADLK
# create a sixth keyring in the fifth
marker "CREATE KEYRING 6"
-create_keyring "sixth" $keyring5id
-expect_keyid keyring6id
+create_keyring --new=keyring6id "sixth" $keyring5id
set_key_perm $keyring6id 0x3f3f0000
# attempt to move a keyring to its great great great grandchild keyring
@@ -95,8 +89,7 @@ expect_error EDEADLK
# create a seventh keyring in the sixth
marker "CREATE KEYRING 7"
-create_keyring "seventh" $keyring6id
-expect_keyid keyring7id
+create_keyring --new=keyring7id "seventh" $keyring6id
set_key_perm $keyring7id 0x3f3f0000
# attempt to move a keyring to its great great great great grandchild keyring
@@ -109,8 +102,7 @@ expect_error EDEADLK
# create an eigth keyring in the seventh
marker "CREATE KEYRING 8"
-create_keyring "eighth" @s
-expect_keyid keyring8id
+create_keyring --new=keyring8id "eighth" @s
set_key_perm $keyring8id 0x3f3f0000
move_key $keyring8id @s $keyring7id
@@ -121,8 +113,7 @@ expect_error EDEADLK
# create a ninth keyring in the eighth
marker "CREATE KEYRING 9"
-create_keyring "ninth" @s
-expect_keyid keyring9id
+create_keyring --new=keyring9id "ninth" @s
set_key_perm $keyring9id 0x3f3f0000
move_key $keyring9id @s $keyring8id
@@ -140,19 +131,15 @@ unlink_key $keyringid @s
# create two stacks of keyrings
marker "CREATE KEYRING STACKS"
-create_keyring "A1" @s
-expect_keyid aroot
-create_keyring "B1" @s
-expect_keyid broot
+create_keyring --new=aroot "A1" @s
+create_keyring --new=broot "B1" @s
a=$aroot
b=$broot
for ((i=2; i<=4; i++))
do
- create_keyring "A$i" $a
- expect_keyid a
- create_keyring "B$i" $b
- expect_keyid b
+ create_keyring --new=a "A$i" $a
+ create_keyring --new=b "B$i" $b
done
# make sure we can't create a cycle by linking the two stacks together
@@ -184,10 +171,8 @@ unlink_key $broot $a
# extend the stacks
marker "EXTEND STACKS"
-create_keyring "A5" $a
-expect_keyid a
-create_keyring "B5" $b
-expect_keyid b
+create_keyring --new=a "A5" $a
+create_keyring --new=b "B5" $b
# make sure we can't hide a cycle by linking the two bigger stacks together
marker "CHECK MAXDEPTH A TO B"