summaryrefslogtreecommitdiff
path: root/keyutils-1.5.6/tests/keyctl/pupdate/userupdate/runtest.sh
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2013-08-29 22:05:30 +0000
committer <>2013-09-19 12:35:38 +0000
commit20f3885d80d6b4eda72b35a8d219a722310274fd (patch)
tree6e2bd9f23d3c17447065dd681774d52c67bb683d /keyutils-1.5.6/tests/keyctl/pupdate/userupdate/runtest.sh
downloadkeyutils-tarball-keyutils-1.5.6.tar.gz
Imported from /home/lorry/working-area/delta_keyutils-tarball/keyutils-1.5.6.tar.bz2.HEADkeyutils-1.5.6masterbaserock/morph
Diffstat (limited to 'keyutils-1.5.6/tests/keyctl/pupdate/userupdate/runtest.sh')
-rw-r--r--keyutils-1.5.6/tests/keyctl/pupdate/userupdate/runtest.sh38
1 files changed, 38 insertions, 0 deletions
diff --git a/keyutils-1.5.6/tests/keyctl/pupdate/userupdate/runtest.sh b/keyutils-1.5.6/tests/keyctl/pupdate/userupdate/runtest.sh
new file mode 100644
index 0000000..fa59bc8
--- /dev/null
+++ b/keyutils-1.5.6/tests/keyctl/pupdate/userupdate/runtest.sh
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+. ../../../prepare.inc.sh
+. ../../../toolbox.inc.sh
+
+
+# ---- do the actual testing ----
+
+result=PASS
+echo "++++ BEGINNING TEST" >$OUTPUTFILE
+
+# check that we can add a user key to the session keyring
+marker "ADD USER KEY"
+create_key user wibble stuff @s
+expect_keyid keyid
+
+# read back what we put in it
+marker "PRINT PAYLOAD"
+print_key $keyid
+expect_payload payload "stuff"
+
+# check that we can update a user key
+marker "PUPDATE USER KEY"
+pupdate_key $keyid "lizard"
+
+# read back what we changed it to
+marker "PRINT UPDATED PAYLOAD"
+print_key $keyid
+expect_payload payload "lizard"
+
+# remove the key we added
+marker "UNLINK KEY"
+unlink_key $keyid @s
+
+echo "++++ FINISHED TEST: $result" >>$OUTPUTFILE
+
+# --- then report the results in the database ---
+toolbox_report_result $TEST $result