[vlc-commits] tls: fix coverage report
Rémi Denis-Courmont
git at videolan.org
Mon Jan 11 18:40:39 CET 2016
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Jan 11 19:39:25 2016 +0200| [ff14507829dab79f86bb7ce3e18925bbf5ae2986] | committer: Rémi Denis-Courmont
tls: fix coverage report
GCC coverage does not like exec*().
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ff14507829dab79f86bb7ce3e18925bbf5ae2986
---
test/modules/misc/tls.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/test/modules/misc/tls.c b/test/modules/misc/tls.c
index 03ec1ae..fa373ae 100644
--- a/test/modules/misc/tls.c
+++ b/test/modules/misc/tls.c
@@ -148,6 +148,7 @@ int main(void)
return 77;
}
+ assert(!strncmp(homedir, "/tmp/vlc-test-", 14));
setenv("HOME", homedir, 1);
setenv("VLC_PLUGIN_PATH", "../modules", 1);
@@ -237,7 +238,7 @@ int main(void)
vlc_tls_Delete(server_creds);
libvlc_release(vlc);
- if (!strncmp(homedir, "/tmp/vlc-test-", 14))
+ if (fork() == 0)
execlp("rm", "rm", "-rf", homedir, (char *)NULL);
- return 1;
+ return 0;
}
More information about the vlc-commits
mailing list