Skip to content

Commit

Permalink
libc: add passing custom parameter to unix-socket test on armv7a9-zyn…
Browse files Browse the repository at this point in the history
…q7000-qemu since

      blocking interval significantly overruns timeout due to big kernel scheduling delays

JIRA: CI-501
  • Loading branch information
adamdebek committed Oct 7, 2024
1 parent c3b2ba6 commit 371e861
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libc/socket/unix-socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,11 @@ void unix_poll(int type)
struct pollfd fds[2];
struct timespec ts[2];
int rv, ms;
int timeoutDiff = 30;

if (argc == 2) {

Check failure on line 835 in libc/socket/unix-socket.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zturn)

'argc' undeclared (first use in this function)

Check failure on line 835 in libc/socket/unix-socket.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a7-imx6ull-evk)

'argc' undeclared (first use in this function)

Check failure on line 835 in libc/socket/unix-socket.c

View workflow job for this annotation

GitHub Actions / call-ci / build (host-generic-pc)

'argc' undeclared (first use in this function)

Check failure on line 835 in libc/socket/unix-socket.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-qemu)

'argc' undeclared (first use in this function)

Check failure on line 835 in libc/socket/unix-socket.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zedboard)

'argc' undeclared (first use in this function)

Check failure on line 835 in libc/socket/unix-socket.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt105x-evk)

'argc' undeclared (first use in this function)
timeoutDiff = atoi(argv[1]);

Check failure on line 836 in libc/socket/unix-socket.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zturn)

'argv' undeclared (first use in this function); did you mean 'rv'?

Check failure on line 836 in libc/socket/unix-socket.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a7-imx6ull-evk)

'argv' undeclared (first use in this function); did you mean 'rv'?

Check failure on line 836 in libc/socket/unix-socket.c

View workflow job for this annotation

GitHub Actions / call-ci / build (host-generic-pc)

'argv' undeclared (first use in this function); did you mean 'rv'?

Check failure on line 836 in libc/socket/unix-socket.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-qemu)

'argv' undeclared (first use in this function); did you mean 'rv'?

Check failure on line 836 in libc/socket/unix-socket.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7a9-zynq7000-zedboard)

'argv' undeclared (first use in this function); did you mean 'rv'?

Check failure on line 836 in libc/socket/unix-socket.c

View workflow job for this annotation

GitHub Actions / call-ci / build (armv7m7-imxrt105x-evk)

'argv' undeclared (first use in this function); did you mean 'rv'?
}

fds[0].fd = 11111;
fds[1].fd = 22222;
Expand Down Expand Up @@ -859,7 +864,7 @@ void unix_poll(int type)
TEST_ASSERT(rv == 0);
TEST_ASSERT(fds[0].revents == 0);
TEST_ASSERT(fds[1].revents == 0);
TEST_ASSERT_LESS_THAN(350, ms);
TEST_ASSERT_LESS_THAN(300 + timeoutDiff, ms);
TEST_ASSERT_GREATER_THAN(290, ms);

clock_gettime(CLOCK_REALTIME, &ts[0]);
Expand Down
8 changes: 8 additions & 0 deletions libc/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,16 @@ test:
- name: unix-socket
execute: test-libc-unix-socket
targets:
exclude: [armv7a9-zynq7000-qemu]
include: [host-generic-pc]

- name: unix-socket
# This parameter is custom value (ms) added to timeout in assert since blocking interval
# significantly overruns this timeout due to big kernel scheduling delays on this target
execute: test-libc-unix-socket 100
targets:
value: [armv7a9-zynq7000-qemu]

- name: inet-socket
execute: test-libc-inet-socket
targets:
Expand Down

0 comments on commit 371e861

Please sign in to comment.