mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 07:30:10 +01:00
platform/test: disable bonding tests if no bonding module is available
Co-Authored-By: Thomas Haller <thaller@redhat.com> Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
79a99613c2
commit
accd10b501
1 changed files with 8 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#include "test-common.h"
|
||||
#include "nm-test-utils.h"
|
||||
|
||||
#define LO_INDEX 1
|
||||
#define LO_NAME "lo"
|
||||
|
|
@ -348,6 +349,13 @@ test_bridge (void)
|
|||
static void
|
||||
test_bond (void)
|
||||
{
|
||||
if (SETUP == nm_linux_platform_setup &&
|
||||
!g_file_test ("/proc/1/net/bonding", G_FILE_TEST_IS_DIR) &&
|
||||
system("modprobe --show bonding") != 0) {
|
||||
g_test_skip ("Skipping test for bonding: bonding module not available");
|
||||
return;
|
||||
}
|
||||
|
||||
test_software (NM_LINK_TYPE_BOND, "bond");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue