Become a leader in the IoT community!

New DevHeads get a 320-point leaderboard boost when joining the DevHeads IoT Integration Community. In addition to learning and advising, active community leaders are rewarded with community recognition and free tech stuff. Start your Legendary Collaboration now!

Step 1 of 5

CREATE YOUR PROFILE *Required

Change Email
OR
Step 2 of 5

WHAT BRINGS YOU TO DEVHEADS? *Choose 1 or more

Collaboration & Work 🤝
Learn & Grow 📚
Contribute Experience & Expertise 🔧
Step 3 of 5

WHAT'S YOUR INTEREST OR EXPERTISE? *Choose 1 or more

Hardware & Design 💡
Embedded Software 💻
Edge Networking
Step 4 of 5

Personalize your profile

Step 5 of 5

Read & agree to our COMMUNITY RULES

  1. We want this server to be a welcoming space! Treat everyone with respect. Absolutely no harassment, witch hunting, sexism, racism, or hate speech will be tolerated.
  2. If you see something against the rules or something that makes you feel unsafe, let staff know by messaging @admin in the "support-tickets" tab in the Live DevChat menu.
  3. No age-restricted, obscene or NSFW content. This includes text, images, or links featuring nudity, sex, hard violence, or other graphically disturbing content.
  4. No spam. This includes DMing fellow members.
  5. You must be over the age of 18 years old to participate in our community.
  6. Our community uses Answer Overflow to index content on the web. By posting in this channel your messages will be indexed on the worldwide web to help others find answers.
  7. You agree to our Terms of Service (https://www.devheads.io/terms-of-service/) and Privacy Policy (https://www.devheads.io/privacy-policy)
By clicking "Finish", you have read and agreed to the our Terms of Service and Privacy Policy.

First Contributions to Zephyr Approved for v4.1.0 – Happy to Chat About Testing and Development!

Hey @here.
Happy to announce that I have managed to complete my first contributions(s) to Zephyr and most of them have been approved and marked for `v4.1.0`. It was a lot of learning around the Zephyr POSIX architecture, but seeing things actually go through is amazing. If you wanna talk testing or zephyr, I happy to chat.

All the issue are linked in this main issue https://github.com/zephyrproject-rtos/zephyr/issues/79454

  1. melta101#0000

    Amazing work

  2. ZacckOsiemo#0000

    amazing, are these tests for the system? And can this be used for application testing.

  3. 32bitSaviour#0000

    The tests are for Zephyr system, its POSIX architecture to be exact.

  4. ZacckOsiemo#0000

    Do application tests look the same as system tests

  5. 32bitSaviour#0000

    Yes but mostly depends on how you have structured the application.
    `ZTEST` the Zephyr library that is used for testing, is designed in a way that is allows (if you want to test your application) you to design your code in such a way that it is easily testable (think modules). A tightly coupled application is not easily testable.
    ZTEST ends up generating a “main” function for each testsuite that runs all the tests.

  6. ZacckOsiemo#0000

    im super keen to explore this structure.

  7. 32bitSaviour#0000

    The structure of a basic test resembles that of a basic application.
    “`
    ├── CMakeLists.txt
    ├── prj.conf
    ├── testcase.yaml
    └── src
    └── main.c“`

  8. 32bitSaviour#0000

    An approach to this would be to have a test directory inside your app that tests functionality that you have declared as a module

    “`
    ├── module.cmake
    └── foo
    ├── CMakeLists.txt
    └── Kconfig

    ├── CMakeLists.txt
    ├── app.overlay
    ├── prj.conf
    ├── VERSION
    └── src
    └── main.c

    ├── CMakeLists.txt
    ├── prj.conf
    ├── testcase.yaml
    └── src
    └── main.c
    “`

  9. ZacckOsiemo#0000

    what would your modules contain? And how close do the tests get to hardware?

  10. 32bitSaviour#0000

    Zephyr allow you to test as close to hardware as you want. It even has `BabbleSim` to allow you test radio activity in a simulator by producing a Linux executable that will connect to a physical simulator to test radio protocols like BLE.
    On the other hand if you have software features you can use `native_sim` (this is possible because of Zephyr’s POSIX architecture) to test those.
    Hardware testing is so neat you can even test on boards that are not yet supported by Zephyr just provide the soc, board and dts root directories to its test runner, `twister`.

  11. wafa_ath#0000

    for somone is new to zephyr and just knows the basics , what do u recommend to star with to get into it ,and Were there specific guidelines in Zephyr you followed, or was it more about adapting to the POSIX architecture requirements? , i know it’s alot of qst , am just intersted 😅

  12. 32bitSaviour#0000

    No worries.
    Easiest way I found was to start out by building sample applications, flashing them on to a board to get a taste of the tooling.
    Building something around a sample application, changing things, adding functionality from there you can move on to build something you want.
    It can be painful but rewarding. As for specific guidelines to follow, I found the docs very informative. Though there are cases where things are missing and that gets tricky. You may have to figure things out by looking at issue comments and asking around; most of those missing things live in people’s brains. 😆
    The specific issues I was handling were more of testing for the POSIX architecture, I had to beware that Zephyr does not try to implement the whole POSIX OS abstraction and the Zephyr docs were instrumental in keeping aware of what is implemented and what is not.

  13. wafa_ath#0000

    thnaks alot ! Good tip about POSIX too;

CONTRIBUTE TO THIS THREAD

Browse other questions tagged 

Leaderboard

RANKED BY XP

All time
  • 1.
    Avatar
    @Nayel115
    1620 XP
  • 2.
    Avatar
    @UcGee
    650 XP
  • 3.
    Avatar
    @melta101
    600 XP
  • 4.
    Avatar
    @lifegochi
    250 XP
  • 5.
    Avatar
    @Youuce
    180 XP
  • 6.
    Avatar
    @hemalchevli
    170 XP