Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: 64-bit support preparations #20276

Merged
merged 2 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions examples/lua_basic/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@

#include "blob/main.lua.h"

#if (__SIZEOF_POINTER__ == 8)
#define LUA_MEM_SIZE (22000)
#else
#define LUA_MEM_SIZE (11000)
#endif
static char lua_mem[LUA_MEM_SIZE] __attribute__ ((aligned(__BIGGEST_ALIGNMENT__)));

int lua_run_script(const uint8_t *buffer, size_t buffer_len)
Expand Down
4 changes: 2 additions & 2 deletions tests/core/msg_queue_print/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ int main(void)
msg_init_queue(msg_queue, QUEUE_SIZE);
msg_queue_print();

for (int i = 0; i < QUEUE_SIZE; i++) {
for (uintptr_t i = 0; i < QUEUE_SIZE; i++) {
messages[i].type = i;
messages[i].content.value = i;
messages[i].content.ptr = (void *) i;
msg_send_to_self(&messages[i]);
}

Expand Down
4 changes: 2 additions & 2 deletions tests/core/thread_zombie/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ static char t4_stack[TEST_THREAD_STACKSIZE];
/* function for testing threads */
void *second_thread(void *arg)
{
printf("Thread: %d is starting\n", (int)arg);
printf("Thread: %d calls zombify\n", (int)arg);
printf("Thread: %" PRIdPTR " is starting\n", (intptr_t)arg);
printf("Thread: %" PRIdPTR " calls zombify\n", (intptr_t)arg);
thread_zombify();
puts("ERROR zombie runs again!");
return NULL;
Expand Down
7 changes: 7 additions & 0 deletions tests/cpu/native_backtrace/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,11 @@ USEMODULE += backtrace

BOARD_WHITELIST := native

# Tests if native returns a backtrace of size three.
# The following function should be included in the backtrace:
# `main`/`main_trampoline`/ return to a user context function (e.g. `makecontext`)
# Depending on the implementation of the ucontext functions, the backtrace size
# may be longer, but this test only checks if it is at least three.
CFLAGS += -DBACKTRACE_SIZE=3

include $(RIOTBASE)/Makefile.include
2 changes: 1 addition & 1 deletion tests/drivers/at86rf215/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ int netdev_ieee802154_minimal_init_devs(netdev_event_cb_t cb) {
at86rf215_t *at86rf215_subghz = NULL;
at86rf215_t *at86rf215_24ghz = NULL;

printf("%d out of %d\n", i + 1, AT86RF215_NUM);
printf("%d out of %u\n", i + 1, (unsigned)AT86RF215_NUM);

if (IS_USED(MODULE_AT86RF215_SUBGHZ)) {
puts("Sub-GHz");
Expand Down
2 changes: 1 addition & 1 deletion tests/drivers/at86rf2xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ int netdev_ieee802154_minimal_init_devs(netdev_event_cb_t cb) {
puts("Initializing AT86RF2XX devices");

for (unsigned i = 0; i < AT86RF2XX_NUM; i++) {
printf("%d out of %d\n", i + 1, AT86RF2XX_NUM);
printf("%d out of %u\n", i + 1, (unsigned)AT86RF2XX_NUM);
/* setup the specific driver */
at86rf2xx_setup(&at86rf2xx[i], &at86rf2xx_params[i], i);

Expand Down
2 changes: 1 addition & 1 deletion tests/drivers/cc2420/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ int netdev_ieee802154_minimal_init_devs(netdev_event_cb_t cb) {
puts("Initializing CC2420 devices");

for (unsigned i = 0; i < CC2420_NUM; i++) {
printf("%d out of %d\n", i + 1, CC2420_NUM);
printf("%d out of %u\n", i + 1, (unsigned)CC2420_NUM);
netdev_t *netdev = &cc2420[i].netdev.netdev;

/* setup the specific driver */
Expand Down
2 changes: 1 addition & 1 deletion tests/drivers/mrf24j40/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ int netdev_ieee802154_minimal_init_devs(netdev_event_cb_t cb) {
ieee802154_hal_test_init_devs(_reg_callback, &c);

for (unsigned i = 0; i < MRF24J40_NUM; i++) {
printf("%d out of %d\n", i + 1, MRF24J40_NUM);
printf("%d out of %u\n", i + 1, (unsigned)MRF24J40_NUM);
netdev_register(&mrf24j40_netdev[i].dev.netdev, NETDEV_MRF24J40, 0);
netdev_ieee802154_submac_init(&mrf24j40_netdev[i]);

Expand Down
2 changes: 1 addition & 1 deletion tests/drivers/mtd_raw/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@
static int cmd_info(int argc, char **argv)
{
if (argc < 2) {
printf("mtd devices: %d\n", MTD_NUMOF);
printf("mtd devices: %d\n", (unsigned)MTD_NUMOF);

for (unsigned i = 0; i < MTD_NUMOF; ++i) {
printf(" -=[ MTD_%d ]=-\n", i);
Expand Down Expand Up @@ -428,7 +428,7 @@
{ "info", "Print properties of the MTD device", cmd_info },
{ "power", "Turn the MTD device on/off", cmd_power },
{ "read", "Read a region of memory on the MTD device", cmd_read },
{ "read_page", "Read a region of memory on the MTD device (pagewise addressing)", cmd_read_page },

Check warning on line 431 in tests/drivers/mtd_raw/main.c

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters
{ "write", "Write a region of memory on the MTD device", cmd_write },
{ "write_page_raw",
"Write a region of memory on the MTD device (pagewise addressing)",
Expand Down
4 changes: 2 additions & 2 deletions tests/drivers/sds011/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
void measure_cb(sds011_data_t *data, void *ctx)
{
msg_t msg = { .content.value = (((uint32_t)data->pm_10) << 16 | data->pm_2_5) };
kernel_pid_t target_pid = (int)ctx;
kernel_pid_t target_pid = (intptr_t)ctx;
msg_send(&msg, target_pid);
}

Expand Down Expand Up @@ -194,7 +194,7 @@
}
}

sds011_register_callback(&dev, measure_cb, (void*)(int)thread_getpid());
sds011_register_callback(&dev, measure_cb, (void*)(intptr_t)thread_getpid());

printf("switching to active reporting mode for %u measurements...\n",
ACTIVE_REPORTING_TEST_CNT);
Expand All @@ -209,7 +209,7 @@

/* wait a little bit so the callback gets executed a few times */
msg_t msg;
for(unsigned msg_cnt = 0; msg_cnt < ACTIVE_REPORTING_TEST_CNT; msg_cnt++){

Check warning on line 212 in tests/drivers/sds011/main.c

View workflow job for this annotation

GitHub Actions / static-tests

keyword 'for' not followed by a single space
msg_receive(&msg);
sds011_data_t data;
data.pm_10 = msg.content.value >> 16;
Expand Down
6 changes: 3 additions & 3 deletions tests/drivers/soft_uart/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static int parse_dev(char *arg)

static void rx_cb(void *arg, uint8_t data)
{
uart_t dev = (soft_uart_t)arg;
uart_t dev = (soft_uart_t)(intptr_t)arg;

ringbuffer_add_one(&(ctx[dev].rx_buf), data);
if (data == '\n' || ringbuffer_full(&(ctx[dev].rx_buf))) {
Expand Down Expand Up @@ -139,7 +139,7 @@ static int cmd_init(int argc, char **argv)
baud = strtol(argv[2], NULL, 0);

/* initialize UART */
res = soft_uart_init(dev, baud, rx_cb, (void *)dev);
res = soft_uart_init(dev, baud, rx_cb, (void *)(intptr_t)dev);
if (res == UART_NOBAUD) {
printf("Error: Given baudrate (%u) not possible\n", (unsigned int)baud);
return 1;
Expand Down Expand Up @@ -269,7 +269,7 @@ int main(void)
"NOTE: all strings need to be '\\n' terminated!\n");

puts("\nUART INFO:");
printf("Available devices: %i\n", SOFT_UART_NUMOF);
printf("Available devices: %u\n", (unsigned)SOFT_UART_NUMOF);

/* initialize ringbuffers */
for (unsigned i = 0; i < SOFT_UART_NUMOF; i++) {
Expand Down
2 changes: 2 additions & 0 deletions tests/net/gnrc_sixlowpan_frag_minfwd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ USEMODULE += netdev_test

CFLAGS += -DTEST_SUITES

INCLUDES += -I$(RIOTBASE)/sys/net/gnrc/pktbuf_static/include

include $(RIOTBASE)/Makefile.include

ifndef CONFIG_GNRC_IPV6_NIB_NO_RTR_SOL
Expand Down
21 changes: 15 additions & 6 deletions tests/net/gnrc_sixlowpan_frag_minfwd/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
#include "utlist.h"
#include "xtimer.h"

#include "pktbuf_static.h"

#define SEND_PACKET_TIMEOUT (500U)

#define LOC_L2 { _LL0, _LL1, _LL2, _LL3, _LL4, _LL5, _LL6, _LL7 }
Expand Down Expand Up @@ -624,12 +626,19 @@ static void test_minfwd_forward__ENOMEM__netif_hdr_build_fail(void)
gnrc_pktsnip_t *pkt, *frag, *filled_space;

vrbe->super.arrival = xtimer_now_usec();
TEST_ASSERT_NOT_NULL((filled_space = gnrc_pktbuf_add(
NULL, NULL,
/* 115U == 2 * sizeof(gnrc_pktsnip_t) + movement due to mark */
CONFIG_GNRC_PKTBUF_SIZE - sizeof(_test_nth_frag) - 115U,
GNRC_NETTYPE_UNDEF
)));

size_t test_pkt_size = _align(sizeof(gnrc_pktsnip_t)) + _align(sizeof(_test_nth_frag));
size_t marked_pkt_size = _align(sizeof(gnrc_pktsnip_t)) + _align(sizeof(sixlowpan_frag_n_t))
+ _align(sizeof(_test_nth_frag) - sizeof(sixlowpan_frag_n_t));

/* Calculate the maximum payload size to fill the buffer with the following three packets */
size_t dummy_pkt_payload_size = CONFIG_GNRC_PKTBUF_SIZE - _align(sizeof(gnrc_pktsnip_t))
- test_pkt_size - marked_pkt_size;

TEST_ASSERT_NOT_NULL((filled_space = gnrc_pktbuf_add(NULL, NULL,
dummy_pkt_payload_size,
GNRC_NETTYPE_UNDEF)));

TEST_ASSERT_NOT_NULL((pkt = gnrc_pktbuf_add(NULL, _test_nth_frag,
sizeof(_test_nth_frag),
GNRC_NETTYPE_SIXLOWPAN)));
Expand Down
2 changes: 2 additions & 0 deletions tests/net/gnrc_sixlowpan_frag_sfr/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ USEMODULE += netdev_test

CFLAGS += -DTEST_SUITES

INCLUDES += -I$(RIOTBASE)/sys/net/gnrc/pktbuf_static/include

# microbit qemu failing currently
TEST_ON_CI_BLACKLIST += microbit

Expand Down
20 changes: 14 additions & 6 deletions tests/net/gnrc_sixlowpan_frag_sfr/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
#include "utlist.h"
#include "xtimer.h"

#include "pktbuf_static.h"

#define SEND_PACKET_TIMEOUT (500U)

#define LOC_L2 { _LL0, _LL1, _LL2, _LL3, _LL4, _LL5, _LL6, _LL7 }
Expand Down Expand Up @@ -540,12 +542,18 @@
);
gnrc_pktsnip_t *pkt, *frag, *filled_space;

TEST_ASSERT_NOT_NULL((filled_space = gnrc_pktbuf_add(
NULL, NULL,
/* 115U == 2 * sizeof(gnrc_pktsnip_t) + movement due to mark */
CONFIG_GNRC_PKTBUF_SIZE - sizeof(_test_nth_frag) - 115U,
GNRC_NETTYPE_UNDEF
)));
size_t test_pkt_size = _align(sizeof(gnrc_pktsnip_t)) + _align(sizeof(_test_nth_frag));
size_t marked_pkt_size = _align(sizeof(gnrc_pktsnip_t)) + _align(sizeof(sixlowpan_frag_n_t))
+ _align(sizeof(_test_nth_frag) - sizeof(sixlowpan_frag_n_t));

/* Calculate the maximum payload size to fill the buffer with the following three packets */
size_t dummy_pkt_payload_size = CONFIG_GNRC_PKTBUF_SIZE - _align(sizeof(gnrc_pktsnip_t))
- test_pkt_size - marked_pkt_size;

TEST_ASSERT_NOT_NULL((filled_space = gnrc_pktbuf_add(NULL, NULL,
dummy_pkt_payload_size,
GNRC_NETTYPE_UNDEF)));

TEST_ASSERT_NOT_NULL((pkt = gnrc_pktbuf_add(NULL, _test_nth_frag,
sizeof(_test_nth_frag),
GNRC_NETTYPE_SIXLOWPAN)));
Expand Down Expand Up @@ -3069,4 +3077,4 @@
/* wake-up test thread */
mutex_unlock(&_target_buf_filled);
return _target_buf_len;
}

Check warning on line 3080 in tests/net/gnrc_sixlowpan_frag_sfr/main.c

View workflow job for this annotation

GitHub Actions / static-tests

source file is too long
23 changes: 5 additions & 18 deletions tests/periph/flashpage/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,42 +204,29 @@
}
#endif

static uint32_t getaddr(const char *str)
static uintptr_t getaddr(const char *str)
{
uint32_t addr = strtol(str, NULL, 16);
uintptr_t addr = (uintptr_t)strtol(str, NULL, 16);

return addr;
}

static int cmd_write_raw(int argc, char **argv)
{
#if (__SIZEOF_POINTER__ == 2)
uint16_t addr;
#else
uint32_t addr;
#endif
uintptr_t addr;

if (argc < 3) {
printf("usage: %s <addr> <data>\n", argv[0]);
return 1;
}

#if (__SIZEOF_POINTER__ == 2)
addr = (uint16_t) getaddr(argv[1]);
#else
addr = getaddr(argv[1]);
#endif
/* try to align */
memcpy(raw_buf, argv[2], strlen(argv[2]));

flashpage_write((void*)addr, raw_buf, strlen(raw_buf));
#if (__SIZEOF_POINTER__ == 2)
printf("wrote local data to flash address %#" PRIx16 " of len %" PRIuSIZE "\n",
flashpage_write((void*)(uintptr_t)addr, raw_buf, strlen(raw_buf));
printf("wrote local data to flash address %#" PRIxPTR " of len %" PRIuSIZE "\n",
addr, strlen(raw_buf));
#else
printf("wrote local data to flash address %#" PRIx32 " of len %" PRIuSIZE "\n",
addr, strlen(raw_buf));
#endif
return 0;
}

Expand Down Expand Up @@ -519,7 +506,7 @@
return 1;
}

fill += (page % ('z' - 'a')); // Make each page slightly different by changing starting char for easier comparison by eye

Check warning on line 509 in tests/periph/flashpage/main.c

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters

for (unsigned i = 0; i < sizeof(page_mem); i++) {
page_mem[i] = (uint8_t)fill++;
Expand Down Expand Up @@ -558,7 +545,7 @@
}
}

if (flashpage_rwwee_write_and_verify((int)FLASHPAGE_RWWEE_NUMOF - 1, page_mem) != FLASHPAGE_OK) {

Check warning on line 548 in tests/periph/flashpage/main.c

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters
puts("error verifying the content of last RWWEE page");
return 1;
}
Expand All @@ -585,10 +572,10 @@
/* erase the page first */
flashpage_rwwee_write_page(((int)FLASHPAGE_RWWEE_NUMOF - 1), NULL);

flashpage_rwwee_write(flashpage_rwwee_addr((int)FLASHPAGE_RWWEE_NUMOF - 1), raw_buf, strlen(raw_buf));

Check warning on line 575 in tests/periph/flashpage/main.c

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters

/* verify that previous write_raw effectively wrote the desired data */
if (memcmp(flashpage_rwwee_addr((int)FLASHPAGE_RWWEE_NUMOF - 1), raw_buf, strlen(raw_buf)) != 0) {

Check warning on line 578 in tests/periph/flashpage/main.c

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters
puts("error verifying the content of last RWWEE page");
return 1;
}
Expand Down Expand Up @@ -644,7 +631,7 @@
/* check if the AUX page has been cleared */
for (uint32_t i = 0; i < FLASH_USER_PAGE_AUX_SIZE; ++i) {
if (*(uint8_t*)sam0_flashpage_aux_get(i) != 0xFF) {
printf("dst_offset=%"PRIu32": user page not cleared at offset 0x%"PRIx32"\n", dst_offset, i);

Check warning on line 634 in tests/periph/flashpage/main.c

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters
return -1;
}
}
Expand All @@ -658,13 +645,13 @@
/* check if half-word was written correctly */
uint16_t data_in = unaligned_get_u16(sam0_flashpage_aux_get(dst + sizeof(test_data)));
if (data_in != single_data) {
printf("dst_offset=%"PRIu32": %x != %x, offset = 0x%"PRIx32"\n", dst_offset, single_data, data_in, dst + sizeof(test_data));

Check warning on line 648 in tests/periph/flashpage/main.c

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters
return -1;
}

/* check if test data was written correctly */
if (memcmp(sam0_flashpage_aux_get(dst), test_data, sizeof(test_data))) {
printf("dst_offset=%"PRIu32": write test_data failed, offset = 0x%"PRIx32"\n", dst_offset, dst);

Check warning on line 654 in tests/periph/flashpage/main.c

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters
return -1;
}
}
Expand Down
6 changes: 3 additions & 3 deletions tests/periph/flashpage_unittest/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ static void test_flashbase_addr(void)
void *addr;

addr = flashpage_addr(0);
TEST_ASSERT_EQUAL_INT((unsigned int)CPU_FLASH_BASE, (unsigned int)addr);
TEST_ASSERT_EQUAL_INT((unsigned int)CPU_FLASH_BASE, (uintptr_t)addr);
addr = flashpage_addr(FLASHPAGE_NUMOF - 1);
TEST_ASSERT_EQUAL_INT((long)CPU_FLASH_BASE + (((unsigned)FLASHPAGE_NUMOF - 1) * FLASHPAGE_SIZE),
(unsigned int)addr);
(uintptr_t)addr);
addr = flashpage_addr(12);
TEST_ASSERT_EQUAL_INT((unsigned int)CPU_FLASH_BASE + (12 * FLASHPAGE_SIZE), (unsigned int)addr);
TEST_ASSERT_EQUAL_INT((unsigned int)CPU_FLASH_BASE + (12 * FLASHPAGE_SIZE), (uintptr_t)addr);
}

static void test_flashbase_page(void)
Expand Down
4 changes: 2 additions & 2 deletions tests/periph/gpio/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#ifdef MODULE_PERIPH_GPIO_IRQ
static void cb(void *arg)
{
printf("INT: external interrupt from pin %i\n", (int)arg);
printf("INT: external interrupt from pin %" PRIiPTR "\n", (intptr_t)arg);
}
#endif

Expand Down Expand Up @@ -145,7 +145,7 @@ static int init_int(int argc, char **argv)
}
}

if (gpio_init_int(GPIO_PIN(po, pi), mode, flank, cb, (void *)pi) < 0) {
if (gpio_init_int(GPIO_PIN(po, pi), mode, flank, cb, (void *)(intptr_t)pi) < 0) {
printf("error: init_int of GPIO_PIN(%i, %i) failed\n", po, pi);
return 1;
}
Expand Down
4 changes: 2 additions & 2 deletions tests/periph/timer/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static unsigned args[TIMER_CHANNEL_NUMOF];
static void cb(void *arg, int chan)
{
timeouts[chan] = sw_count;
args[chan] = (unsigned)arg + chan;
args[chan] = (uintptr_t)arg + chan;
fired++;
}

Expand Down Expand Up @@ -104,7 +104,7 @@ static int test_timer(unsigned num, uint32_t timer_freq)
printf(" - Calling timer_init(%u, %" PRIu32 ")\n ",
num, timer_freq);
/* initialize and halt timer */
if (timer_init(TIMER_DEV(num), timer_freq, cb, (void *)(COOKIE * num)) != 0) {
if (timer_init(TIMER_DEV(num), timer_freq, cb, (void *)(uintptr_t)(COOKIE * num)) != 0) {
printf("ERROR: timer_init() failed\n\n");
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/periph/uart/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ static int cmd_init(int argc, char **argv)
baud = strtol(argv[2], NULL, 0);

/* initialize UART */
res = uart_init(UART_DEV(dev), baud, rx_cb, (void *)dev);
res = uart_init(UART_DEV(dev), baud, rx_cb, (void *)(intptr_t)dev);
if (res == UART_NOBAUD) {
printf("Error: Given baudrate (%u) not possible\n", (unsigned int)baud);
return 1;
Expand Down
2 changes: 1 addition & 1 deletion tests/pkg/cayenne-lpp/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "cayenne_lpp.h"

#define TEST_BUFFER1 { 0x03, 0x67, 0x01, 0x10, 0x05, 0x67, 0x00, 0xff }
#if defined(BOARD_NATIVE)
#if defined(BOARD_NATIVE) && !(__SIZEOF_POINTER__ == 8)
#define TEST_BUFFER2 { 0x01, 0x67, 0xFF, 0xD8, \
0x06, 0x71, 0x04, 0xD1, 0xFB, 0x2F, 0x00, 0x00 }
#else
Expand Down
2 changes: 1 addition & 1 deletion tests/pkg/lora-serialization/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <stdio.h>
#include "lora_serialization.h"

#if defined(BOARD_NATIVE)
#if defined(BOARD_NATIVE) && !(__SIZEOF_POINTER__ == 8)
#define TEST_01_EXPECTED { 0x1f, 0x4c, 0x0e, 0x27 }
#define TEST_02_EXPECTED { 0x65, 0xa6, 0xfa, 0xfd, \
0x6a, 0x24, 0x04, 0x09, \
Expand Down
4 changes: 4 additions & 0 deletions tests/pkg/lua_loader/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ const size_t lua_riot_builtin_lua_table_len =
const size_t lua_riot_builtin_c_table_len =
ARRAY_SIZE(_lua_riot_builtin_c_table);

#if (__SIZEOF_POINTER__ == 8)
#define LUA_MEM_SIZE (22000)
#else
#define LUA_MEM_SIZE (11000)
#endif
static char lua_mem[LUA_MEM_SIZE] __attribute__ ((aligned(__BIGGEST_ALIGNMENT__)));

#define LINEBUF_SZ (32)
Expand Down
4 changes: 4 additions & 0 deletions tests/sys/architecture/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ include ../Makefile.sys_common

include $(RIOTBASE)/Makefile.include

ifneq (,$(filter arch_64bit,$(FEATURES_USED)))
CFLAGS += -DCORRECT_WORD_BITS=64
endif

ifneq (,$(filter arch_32bit,$(FEATURES_USED)))
CFLAGS += -DCORRECT_WORD_BITS=32
endif
Expand Down
Loading
Loading