From 7b431faaf1c7be36eaaa01215a394c085b2bce7e Mon Sep 17 00:00:00 2001 From: Krzysztof Jackiewicz Date: Fri, 29 Mar 2013 11:31:59 +0100 Subject: [PATCH] Test binaries added to middleware list [Issue#] N/A [Feature/Bug] N/A [Problem] security-server tests binaries are not present in allowed middleware list. Because of that tests fail on rsa image. [Cause] N/A [Solution] Test binaries are added in postinstall [Verification] Build and install test package on rsa image. Check /usr/share/security-server/mw-list. Test binaries should be added to the list. Install package again. There should be no duplicates. Run tests for client-smack, label and server. Results should be identical to those from slp image. Change-Id: Idc66e54ffbe3a430ceff6602856863c1e27148eb --- packaging/security-tests.spec | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packaging/security-tests.spec b/packaging/security-tests.spec index fb9024c4..a739db44 100644 --- a/packaging/security-tests.spec +++ b/packaging/security-tests.spec @@ -40,6 +40,15 @@ rm -rf %{buildroot} %post find /etc/smack/test_privilege_control_DIR/ -type f -name exec -exec chmod 0755 {} + +# add test binaries to mw-list if it's not already there +BINARIES[0]="/usr/bin/security-server-tests-client-smack" +BINARIES[1]="/usr/bin/security-server-tests-label" +BINARIES[2]="/usr/bin/security-server-tests-server" +for BINARY in "${BINARIES[@]}" +do + grep -q $BINARY /usr/share/security-server/mw-list\ + || echo $BINARY >> /usr/share/security-server/mw-list +done echo "security-tests postinst done ..." %postun -- 2.34.1