From 6e5fbf096aa55eb33c6d9ea6533766aa2ea77170 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Sat, 31 Oct 2015 22:36:07 +0100 Subject: [PATCH] test: don't fail if setting /sys as a slave mount doesn't succeed Maybe it's not mounted in the first place. We could be running in a chroot without /sys mounted, etc. Also, the error message was wrong. --- src/platform/tests/test-common.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/platform/tests/test-common.c b/src/platform/tests/test-common.c index e5308bcb75..af41a0380e 100644 --- a/src/platform/tests/test-common.c +++ b/src/platform/tests/test-common.c @@ -878,10 +878,7 @@ main (int argc, char **argv) /* Mount our /sys instance, so that gudev sees only our devices. * Needs to be read-only, because we don't run udev. */ - if (mount (NULL, "/sys", "sysfs", MS_SLAVE, NULL) != 0) { - errsv = errno; - g_error ("mount(\"/\", MS_SLAVE) failed with %s (%d)", strerror (errsv), errsv); - } + mount (NULL, "/sys", "sysfs", MS_SLAVE, NULL); if (mount ("sys", "/sys", "sysfs", MS_RDONLY, NULL) != 0) { errsv = errno; g_error ("mount(\"/sys\") failed with %s (%d)", strerror (errsv), errsv);