tests: Ensure test sessions are cleaned up 03/325303/6
authorKarol Lewandowski <k.lewandowsk@samsung.com>
Tue, 3 Jun 2025 23:09:45 +0000 (01:09 +0200)
committerMichal Bloch <m.bloch@samsung.com>
Mon, 9 Jun 2025 14:28:15 +0000 (16:28 +0200)
Change-Id: Ib9dda199ce2556bd3706dda461d8f94ac37e8d0b

tests/integration/sessiond-integration-tests.sh

index 20533f53738524b02c30768f00ef4c5b2ac093a4..1114ec15bd423ad95938168c697bd1923bab0c85 100755 (executable)
@@ -167,6 +167,7 @@ apps_rwdir="${homedir}/apps_rw"
 
 verbose_echo "User id: $userid, home directory: $homedir, apps_rw user directory: $apps_rwdir"
 
+trap remove_test_users 0
 create_test_users true
 
 # Compare directories.
@@ -288,7 +289,5 @@ done
 # TODO: try to make overlapping sessions (regular + img)
 # TODO: try to get list of sessions when an img is mounted and see if the mountpoint dir counts as a regular-dir session
 
-remove_test_users true
-
 exit 0