[apparmor] [PATCH v2 01/11] tests: Exit with error from unix_client if execl() fails

Tyler Hicks tyhicks at canonical.com
Mon Sep 15 19:55:54 UTC 2014


Signed-off-by: Tyler Hicks <tyhicks at canonical.com>
---
 tests/regression/apparmor/unix_socket.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/regression/apparmor/unix_socket.c b/tests/regression/apparmor/unix_socket.c
index b6dc0dd..3d86225 100644
--- a/tests/regression/apparmor/unix_socket.c
+++ b/tests/regression/apparmor/unix_socket.c
@@ -159,7 +159,8 @@ int main (int argc, char *argv[])
 		exit(1);
 	} else if (!pid) {
 		execl(argv[4], argv[4], sun_path, argv[2], NULL);
-		exit(0);
+		perror("FAIL - execl");
+		exit(1);
 	}
 
 	pfd.fd = sock;
-- 
2.1.0




More information about the AppArmor mailing list