Skip to content
This repository was archived by the owner on Mar 20, 2024. It is now read-only.

Added the C library to the e2e testing #83

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

phansGithub
Copy link
Contributor

Added in some code to test the C wrapper library for testing in a separate pod.

@@ -0,0 +1,19 @@
# Copyright(c) 2022 Intel Corporation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Copyright(c) 2022 Intel Corporation.
# Copyright(c) 2024 Intel Corporation.

printf("C Library: Server Version: %s \n", GetUdsServerVersion());
printf("C Library: Xsk Map FD request: %d \n", RequestXskMapFd("enp94s0f0"));
CleanUpConnection();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a blank line please at the end of file

int main() {
printf("C Library: Client Version: %s \n", GetUdsClientVersion());
printf("C Library: Server Version: %s \n", GetUdsServerVersion());
printf("C Library: Xsk Map FD request: %d \n", RequestXskMapFd("enp94s0f0"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
printf("C Library: Xsk Map FD request: %d \n", RequestXskMapFd("enp94s0f0"));
printf("C Library: xskmap FD request: %d \n", RequestXskMapFd("enp94s0f0"));

int main() {
printf("C Library: Client Version: %s \n", GetUdsClientVersion());
printf("C Library: Server Version: %s \n", GetUdsServerVersion());
printf("C Library: Xsk Map FD request: %d \n", RequestXskMapFd("enp94s0f0"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about hardcoding this to a physical interface... might be better to create a veth in the context of the pod for testing?

spec:
containers:
- name: afxdp-c
image: localhost:5000/afxdp-c-test:latest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
image: localhost:5000/afxdp-c-test:latest
image: afxdp-c-test:latest

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants