Skip to content

QNX8 QEMU x86_64 Integration tests#19

Open
TimofteBogdan1900 wants to merge 47 commits intoeclipse-score:mainfrom
etas-contrib:feature/96530_shared_story
Open

QNX8 QEMU x86_64 Integration tests#19
TimofteBogdan1900 wants to merge 47 commits intoeclipse-score:mainfrom
etas-contrib:feature/96530_shared_story

Conversation

@TimofteBogdan1900
Copy link
Copy Markdown
Contributor

@TimofteBogdan1900 TimofteBogdan1900 commented Feb 10, 2026

Features

  • uses "main" git branch version of ITF from S-CORE which has for the moment management of 1 QEMU instance. official 0.1.0 ITF release has almost no functionality for this feature
  • patch fixes vsomeip SD bug/issue for qnx8
  • supports managing of > 1 qemu instance (architecture proposed to ITF)
  • binaries and configuration are automatically built into qemu image when they change (BAZEL cache is used to detect changes) . No extra step required to copy them via ssh ftp command -> very fast development and testing, ex: patch vsomeip, change any json config fbs file , or any daemon code --> only needed command to test is : bazel test //...
  • automated SOMEIP SD discovery tests based on captured network traffic from a pcap file . No need for manual checks using wireshark for example. All the pcap files are saved in the bazel test folder and can be inspected with Wireshark if needed.
  • fixes arm rust compilation error due to COM rust file bug (fix already on COM main branch)
  • automatic startup ssh authentication configured between the 2 qemu instances and between host and target
  • bazel build /test works on //tests/... folder independent of architecture (not supported arm arch tests are automatically skipped)
  • fixes bazel not allowing communication to qemu instances due to sandboxing being enabled on master
  • script to setup bridge as per project and ITF requirements
  • tests run on WSL2 based linux and also on a native Linux machine (pipeline is blocked at the moment)

QNX QEMU ARM image creation is not possible due to tool missing startup-qemu-virt from the qnx SDP.

How to run tests see:
See Readme.md chapter

@TimofteBogdan1900 TimofteBogdan1900 changed the title Feature/96530 shared story QNX + QEMU for arm and x86_64 + ITF + integration and UTs Feb 10, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 10, 2026

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
2026/03/20 19:05:49 Downloading https://releases.bazel.build/8.3.0/release/bazel-8.3.0-linux-x86_64...
Extracting Bazel installation...
Starting local Bazel server (8.3.0) and connecting to it...
INFO: Invocation ID: a545f705-d93f-49a3-9a1e-0a04f1e42846
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
WARNING: For repository 'score_bazel_platforms', the root module requires module version score_bazel_platforms@0.0.4, but got score_bazel_platforms@0.1.1 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 5 packages loaded
Loading: 5 packages loaded
    currently loading: 
Loading: 5 packages loaded
    currently loading: 
Loading: 5 packages loaded
    currently loading: 
Analyzing: target //:license-check (6 packages loaded, 0 targets configured)
Analyzing: target //:license-check (6 packages loaded, 0 targets configured)

Analyzing: target //:license-check (36 packages loaded, 10 targets configured)

Analyzing: target //:license-check (96 packages loaded, 10 targets configured)

Analyzing: target //:license-check (105 packages loaded, 10 targets configured)

Analyzing: target //:license-check (166 packages loaded, 2696 targets configured)

Analyzing: target //:license-check (179 packages loaded, 6316 targets configured)

Analyzing: target //:license-check (182 packages loaded, 8025 targets configured)

Analyzing: target //:license-check (182 packages loaded, 8025 targets configured)

Analyzing: target //:license-check (190 packages loaded, 10051 targets configured)

Analyzing: target //:license-check (190 packages loaded, 10051 targets configured)

Analyzing: target //:license-check (190 packages loaded, 10051 targets configured)

Analyzing: target //:license-check (191 packages loaded, 10175 targets configured)

Analyzing: target //:license-check (192 packages loaded, 10295 targets configured)

Analyzing: target //:license-check (192 packages loaded, 10295 targets configured)

Analyzing: target //:license-check (192 packages loaded, 10295 targets configured)

Analyzing: target //:license-check (192 packages loaded, 10295 targets configured)

Analyzing: target //:license-check (192 packages loaded, 10295 targets configured)

Analyzing: target //:license-check (192 packages loaded, 10295 targets configured)

Analyzing: target //:license-check (192 packages loaded, 10295 targets configured)

INFO: Analyzed target //:license-check (193 packages loaded, 11874 targets configured).
[9 / 13] JavaToolchainCompileClasses external/rules_java+/toolchains/platformclasspath_classes; 0s disk-cache
INFO: From Generating Dash formatted dependency file ...:
INFO: Successfully converted 2 packages from Cargo.lock to bazel-out/k8-fastbuild/bin/formatted.txt
[11 / 13] JavaToolchainCompileBootClasspath external/rules_java+/toolchains/platformclasspath.jar; 0s disk-cache, processwrapper-sandbox
INFO: Found 1 target...
Target //:license.check.license_check up-to-date:
  bazel-bin/license.check.license_check
  bazel-bin/license.check.license_check.jar
[13 / 13] no actions running
INFO: Elapsed time: 215.355s, Critical Path: 2.49s
INFO: 13 processes: 9 internal, 3 processwrapper-sandbox, 1 worker.
INFO: Build completed successfully, 13 total actions
INFO: Running command line: bazel-bin/license.check.license_check ./formatted.txt <args omitted>
usage: org.eclipse.dash.licenses.cli.Main [-batch <int>] [-cd <url>]
       [-confidence <int>] [-ef <url>] [-excludeSources <sources>] [-help] [-lic
       <url>] [-project <shortname>] [-repo <url>] [-review] [-summary <file>]
       [-timeout <seconds>] [-token <token>]

@github-actions
Copy link
Copy Markdown

The created documentation from the pull request is available at: docu-html

@TimofteBogdan1900 TimofteBogdan1900 changed the title QNX + QEMU for arm and x86_64 + ITF + integration and UTs QNX8 QEMU Integration and unit tests Feb 16, 2026
@TimofteBogdan1900 TimofteBogdan1900 force-pushed the feature/96530_shared_story branch 2 times, most recently from d41ded4 to a7b9a0e Compare March 5, 2026 15:22
@TimofteBogdan1900 TimofteBogdan1900 force-pushed the feature/96530_shared_story branch from a7b9a0e to 4a6f50e Compare March 5, 2026 15:23
TimofteBogdan1900 and others added 2 commits March 5, 2026 16:26
Co-authored-by: Jorge C. Santos <156771132+jorgecasal@users.noreply.github.com>
Signed-off-by: TimofteBogdan1900 <bogdan.timofte@etas.com>
@TimofteBogdan1900 TimofteBogdan1900 requested review from lurtz and removed request for AEK2HI March 5, 2026 17:24
@TimofteBogdan1900 TimofteBogdan1900 force-pushed the feature/96530_shared_story branch 2 times, most recently from 23e7bf2 to 0cee3e4 Compare March 10, 2026 09:13
Copy link
Copy Markdown
Contributor

@NEOatNHNG NEOatNHNG left a comment

Choose a reason for hiding this comment

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

Reviewed the general setup etc. Still need to review the integration test setup itself.

"qcrypto.conf",
"startup.sh",
],
visibility = ["//visibility:public"],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Public visibility probably a bit much. We only want to share it within our module right?

Suggested change
visibility = ["//visibility:public"],
visibility = ["//:__subpackages__"],

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

[
"run_qemu.sh",
],
visibility = ["//visibility:public"],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Check visibility

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

Comment on lines +37 to +46
args = [
"-config_file",
"$(rootpath :config_file)",
"-service_instance_manifest",
"$(rootpath etc/mw_com_config.json)",
],
data = [
"etc/mw_com_config.json",
":config_file",
],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The "gatewayd" binary shall only include the stuff that is always necessary and no testing-specific stuff. Everything that you need to add for testing please create a native_binary like the "gatewayd_example" below.

Copy link
Copy Markdown
Contributor Author

@TimofteBogdan1900 TimofteBogdan1900 Mar 17, 2026

Choose a reason for hiding this comment

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

i have not added any testing specific . the same as before param path to bin file and mw::com json file are passed

// Read config data
// TODO: Be more flexible with the path
// TODO: Use memory mapped file instead of copying into buffer
std::string config_path = "src/gatewayd/etc/gatewayd_config.bin";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Use zero-terminated zstring_view from baselibs

Suggested change
std::string config_path = "src/gatewayd/etc/gatewayd_config.bin";
score::safecpp::zstring_view config_path = "src/gatewayd/etc/gatewayd_config.bin";

Copy link
Copy Markdown
Contributor Author

@TimofteBogdan1900 TimofteBogdan1900 Mar 17, 2026

Choose a reason for hiding this comment

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

i think is better to remove this hardcoded string
std::string config_path = "src/gatewayd/etc/gatewayd_config.bin";
and rely on the method so that the path to the config file is configurable
What do you think ?

# Export config files for deployment
exports_files(
["etc/mw_com_config.json"],
visibility = ["//visibility:public"],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

check visibility

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

}
}
},
"postCreateCommand": "sudo apt-get update && sudo apt-get install -y software-properties-common && sudo add-apt-repository -y universe && sudo apt-get update && sudo apt-get install -y qemu-system-x86 iputils-ping tcpdump iptables",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we add that to the Dockerfile instead? Then it would be one step.
Otherwise the Docker image will be generated and then afterwards this additional stuff is installed.

Also we are installing way too much stuff (icon themes etc.). I guess you should add --no-install-recommends

Suggested change
"postCreateCommand": "sudo apt-get update && sudo apt-get install -y software-properties-common && sudo add-apt-repository -y universe && sudo apt-get update && sudo apt-get install -y qemu-system-x86 iputils-ping tcpdump iptables",
"postCreateCommand": "sudo apt-get update && sudo apt-get install -y --no-install-recommends software-properties-common && sudo add-apt-repository -y universe && sudo apt-get update && sudo apt-get install -y --no-install-recommends qemu-system-x86 iputils-ping tcpdump iptables",

Copy link
Copy Markdown
Contributor Author

@TimofteBogdan1900 TimofteBogdan1900 Mar 17, 2026

Choose a reason for hiding this comment

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

updated

README.md Outdated
It is stronly recommended to run all tests with `--nocache_test_results` which is the best way on development cycles to ensure you are always running the latest version of the tests and not accidentally running cached results.

Build the docker containers:
Tu run all tests (will take around 2 minutes)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
Tu run all tests (will take around 2 minutes)
To run all tests (will take around 2 minutes):

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated

README.md Outdated
As a proof of concept `docker compose` can be used to build, setup and run the containers.
In the future a pytest based setup can be implemented to orchestrate the containers.
For the QEMU QNX x864 image to run on host please run the script deployment/qemu/setup_bridge.sh with sudo privileges to setup the required network bridge and tap interfaces.
It is stronly recommended to run all tests with `--nocache_test_results` which is the best way on development cycles to ensure you are always running the latest version of the tests and not accidentally running cached results.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
It is stronly recommended to run all tests with `--nocache_test_results` which is the best way on development cycles to ensure you are always running the latest version of the tests and not accidentally running cached results.
It is recommended to run all tests with `--nocache_test_results` to ensure you are always running the latest version of the tests and not accidentally seeing cached results.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated

README.md Outdated
```

Finally start the benchmark on the someipd-1 container in a third shell:
To run the QNX tests using dev containers please execute the shell command:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is only needed in devcontainer or also when running locally?
And why don't we add it to the devcontainer file so that it gets executed automatically? Is there a negative impact?

Copy link
Copy Markdown
Contributor Author

@TimofteBogdan1900 TimofteBogdan1900 Mar 17, 2026

Choose a reason for hiding this comment

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

First question : is needed independent if its host or docker containers .
Second question:
Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants