From 02a629dcc319e418b2f4185acb5bfb22bc86b3eb Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Fri, 11 Jul 2014 18:56:33 -0700 Subject: Fix test cleanup code to run during global destruction If we don't run the code to delete the wallet database very late, destruction of the SQLite objects may recreate the database file. Move the unlink to an END block to avoid this problem. Change-Id: Ib5ec2cbd08ba24c99f3dfa1daa01488931c5958f Reviewed-on: https://gerrit.stanford.edu/1525 Reviewed-by: Russ Allbery Tested-by: Russ Allbery --- perl/t/keytab.t | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'perl/t/keytab.t') diff --git a/perl/t/keytab.t b/perl/t/keytab.t index 467d1b3..127762a 100755 --- a/perl/t/keytab.t +++ b/perl/t/keytab.t @@ -766,4 +766,6 @@ EOO # Clean up. $admin->destroy; -unlink ('wallet-db', 'krb5cc_temp', 'krb5cc_test', 'test-acl', 'test-pid'); +END { + unlink ('wallet-db', 'krb5cc_temp', 'krb5cc_test', 'test-acl', 'test-pid'); +} -- cgit v1.2.3