|
Packit Service |
dff8e4 |
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
|
Packit Service |
dff8e4 |
/*
|
|
Packit Service |
dff8e4 |
* Copyright (C) 2014 - 2018 Red Hat, Inc.
|
|
Packit Service |
dff8e4 |
*/
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
#include "src/core/nm-default-daemon.h"
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
#include <stdio.h>
|
|
Packit Service |
dff8e4 |
#include <stdarg.h>
|
|
Packit Service |
dff8e4 |
#include <unistd.h>
|
|
Packit Service |
dff8e4 |
#include <netinet/in.h>
|
|
Packit Service |
dff8e4 |
#include <arpa/inet.h>
|
|
Packit Service |
dff8e4 |
#include <sys/socket.h>
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
#include "libnm-core-intern/nm-core-internal.h"
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
#include "nm-initrd-generator/nm-initrd-generator.h"
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
#include "libnm-glib-aux/nm-test-utils.h"
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
#define TEST_INITRD_DIR NM_BUILD_SRCDIR "/src/nm-initrd-generator/tests"
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
/*****************************************************************************/
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
static NMConnection *
|
|
Packit Service |
dff8e4 |
read_connection(const char *sysfs_dir, const char *expected_mac, GError **error)
|
|
Packit Service |
dff8e4 |
{
|
|
Packit Service |
dff8e4 |
NMConnection * connection = NULL;
|
|
Packit Service |
dff8e4 |
gs_unref_hashtable GHashTable *ibft = NULL;
|
|
Packit Service |
dff8e4 |
gs_free char * mac = NULL;
|
|
Packit Service |
dff8e4 |
GHashTable * nic = NULL;
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
ibft = nmi_ibft_read(sysfs_dir);
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
mac = g_ascii_strup(expected_mac, -1);
|
|
Packit Service |
dff8e4 |
nic = g_hash_table_lookup(ibft, mac);
|
|
Packit Service |
dff8e4 |
if (!nic)
|
|
Packit Service |
dff8e4 |
return NULL;
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
connection = nm_simple_connection_new();
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
if (!nmi_ibft_update_connection_from_nic(connection, nic, error))
|
|
Packit Service |
dff8e4 |
g_clear_object(&connection);
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
return connection;
|
|
Packit Service |
dff8e4 |
}
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
static void
|
|
Packit Service |
dff8e4 |
test_read_ibft_dhcp(void)
|
|
Packit Service |
dff8e4 |
{
|
|
Packit Service |
dff8e4 |
NMConnection * connection;
|
|
Packit Service |
dff8e4 |
NMSettingConnection *s_con;
|
|
Packit Service |
dff8e4 |
NMSettingWired * s_wired;
|
|
Packit Service |
dff8e4 |
NMSettingIPConfig * s_ip4;
|
|
Packit Service |
dff8e4 |
NMSettingIPConfig * s_ip6;
|
|
Packit Service |
dff8e4 |
GError * error = NULL;
|
|
Packit Service |
dff8e4 |
const char * mac_address;
|
|
Packit Service |
dff8e4 |
const char * expected_mac_address = "00:33:21:98:b9:f1";
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
connection = read_connection(TEST_INITRD_DIR "/sysfs-dhcp", expected_mac_address, &error);
|
|
Packit Service |
dff8e4 |
g_assert_no_error(error);
|
|
Packit Service |
dff8e4 |
nmtst_assert_connection_verifies_without_normalization(connection);
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
g_assert(!nm_connection_get_setting_vlan(connection));
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
s_con = nm_connection_get_setting_connection(connection);
|
|
Packit Service |
dff8e4 |
g_assert(s_con);
|
|
Packit Service |
dff8e4 |
g_assert_cmpstr(nm_setting_connection_get_connection_type(s_con),
|
|
Packit Service |
dff8e4 |
==,
|
|
Packit Service |
dff8e4 |
NM_SETTING_WIRED_SETTING_NAME);
|
|
Packit Service |
dff8e4 |
g_assert_cmpstr(nm_setting_connection_get_id(s_con), ==, "iBFT Connection 1");
|
|
Packit Service |
dff8e4 |
g_assert_cmpstr(nm_setting_connection_get_interface_name(s_con), ==, NULL);
|
|
Packit Service |
dff8e4 |
g_assert_cmpint(nm_setting_connection_get_timestamp(s_con), ==, 0);
|
|
Packit Service |
dff8e4 |
g_assert(nm_setting_connection_get_autoconnect(s_con));
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
s_wired = nm_connection_get_setting_wired(connection);
|
|
Packit Service |
dff8e4 |
g_assert(s_wired);
|
|
Packit Service |
dff8e4 |
mac_address = nm_setting_wired_get_mac_address(s_wired);
|
|
Packit Service |
dff8e4 |
g_assert(mac_address);
|
|
Packit Service |
dff8e4 |
g_assert(nm_utils_hwaddr_matches(mac_address, -1, expected_mac_address, -1));
|
|
Packit Service |
dff8e4 |
g_assert_cmpint(nm_setting_wired_get_mtu(s_wired), ==, 0);
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
s_ip4 = nm_connection_get_setting_ip4_config(connection);
|
|
Packit Service |
dff8e4 |
g_assert(s_ip4);
|
|
Packit Service |
dff8e4 |
g_assert_cmpstr(nm_setting_ip_config_get_method(s_ip4), ==, NM_SETTING_IP4_CONFIG_METHOD_AUTO);
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
s_ip6 = nm_connection_get_setting_ip6_config(connection);
|
|
Packit Service |
dff8e4 |
g_assert(s_ip6);
|
|
Packit Service |
dff8e4 |
g_assert_cmpstr(nm_setting_ip_config_get_method(s_ip6),
|
|
Packit Service |
dff8e4 |
==,
|
|
Packit Service |
dff8e4 |
NM_SETTING_IP6_CONFIG_METHOD_DISABLED);
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
g_object_unref(connection);
|
|
Packit Service |
dff8e4 |
}
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
static void
|
|
Packit Service |
dff8e4 |
test_read_ibft_static(void)
|
|
Packit Service |
dff8e4 |
{
|
|
Packit Service |
dff8e4 |
NMConnection * connection;
|
|
Packit Service |
dff8e4 |
NMSettingConnection *s_con;
|
|
Packit Service |
dff8e4 |
NMSettingWired * s_wired;
|
|
Packit Service |
dff8e4 |
NMSettingIPConfig * s_ip4;
|
|
Packit Service |
dff8e4 |
NMSettingIPConfig * s_ip6;
|
|
Packit Service |
dff8e4 |
GError * error = NULL;
|
|
Packit Service |
dff8e4 |
const char * mac_address;
|
|
Packit Service |
dff8e4 |
const char * expected_mac_address = "00:33:21:98:b9:f0";
|
|
Packit Service |
dff8e4 |
NMIPAddress * ip4_addr;
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
connection = read_connection(TEST_INITRD_DIR "/sysfs-static", expected_mac_address, &error);
|
|
Packit Service |
dff8e4 |
g_assert_no_error(error);
|
|
Packit Service |
dff8e4 |
nmtst_assert_connection_verifies_without_normalization(connection);
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
g_assert(!nm_connection_get_setting_vlan(connection));
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
s_con = nm_connection_get_setting_connection(connection);
|
|
Packit Service |
dff8e4 |
g_assert(s_con);
|
|
Packit Service |
dff8e4 |
g_assert_cmpstr(nm_setting_connection_get_connection_type(s_con),
|
|
Packit Service |
dff8e4 |
==,
|
|
Packit Service |
dff8e4 |
NM_SETTING_WIRED_SETTING_NAME);
|
|
Packit Service |
dff8e4 |
g_assert_cmpstr(nm_setting_connection_get_id(s_con), ==, "iBFT Connection 0");
|
|
Packit Service |
dff8e4 |
g_assert_cmpstr(nm_setting_connection_get_interface_name(s_con), ==, NULL);
|
|
Packit Service |
dff8e4 |
g_assert_cmpint(nm_setting_connection_get_timestamp(s_con), ==, 0);
|
|
Packit Service |
dff8e4 |
g_assert(nm_setting_connection_get_autoconnect(s_con));
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
s_wired = nm_connection_get_setting_wired(connection);
|
|
Packit Service |
dff8e4 |
g_assert(s_wired);
|
|
Packit Service |
dff8e4 |
mac_address = nm_setting_wired_get_mac_address(s_wired);
|
|
Packit Service |
dff8e4 |
g_assert(mac_address);
|
|
Packit Service |
dff8e4 |
g_assert(nm_utils_hwaddr_matches(mac_address, -1, expected_mac_address, -1));
|
|
Packit Service |
dff8e4 |
g_assert_cmpint(nm_setting_wired_get_mtu(s_wired), ==, 0);
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
s_ip4 = nm_connection_get_setting_ip4_config(connection);
|
|
Packit Service |
dff8e4 |
g_assert(s_ip4);
|
|
Packit Service |
dff8e4 |
g_assert_cmpstr(nm_setting_ip_config_get_method(s_ip4),
|
|
Packit Service |
dff8e4 |
==,
|
|
Packit Service |
dff8e4 |
NM_SETTING_IP4_CONFIG_METHOD_MANUAL);
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
g_assert_cmpint(nm_setting_ip_config_get_num_dns(s_ip4), ==, 2);
|
|
Packit Service |
dff8e4 |
g_assert_cmpstr(nm_setting_ip_config_get_dns(s_ip4, 0), ==, "10.16.255.2");
|
|
Packit Service |
dff8e4 |
g_assert_cmpstr(nm_setting_ip_config_get_dns(s_ip4, 1), ==, "10.16.255.3");
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
g_assert_cmpint(nm_setting_ip_config_get_num_addresses(s_ip4), ==, 1);
|
|
Packit Service |
dff8e4 |
ip4_addr = nm_setting_ip_config_get_address(s_ip4, 0);
|
|
Packit Service |
dff8e4 |
g_assert(ip4_addr);
|
|
Packit Service |
dff8e4 |
g_assert_cmpstr(nm_ip_address_get_address(ip4_addr), ==, "192.168.32.72");
|
|
Packit Service |
dff8e4 |
g_assert_cmpint(nm_ip_address_get_prefix(ip4_addr), ==, 22);
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
g_assert_cmpstr(nm_setting_ip_config_get_gateway(s_ip4), ==, "192.168.35.254");
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
s_ip6 = nm_connection_get_setting_ip6_config(connection);
|
|
Packit Service |
dff8e4 |
g_assert(s_ip6);
|
|
Packit Service |
dff8e4 |
g_assert_cmpstr(nm_setting_ip_config_get_method(s_ip6),
|
|
Packit Service |
dff8e4 |
==,
|
|
Packit Service |
dff8e4 |
NM_SETTING_IP6_CONFIG_METHOD_DISABLED);
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
g_object_unref(connection);
|
|
Packit Service |
dff8e4 |
}
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
static void
|
|
Packit Service |
dff8e4 |
test_read_ibft_bad_address(gconstpointer user_data)
|
|
Packit Service |
dff8e4 |
{
|
|
Packit Service |
dff8e4 |
const char * sysfs_dir = user_data;
|
|
Packit Service |
dff8e4 |
NMConnection *connection;
|
|
Packit Service |
dff8e4 |
GError * error = NULL;
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
g_assert(g_file_test(sysfs_dir, G_FILE_TEST_EXISTS));
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
connection = read_connection(sysfs_dir, "00:33:21:98:b9:f0", &error);
|
|
Packit Service |
dff8e4 |
g_assert(connection == NULL);
|
|
Packit Service |
dff8e4 |
g_assert(error);
|
|
Packit Service |
dff8e4 |
g_clear_error(&error);
|
|
Packit Service |
dff8e4 |
}
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
static void
|
|
Packit Service |
dff8e4 |
test_read_ibft_vlan(void)
|
|
Packit Service |
dff8e4 |
{
|
|
Packit Service |
dff8e4 |
NMConnection * connection;
|
|
Packit Service |
dff8e4 |
NMSettingConnection *s_con;
|
|
Packit Service |
dff8e4 |
NMSettingWired * s_wired;
|
|
Packit Service |
dff8e4 |
NMSettingVlan * s_vlan;
|
|
Packit Service |
dff8e4 |
NMSettingIPConfig * s_ip4;
|
|
Packit Service |
dff8e4 |
const char * mac_address;
|
|
Packit Service |
dff8e4 |
const char * expected_mac_address = "00:33:21:98:b9:f0";
|
|
Packit Service |
dff8e4 |
NMIPAddress * ip4_addr;
|
|
Packit Service |
dff8e4 |
GError * error = NULL;
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
connection = read_connection(TEST_INITRD_DIR "/sysfs-vlan", expected_mac_address, &error);
|
|
Packit Service |
dff8e4 |
g_assert_no_error(error);
|
|
Packit Service |
dff8e4 |
nmtst_assert_connection_verifies_without_normalization(connection);
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
s_con = nm_connection_get_setting_connection(connection);
|
|
Packit Service |
dff8e4 |
g_assert(s_con);
|
|
Packit Service |
dff8e4 |
g_assert_cmpstr(nm_setting_connection_get_connection_type(s_con),
|
|
Packit Service |
dff8e4 |
==,
|
|
Packit Service |
dff8e4 |
NM_SETTING_VLAN_SETTING_NAME);
|
|
Packit Service |
dff8e4 |
g_assert_cmpstr(nm_setting_connection_get_interface_name(s_con), ==, NULL);
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
/* ===== WIRED SETTING ===== */
|
|
Packit Service |
dff8e4 |
s_wired = nm_connection_get_setting_wired(connection);
|
|
Packit Service |
dff8e4 |
g_assert(s_wired);
|
|
Packit Service |
dff8e4 |
mac_address = nm_setting_wired_get_mac_address(s_wired);
|
|
Packit Service |
dff8e4 |
g_assert(mac_address);
|
|
Packit Service |
dff8e4 |
g_assert(nm_utils_hwaddr_matches(mac_address, -1, expected_mac_address, -1));
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
/* ===== VLAN SETTING ===== */
|
|
Packit Service |
dff8e4 |
s_vlan = nm_connection_get_setting_vlan(connection);
|
|
Packit Service |
dff8e4 |
g_assert(s_vlan);
|
|
Packit Service |
dff8e4 |
g_assert_cmpint(nm_setting_vlan_get_id(s_vlan), ==, 123);
|
|
Packit Service |
dff8e4 |
g_assert_cmpstr(nm_setting_vlan_get_parent(s_vlan), ==, NULL);
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
/* ===== IPv4 SETTING ===== */
|
|
Packit Service |
dff8e4 |
s_ip4 = nm_connection_get_setting_ip4_config(connection);
|
|
Packit Service |
dff8e4 |
g_assert(s_ip4);
|
|
Packit Service |
dff8e4 |
g_assert_cmpstr(nm_setting_ip_config_get_method(s_ip4),
|
|
Packit Service |
dff8e4 |
==,
|
|
Packit Service |
dff8e4 |
NM_SETTING_IP4_CONFIG_METHOD_MANUAL);
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
g_assert_cmpint(nm_setting_ip_config_get_num_dns(s_ip4), ==, 0);
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
g_assert_cmpint(nm_setting_ip_config_get_num_addresses(s_ip4), ==, 1);
|
|
Packit Service |
dff8e4 |
ip4_addr = nm_setting_ip_config_get_address(s_ip4, 0);
|
|
Packit Service |
dff8e4 |
g_assert(ip4_addr);
|
|
Packit Service |
dff8e4 |
g_assert_cmpstr(nm_ip_address_get_address(ip4_addr), ==, "192.168.6.200");
|
|
Packit Service |
dff8e4 |
g_assert_cmpint(nm_ip_address_get_prefix(ip4_addr), ==, 24);
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
g_assert_cmpstr(nm_setting_ip_config_get_gateway(s_ip4), ==, NULL);
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
g_object_unref(connection);
|
|
Packit Service |
dff8e4 |
}
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
static void
|
|
Packit Service |
dff8e4 |
test_read_ibft(void)
|
|
Packit Service |
dff8e4 |
{
|
|
Packit Service |
dff8e4 |
NMConnection * connection;
|
|
Packit Service |
dff8e4 |
NMSettingIPConfig *s_ip4;
|
|
Packit Service |
dff8e4 |
NMSettingIPConfig *s_ip6;
|
|
Packit Service |
dff8e4 |
GError * error = NULL;
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
/* This test doesn't actually test too much (apart from the presence of
|
|
Packit Service |
dff8e4 |
* IPv6 that is not covered by other tests), but the test fixture is a good
|
|
Packit Service |
dff8e4 |
* example of about everything that can be included in iBFT table (as of
|
|
Packit Service |
dff8e4 |
* ACPI 3.0b). */
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
connection = read_connection(TEST_INITRD_DIR "/sysfs", "00:53:00:AB:00:01", &error);
|
|
Packit Service |
dff8e4 |
g_assert(connection);
|
|
Packit Service |
dff8e4 |
g_assert_no_error(error);
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
s_ip4 = nm_connection_get_setting_ip4_config(connection);
|
|
Packit Service |
dff8e4 |
nmtst_assert_connection_verifies_without_normalization(connection);
|
|
Packit Service |
dff8e4 |
g_assert(nm_setting_ip_config_get_num_addresses(s_ip4) == 0);
|
|
Packit Service |
dff8e4 |
g_assert_cmpstr(nm_setting_ip_config_get_method(s_ip4),
|
|
Packit Service |
dff8e4 |
==,
|
|
Packit Service |
dff8e4 |
NM_SETTING_IP4_CONFIG_METHOD_DISABLED);
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
s_ip6 = nm_connection_get_setting_ip6_config(connection);
|
|
Packit Service |
dff8e4 |
g_assert(nm_setting_ip_config_get_num_addresses(s_ip6) == 1);
|
|
Packit Service |
dff8e4 |
g_assert_cmpstr(nm_setting_ip_config_get_method(s_ip6), ==, NM_SETTING_IP6_CONFIG_METHOD_AUTO);
|
|
Packit Service |
dff8e4 |
g_object_unref(connection);
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
connection = read_connection(TEST_INITRD_DIR "/sysfs", "00:53:06:66:AB:01", &error);
|
|
Packit Service |
dff8e4 |
g_assert(connection);
|
|
Packit Service |
dff8e4 |
g_assert_no_error(error);
|
|
Packit Service |
dff8e4 |
nmtst_assert_connection_verifies_without_normalization(connection);
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
s_ip4 = nm_connection_get_setting_ip4_config(connection);
|
|
Packit Service |
dff8e4 |
g_assert(nm_setting_ip_config_get_num_addresses(s_ip4) == 1);
|
|
Packit Service |
dff8e4 |
g_assert_cmpstr(nm_setting_ip_config_get_method(s_ip4), ==, NM_SETTING_IP4_CONFIG_METHOD_AUTO);
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
s_ip6 = nm_connection_get_setting_ip6_config(connection);
|
|
Packit Service |
dff8e4 |
g_assert(nm_setting_ip_config_get_num_addresses(s_ip6) == 0);
|
|
Packit Service |
dff8e4 |
g_assert_cmpstr(nm_setting_ip_config_get_method(s_ip6),
|
|
Packit Service |
dff8e4 |
==,
|
|
Packit Service |
dff8e4 |
NM_SETTING_IP6_CONFIG_METHOD_DISABLED);
|
|
Packit Service |
dff8e4 |
g_object_unref(connection);
|
|
Packit Service |
dff8e4 |
}
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
NMTST_DEFINE();
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
int
|
|
Packit Service |
dff8e4 |
main(int argc, char **argv)
|
|
Packit Service |
dff8e4 |
{
|
|
Packit Service |
dff8e4 |
nmtst_init_assert_logging(&argc, &argv, "INFO", "DEFAULT");
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
g_test_add_func("/initrd/ibft", test_read_ibft);
|
|
Packit Service |
dff8e4 |
g_test_add_func("/initrd/ibft/dhcp", test_read_ibft_dhcp);
|
|
Packit Service |
dff8e4 |
g_test_add_func("/initrd/ibft/static", test_read_ibft_static);
|
|
Packit Service |
dff8e4 |
g_test_add_func("/initrd/ibft/vlan", test_read_ibft_vlan);
|
|
Packit Service |
dff8e4 |
g_test_add_data_func("/initrd/ibft/bad-ipaddr-read",
|
|
Packit Service |
dff8e4 |
TEST_INITRD_DIR "/sysfs-bad-ipaddr",
|
|
Packit Service |
dff8e4 |
test_read_ibft_bad_address);
|
|
Packit Service |
dff8e4 |
g_test_add_data_func("/initrd/ibft/bad-gateway-read",
|
|
Packit Service |
dff8e4 |
TEST_INITRD_DIR "/sysfs-bad-gateway",
|
|
Packit Service |
dff8e4 |
test_read_ibft_bad_address);
|
|
Packit Service |
dff8e4 |
g_test_add_data_func("/initrd/ibft/bad-dns1-read",
|
|
Packit Service |
dff8e4 |
TEST_INITRD_DIR "/sysfs-bad-dns1",
|
|
Packit Service |
dff8e4 |
test_read_ibft_bad_address);
|
|
Packit Service |
dff8e4 |
g_test_add_data_func("/initrd/ibft/bad-dns2-read",
|
|
Packit Service |
dff8e4 |
TEST_INITRD_DIR "/sysfs-bad-dns2",
|
|
Packit Service |
dff8e4 |
test_read_ibft_bad_address);
|
|
Packit Service |
dff8e4 |
|
|
Packit Service |
dff8e4 |
return g_test_run();
|
|
Packit Service |
dff8e4 |
}
|