<commit_before>#include <linux/can.h>

#include "tst.h"
#include "canopen/sdo.h"
#include "canopen/sdo_client.h"
#include "canopen/sdo_client_priv.h"

static int test_make_dl_request_1_byte()
{
	struct sdo_dl_req req;
	memset(&req, 0, sizeof(req));
	sdo_request_download(&req, 0x1000, 42, "x", 1);

	ASSERT_INT_EQ(SDO_REQ_INIT_EXPEDIATED, req.state);
	ASSERT_INT_EQ(SDO_CCS_DL_INIT_REQ, sdo_get_cs(&req.frame));
	ASSERT_INT_EQ(1, sdo_get_expediated_size(&req.frame));
	ASSERT_INT_EQ(5, req.frame.can_dlc);
	ASSERT_TRUE(sdo_is_expediated(&req.frame));
	ASSERT_TRUE(sdo_is_size_indicated(&req.frame));
	ASSERT_INT_EQ(0x1000, sdo_get_index(&req.frame));
	ASSERT_INT_EQ(42, sdo_get_subindex(&req.frame));
	ASSERT_INT_EQ('x', req.frame.data[SDO_EXPEDIATED_DATA_IDX]);
	ASSERT_TRUE(req.have_frame);

	return 0;
}

static int test_make_dl_request_4_bytes()
{
	struct sdo_dl_req req;
	memset(&req, 0, sizeof(req));
	sdo_request_download(&req, 0x1000, 42, "foo", 4);<commit_msg>sdo_client: remove redundant include<commit_after>#include <linux/can.h>

#include "tst.h"
#include "canopen/sdo.h"
#include "canopen/sdo_client.h"

static int test_make_dl_request_1_byte()
{
	struct sdo_dl_req req;
	memset(&req, 0, sizeof(req));
	sdo_request_download(&req, 0x1000, 42, "x", 1);

	ASSERT_INT_EQ(SDO_REQ_INIT_EXPEDIATED, req.state);
	ASSERT_INT_EQ(SDO_CCS_DL_INIT_REQ, sdo_get_cs(&req.frame));
	ASSERT_INT_EQ(1, sdo_get_expediated_size(&req.frame));
	ASSERT_INT_EQ(5, req.frame.can_dlc);
	ASSERT_TRUE(sdo_is_expediated(&req.frame));
	ASSERT_TRUE(sdo_is_size_indicated(&req.frame));
	ASSERT_INT_EQ(0x1000, sdo_get_index(&req.frame));
	ASSERT_INT_EQ(42, sdo_get_subindex(&req.frame));
	ASSERT_INT_EQ('x', req.frame.data[SDO_EXPEDIATED_DATA_IDX]);
	ASSERT_TRUE(req.have_frame);

	return 0;
}

static int test_make_dl_request_4_bytes()
{
	struct sdo_dl_req req;
	memset(&req, 0, sizeof(req));
	sdo_request_download(&req, 0x1000, 42, "foo", 4);
{'fraction_non_alphanumeric': 0.14760914760914762, 'fraction_numerical': 0.031185031185031187, 'mean_word_length': 8.436274509803921, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7414444', 'n_tokens_mistral': 892, 'n_tokens_neox': 845, 'n_words': 114}