diff options
author | Adam Michalski <a.michalski2@partner.samsung.com> | 2022-09-07 17:18:04 +0200 |
---|---|---|
committer | Karol Lewandowski <k.lewandowsk@samsung.com> | 2022-09-09 10:32:16 +0200 |
commit | b1d44e735884de730bd64290110a2472e103f8c3 (patch) | |
tree | f40b20940517b9f7a7a3f2a4db48aa074f23f751 | |
parent | ca9eebe38d1f958dd5a79dba2151f8bf4c636658 (diff) | |
download | sessiond-b1d44e735884de730bd64290110a2472e103f8c3.tar.gz sessiond-b1d44e735884de730bd64290110a2472e103f8c3.tar.bz2 sessiond-b1d44e735884de730bd64290110a2472e103f8c3.zip |
Modify sessiond integration tests to conform to the changes in setting
ownership of user app subdirectories
Change-Id: Ic7b33dc1783421288007f6d57a30173aff6b86d1
-rwxr-xr-x | tests/integration/sessiond-integration-tests.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/integration/sessiond-integration-tests.sh b/tests/integration/sessiond-integration-tests.sh index 883f8e3..4aea012 100755 --- a/tests/integration/sessiond-integration-tests.sh +++ b/tests/integration/sessiond-integration-tests.sh @@ -110,8 +110,9 @@ done userid=$(getent passwd "$TESTUSER" | cut -d: -f3) homedir=$(getent passwd "$TESTUSER" | cut -d: -f6) +apps_rwdir="${homedir}/apps_rw" -verbose_echo "User id: $userid, home directory: $homedir" +verbose_echo "User id: $userid, home directory: $homedir, apps_rw user directory: $apps_rwdir" create_test_users @@ -128,12 +129,17 @@ for subsession in "${TEST_SUBSESSIONS[@]}"; do do verbose_echo "Checking $f..." templf="${f/"$subsession_dir"/$skeldir}" + userf="${f/"$subsession_dir"/$apps_rwdir}" # Check if permissions are correct usergroup=$(stat --format '%U:%G' "$f") user=$(echo "$usergroup" | cut -d: -f1) group=$(echo "$usergroup" | cut -d: -f2) - if [ "$user" != "$TESTUSER" ] || [ "$group" != "$GROUP" ]; then + u_usergroup=$(stat --format '%U:%G' "$userf") + u_user=$(echo "$u_usergroup" | cut -d: -f1) + u_group=$(echo "$u_usergroup" | cut -d: -f2) + + if [ "$user" != "$TESTUSER" ] || [ "$group" != "$u_group" ]; then echo "$f: incorrect permissions set!" exit 1 fi |