tests: Escape periods when appropriate

Don't match any character in a regular expression when we only want to
match a period.

Closes: #1834
Approved by: rfairley
This commit is contained in:
Matthew Leeds authored and Atomic Bot committed 2019-04-11 14:28:32 +00:00
1 parent 077b23cc98
commit dd6844a61e
19 files changed
+141 -141

No files matched your search

@@ -25,17 +25,17 @@ setfattr -n security.crunchy -v withketchup co/usr/bin
csum=$(ostree commit -b testref --link-checkout-speedup --tree=dir=co)
ostree fsck
ostree ls -X testref ${victim_symlink} > ls.txt
assert_file_has_content ls.txt 'security.biometric'
assert_file_has_content ls.txt 'security\.biometric'
ostree ls -X ${host_refspec} ${victim_symlink} > ls.txt
assert_not_file_has_content ls.txt security.biometric
assert_not_file_has_content ls.txt security\.biometric
ostree ls -X testref usr/bin > ls.txt
assert_file_has_content ls.txt 'security.crunchy'
assert_file_has_content ls.txt 'security\.crunchy'
ostree checkout -H testref co-testref
getfattr -n security.biometric co-testref/${victim_symlink} > xattr.txt
assert_file_has_content xattr.txt 'security.biometric="iris"'
assert_file_has_content xattr.txt 'security\.biometric="iris"'
getfattr -n security.crunchy co-testref/usr/bin > xattr.txt
assert_file_has_content xattr.txt 'security.crunchy="withketchup"'
assert_file_has_content xattr.txt 'security\.crunchy="withketchup"'
rm co -rf
rm co-testref -rf
@@ -35,7 +35,7 @@ ostree --repo=repo commit --selinux-policy / -b rootfs --link-checkout-speedup -
ostree --repo=repo ls rootfs /usr/bin/systemd >ls.txt
assert_file_has_content ls.txt '^-007.. 0 0 .*/usr/bin/systemd'
ostree --repo=repo ls -X rootfs /usr/lib/dbus-daemon-helper >ls.txt
assert_file_has_content ls.txt '^-007.. 0 81 .*security.selinux.*/usr/lib/dbus-daemon-helper'
assert_not_file_has_content ls.txt 'user.ostreemeta'
assert_file_has_content ls.txt '^-007.. 0 81 .*security\.selinux.*/usr/lib/dbus-daemon-helper'
assert_not_file_has_content ls.txt 'user\.ostreemeta'
echo "ok bare-user link-checkout-speedup with modified xattrs maintains uids"
date