[PATCH libvirt-glib 4/5] tests: Don't rely on non-portable paths

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The test-events program sets up a watch on /bin/true; however,
that path is not portable: FreeBSD uses /usr/bin/true for example.

Remove the portability issue by using /dev/null instead.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 tests/test-events.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/test-events.c b/tests/test-events.c
index 0c0e929..6845243 100644
--- a/tests/test-events.c
+++ b/tests/test-events.c
@@ -98,7 +98,7 @@ static gboolean test_watch(gpointer user_data G_GNUC_UNUSED)
 static void test_remove_disabled_watch(void)
 {
     main_loop = g_main_loop_new(NULL, FALSE);
-    watch_fd = open("/bin/true", O_RDONLY);
+    watch_fd = open("/dev/null", O_RDONLY);
     g_idle_add(test_watch, NULL);
     g_main_loop_run(main_loop);
     g_main_loop_unref(main_loop);
-- 
2.13.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux