tests: net: ieee802154: Remove extra newlines from prints

As the logger will add newlines to printed strings, do not
add them in the tests.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This commit is contained in:
Jukka Rissanen 2024-05-27 18:48:48 +03:00 committed by Carles Cufí
commit 48aaa1ff40
2 changed files with 18 additions and 18 deletions

View file

@ -36,14 +36,14 @@ static int fake_cca(const struct device *dev)
static int fake_set_channel(const struct device *dev, uint16_t channel)
{
NET_INFO("Channel %u\n", channel);
NET_INFO("Channel %u", channel);
return 0;
}
static int fake_set_txpower(const struct device *dev, int16_t dbm)
{
NET_INFO("TX power %d dbm\n", dbm);
NET_INFO("TX power %d dbm", dbm);
return 0;
}
@ -68,7 +68,7 @@ static int fake_tx(const struct device *dev,
struct net_pkt *pkt,
struct net_buf *frag)
{
NET_INFO("Sending packet %p - length %zu\n",
NET_INFO("Sending packet %p - length %zu",
pkt, net_pkt_get_len(pkt));
if (!current_pkt) {
@ -86,12 +86,12 @@ static int fake_tx(const struct device *dev,
ack_pkt = net_pkt_rx_alloc_with_buffer(iface, IEEE802154_ACK_PKT_LENGTH, AF_UNSPEC,
0, K_FOREVER);
if (!ack_pkt) {
NET_ERR("*** Could not allocate ack pkt.\n");
NET_ERR("*** Could not allocate ack pkt.");
return -ENOMEM;
}
if (!ieee802154_create_ack_frame(iface, ack_pkt, ctx->ack_seq)) {
NET_ERR("*** Could not create ack frame.\n");
NET_ERR("*** Could not create ack frame.");
net_pkt_unref(ack_pkt);
return -EFAULT;
}
@ -107,14 +107,14 @@ static int fake_tx(const struct device *dev,
static int fake_start(const struct device *dev)
{
NET_INFO("FAKE ieee802154 driver started\n");
NET_INFO("FAKE ieee802154 driver started");
return 0;
}
static int fake_stop(const struct device *dev)
{
NET_INFO("FAKE ieee802154 driver stopped\n");
NET_INFO("FAKE ieee802154 driver stopped");
return 0;
}
@ -146,7 +146,7 @@ static void fake_iface_init(struct net_if *iface)
ctx->channel = 26U;
ctx->sequence = 62U;
NET_INFO("FAKE ieee802154 iface initialized\n");
NET_INFO("FAKE ieee802154 iface initialized");
}
static int fake_init(const struct device *dev)

View file

@ -136,7 +136,7 @@ static void test_scan_shell_cmd(void)
if (!ieee802154_validate_frame(net_pkt_data(current_pkt), net_pkt_get_len(current_pkt),
&mpdu)) {
NET_ERR("*** Could not parse beacon request.\n");
NET_ERR("*** Could not parse beacon request.");
ztest_test_fail();
goto release_frag;
}
@ -179,7 +179,7 @@ static void test_associate_shell_cmd(struct ieee802154_context *ctx)
zassert_not_null(assoc_req);
if (!ieee802154_validate_frame(assoc_req->data, assoc_req->len, &mpdu)) {
NET_ERR("*** Could not parse association request.\n");
NET_ERR("*** Could not parse association request.");
ztest_test_fail();
goto release_frag;
}
@ -207,7 +207,7 @@ ZTEST(ieee802154_l2_shell, test_active_scan)
pkt = net_pkt_rx_alloc_with_buffer(net_iface, sizeof(beacon_pkt), AF_UNSPEC, 0, K_FOREVER);
if (!pkt) {
NET_ERR("*** No buffer to allocate\n");
NET_ERR("*** No buffer to allocate");
goto fail;
}
@ -253,7 +253,7 @@ ZTEST(ieee802154_l2_shell, test_associate)
pkt = ieee802154_create_mac_cmd_frame(net_iface, IEEE802154_CFI_ASSOCIATION_RESPONSE,
&params);
if (!pkt) {
NET_ERR("*** Could not create association response\n");
NET_ERR("*** Could not create association response");
goto fail;
}
@ -313,7 +313,7 @@ ZTEST(ieee802154_l2_shell, test_initiate_disassociation_from_enddevice)
if (!ieee802154_validate_frame(net_pkt_data(current_pkt), net_pkt_get_len(current_pkt),
&mpdu)) {
NET_ERR("*** Could not parse disassociation notification.\n");
NET_ERR("*** Could not parse disassociation notification.");
ztest_test_fail();
goto release_frag;
}
@ -353,7 +353,7 @@ ZTEST(ieee802154_l2_shell, test_initiate_disassociation_from_coordinator)
pkt = ieee802154_create_mac_cmd_frame(net_iface, IEEE802154_CFI_DISASSOCIATION_NOTIFICATION,
&params);
if (!pkt) {
NET_ERR("*** Could not create association response\n");
NET_ERR("*** Could not create association response");
goto fail;
}
@ -451,21 +451,21 @@ static void *test_setup(void)
k_sem_reset(&driver_lock);
if (!dev) {
NET_ERR("*** Could not get fake device\n");
NET_ERR("*** Could not get fake device");
return NULL;
}
net_iface = net_if_lookup_by_dev(dev);
if (!net_iface) {
NET_ERR("*** Could not get fake iface\n");
NET_ERR("*** Could not get fake iface");
return NULL;
}
NET_INFO("Fake IEEE 802.15.4 network interface ready\n");
NET_INFO("Fake IEEE 802.15.4 network interface ready");
current_pkt = net_pkt_rx_alloc(K_FOREVER);
if (!current_pkt) {
NET_ERR("*** No buffer to allocate\n");
NET_ERR("*** No buffer to allocate");
return false;
}