summaryrefslogtreecommitdiff
path: root/tests/libtest-core.sh
diff options
context:
space:
mode:
authorJonathan Lebon <jlebon@redhat.com>2017-06-02 10:09:23 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2017-06-02 17:46:16 +0000
commita32c6d2c70c82b583e8ee7c2a2f4e00b0d888fe5 (patch)
tree042550cc67e2f8b5447ed1ce9207c33dd7272391 /tests/libtest-core.sh
parent3ec2b5773ea1553a70c362c25574978b7bbc932a (diff)
downloadostree-a32c6d2c70c82b583e8ee7c2a2f4e00b0d888fe5.tar.gz
checkout: also chmod in the user checkout case
When falling back to copying, we previously would only chmod checked out files in the non-user-checkout mode. Fix this by always doing chmod. The file_mode was being prepared but never actually applied. Add a basic test in the archive-z2 --> usermode checkout case in which we're guaranteed to always fall back to copy mode. Closes: #633 Closes: #903 Approved by: cgwalters
Diffstat (limited to 'tests/libtest-core.sh')
-rw-r--r--tests/libtest-core.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/libtest-core.sh b/tests/libtest-core.sh
index 14d9cd5c..de850544 100644
--- a/tests/libtest-core.sh
+++ b/tests/libtest-core.sh
@@ -110,6 +110,13 @@ assert_file_has_content_literal () {
fi
}
+assert_file_has_mode () {
+ mode=$(stat -c '%a' $1)
+ if [ "$mode" != "$2" ]; then
+ fatal "File '$1' has wrong mode: expected $2, but got $mode"
+ fi
+}
+
assert_symlink_has_content () {
if ! test -L "$1"; then
fatal "File '$1' is not a symbolic link"