Docsity

Zephyr Maintainer Practice Exam, Exams of Technology

Toggle sidebar
bg1
Zephyr Maintainer Practice Exam
**Question 1.** Which role in the Zephyr project is primarily responsible for defining
architectural direction and making final technical decisions?
A) Contributor
B) Collaborator
C) Maintainer
D) Reviewer
Answer: C
Explanation: Maintainers have the authority to set architectural direction, approve technical
changes, and enforce project policies.
**Question 2.** In Zephyr governance, what is the main function of the Technical Steering
Committee (TSC)?
A) Writing user documentation
B) Approving new repositories and major technical directions
C) Managing release dates only
D) Handling community support tickets
Answer: B
Explanation: The TSC oversees overall technical strategy, approves new repos, and guides major
architectural decisions.
**Question 3.** Which of the following committees focuses on ensuring that newly added code
does not introduce security vulnerabilities?
A) Testing Committee
B) Safety Committee
C) Security Committee
D) Documentation Committee
Answer: C
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57

Partial preview of the text

Download Zephyr Maintainer Practice Exam and more Exams Technology in PDF only on Docsity!

Question 1. Which role in the Zephyr project is primarily responsible for defining architectural direction and making final technical decisions? A) Contributor B) Collaborator C) Maintainer D) Reviewer Answer: C Explanation: Maintainers have the authority to set architectural direction, approve technical changes, and enforce project policies. Question 2. In Zephyr governance, what is the main function of the Technical Steering Committee (TSC)? A) Writing user documentation B) Approving new repositories and major technical directions C) Managing release dates only D) Handling community support tickets Answer: B Explanation: The TSC oversees overall technical strategy, approves new repos, and guides major architectural decisions. Question 3. Which of the following committees focuses on ensuring that newly added code does not introduce security vulnerabilities? A) Testing Committee B) Safety Committee C) Security Committee D) Documentation Committee Answer: C

Explanation: The Security Committee reviews security aspects, defines policies, and coordinates vulnerability handling. Question 4. What does the “no regressions” rule in Zephyr release management require? A) All new features must be optional B) Existing functionality must continue to work after changes C) Only bug fixes are allowed in stable branches D) All code must be rewritten for each release Answer: B Explanation: The rule ensures that new commits do not break previously working behavior. Question 5. When backporting a fix to a stable branch, which of the following is the most appropriate first step? A) Merge the change directly into master B) Create a cherry‑pick PR targeting the stable branch C) Rebase the entire stable branch onto master D) Delete the stable branch and recreate it Answer: B Explanation: Cherry‑picking the specific commit into the stable branch isolates the fix without pulling unrelated changes. Question 6. In the MAINTAINERS file, what determines which maintainer receives a PR first when multiple area maintainers are listed? A) Alphabetical order of names B) The maintainer with the highest GitHub follower count C) The first listed maintainer (area precedence) D) Random assignment by the CI system

Explanation: The Developer Certificate of Origin (DCO) requires a Signed‑off‑by line confirming contribution rights. Question 10. Which command is used to interactively reorder, squash, or edit commits before pushing a PR? A) git merge --squash B) git rebase - i C) git cherry-pick - n D) git reset --hard HEAD~ Answer: B Explanation: git rebase - i opens an editor to modify commit history, enabling reordering, squashing, etc. Question 11. During a code review, which of the following is NOT a primary goal? A) Verifying functional correctness B) Increasing code readability and maintainability C) Ensuring the reviewer’s personal coding style is imposed D) Detecting possible security issues Answer: C Explanation: Reviews focus on project standards, not personal preferences. Question 12. Which Zephyr coding guideline explicitly forbids casting a pointer to a different type without a comment? A) No use of void * without justification B) All casts must be surrounded by /* cast */ comments C) Pointer casting is allowed only in architecture-specific code D) Pointer casting is prohibited entirely

Answer: A Explanation: The guideline requires justification for void * casts to avoid hidden bugs. Question 13. Which tool is used by Zephyr CI to automatically enforce coding style and formatting? A) clang‑format B) pylint C) eslint D) gofmt Answer: A Explanation: Zephyr uses clang‑format in CI pipelines to check C code style. Question 14. When contributing documentation to Zephyr, which markup language is required? A) Markdown B) reStructuredText (reST) C) AsciiDoc D) HTML Answer: B Explanation: Zephyr documentation is built with Sphinx, which uses reST. Question 15. Which command does the west tool provide to fetch all external modules defined in a Zephyr project? A) west update B) west fetch C) west init - l D) west build

Question 19. Which security activity involves providing random, unexpected inputs to APIs to discover crashes or undefined behavior? A) Penetration testing B) Threat modeling C) Fuzzing D) Code signing Answer: C Explanation: Fuzzing feeds malformed data to uncover hidden bugs. Question 20. In threat modeling, what is the first step? A) Identify counter‑measures B) Define assets to protect C) Write test cases D) Deploy the product Answer: B Explanation: Understanding what needs protection guides the rest of the modeling process. Question 21. Which committee member is primarily responsible for triaging static analysis findings from tools like Coverity? A) Documentation Maintainer B) Security Maintainer C) Quality Assurance Maintainer D) Release Engineer Answer: C Explanation: QA maintainers handle static analysis issues to ensure code quality.

Question 22. PSA Certified Level 1 focuses on which aspect of a Zephyr‑based product? A) Functional safety only B) Basic security requirements and best practices C) Real‑time performance benchmarks D) Wireless protocol compliance Answer: B Explanation: PSA Level 1 verifies that basic security controls are in place. Question 23. Which Zephyr kernel primitive is best suited for synchronizing access to a shared resource among multiple preemptive threads? A) Semaphore B) Event C) Workqueue D) Timer Answer: A Explanation: Semaphores provide counting and mutual‑exclusion capabilities across threads. Question 24. In Zephyr, what does a “tickless” scheduler aim to achieve? A) Reduce memory usage by eliminating tick counters B) Eliminate periodic timer interrupts to save power C) Provide deterministic scheduling intervals D) Increase the frequency of context switches Answer: B Explanation: Tickless mode disables regular ticks, allowing the system to sleep longer. Question 25. Which API is used to submit work to a Zephyr workqueue?

A) Multi‑target Kconfig options B) Architecture‑specific Makefiles only C) Conditional compilation using #ifdef ARCH_X86 only D) Separate repositories per architecture Answer: A Explanation: Kconfig can enable/disable features per architecture, supporting cross‑compilation. Question 29. In a hardware‑in‑the‑loop (HIL) test, what is the role of the Zephyr firmware? A) Simulate the entire hardware stack in software only B) Run on actual hardware while test stimuli are generated externally C) Replace the need for any physical device D) Only compile the test harness, not the firmware Answer: B Explanation: HIL runs firmware on real hardware with external test equipment providing inputs. Question 30. Which of the following is NOT a valid Zephyr thread scheduling policy? A) Cooperative B) Preemptive C) Real‑time priority inheritance D) Tickless Answer: C Explanation: Priority inheritance is a synchronization concept, not a scheduling policy. Question 31. What is the correct way to indicate that a PR fixes a known issue in the Zephyr issue tracker? A) Add “Fixes #1234” in the PR description

B) Rename the branch to “fix‑ 1234 ” only C) Mention the issue number in a comment after merging D) No special notation is required Answer: A Explanation: Using “Fixes #1234” automatically closes the issue when the PR merges. Question 32. Which of the following best describes a Zephyr “Workqueue Thread”? A) A thread that runs at the highest priority to handle interrupts B) A dedicated thread that processes deferred work items submitted by other threads C) A timer callback that executes periodically D) A kernel thread that manages memory allocation Answer: B Explanation: Workqueue threads handle background work submitted via k_work_submit(). Question 33. When a maintainer merges a PR, which of the following actions must they verify first? A) That the PR author’s GitHub avatar is displayed correctly B) That all required CI checks have passed and the code follows style guidelines C) That the PR title contains the word “Merge” D) That the PR contains at least one emoji Answer: B Explanation: CI status and style compliance are mandatory before merging. Question 34. Which Zephyr macro is used to declare a thread stack with automatic size calculation? A) K_THREAD_STACK_DEFINE B) K_STACK_ALLOC

D) Maintaining the build system for ARM architectures only Answer: B Explanation: Security maintainers focus on vulnerability assessment and response. Question 38. Which Zephyr testing framework is used for unit testing of C code? A) Unity B) Google Test C) PyTest D) JUnit Answer: A Explanation: Zephyr integrates the Unity framework for C unit tests. Question 39. In the context of Zephyr’s CI, what does the “sanitycheck” job verify? A) That the repository contains a README file B) That basic build and static analysis pass for a minimal configuration C) That all documentation builds without errors D) That the code compiles only on x86 platforms Answer: B Explanation: The sanitycheck ensures that a minimal build succeeds and basic checks pass. Question 40. Which of the following is NOT a valid Zephyr interrupt handling attribute? A) IRQ_CONNECT macro B) ISR_DIRECT_DECLARE C) K_IRQ_HANDLER D) ISRs attribute in device tree Answer: C

Explanation: K_IRQ_HANDLER does not exist; Zephyr uses IRQ_CONNECT and ISR_DIRECT_DECLARE. Question 41. What is the purpose of the west flash command? A) To compile the source code only B) To upload a compiled binary to a connected board via supported flasher C) To generate documentation PDFs D) To create a new Git branch automatically Answer: B Explanation: west flash programs the binary onto hardware using the configured flashing tool. Question 42. Which Zephyr subsystem provides support for over‑the‑air (OTA) firmware updates? A) Bluetooth B) DFU (Device Firmware Upgrade) C) Filesystem D) Power management Answer: B Explanation: The DFU subsystem handles OTA and other firmware update mechanisms. Question 43. When a maintainer wants to deprecate an API, which of the following actions is recommended? A) Remove the function immediately without notice B) Add __deprecated attribute and update documentation, then schedule removal in a future release C) Rename the function to old_<name> and keep it functional D) Hide the function behind a preprocessor #if 0 block

D) Logs are sent to a remote server over network Answer: B Explanation: Immediate mode forces logs to be output instantly, even from interrupt context. Question 47. Which of the following is a valid reason for a maintainer to reject a PR? A) The author used a different IDE B) The code introduces a known regression or violates the coding style C) The PR title is longer than 10 characters D) The PR contains more than one commit Answer: B Explanation: Regressions or style violations are legitimate grounds for rejection. Question 48. Which Zephyr API is used to create a binary semaphore? A) k_sem_init() with count 0 B) k_mutex_init() C) k_event_create() D) k_fifo_init() Answer: A Explanation: Initializing a semaphore with count 0 creates a binary semaphore. Question 49. What does the CONFIG_ARCH_HAS_USERSPACE option enable? A) User‑mode threads with memory protection (when supported) B) Multi‑core support for all architectures C) Automatic generation of device drivers D) Integration with cloud services Answer: A

Explanation: This option activates user‑space support where the architecture provides it. Question 50. Which of the following best describes a “topic branch” in the Zephyr contribution workflow? A) A branch that tracks the upstream master automatically B) A short‑lived branch focused on a single feature or bug fix C) A permanent branch for all core developers D) A branch that contains only documentation changes Answer: B Explanation: Topic branches isolate a specific change set for review. Question 51. In Zephyr, which of the following is the correct way to declare a device driver that uses the device model? A) Use DEVICE_DEFINE macro in the driver source file B) Add the driver to the CMakeLists.txt only C) Place the driver binary in /bin folder D) Register the driver via driver_register() function at runtime Answer: A Explanation: DEVICE_DEFINE registers the driver with the device model at compile time. Question 52. Which CI job runs the Zephyr “sanitycheck” on a minimal configuration for each supported architecture? A) sanitycheck_all B) build_all C) sanitycheck_minimal D) test_all Answer: C

Explanation: The committee follows responsible disclosure, assigns a CVE, and works on a remediation. Question 56. Which of the following is a correct way to add a new board definition to Zephyr? A) Create a new directory under boards/<arch>/<board_name>/ with required DTS and Kconfig files B) Edit the existing boards/common/ directory only C) Add the board name to CMakeLists.txt without any other files D) Place the board files in the root of the repository Answer: A Explanation: Board definitions are organized per architecture in boards/<arch>/<board_name>/. Question 57. Which Zephyr subsystem provides support for the Bluetooth Low Energy (BLE) stack? A) net B) bluetooth C) sensor D) storage Answer: B Explanation: The bluetooth subsystem implements BLE protocols. Question 58. What does the CONFIG_LOG_MAX_LEVEL Kconfig option control? A) The maximum number of log backends that can be compiled B) The highest severity level of log messages that will be compiled into the binary C) The size of the log buffer in bytes

D) The timeout for log flushing Answer: B Explanation: It limits which log levels are included, reducing code size. Question 59. Which of the following statements about Zephyr’s “preemptive” scheduling mode is true? A) Threads can be preempted only by higher‑priority threads that become ready B) All threads run to completion without preemption C) Preemptive mode disables all interrupts D) Only cooperative threads can run in preemptive mode Answer: A Explanation: In preemptive mode, a higher‑priority ready thread can interrupt a lower‑priority one. Question 60. In the context of Zephyr’s CI, what does the “coverity” job do? A) Runs unit tests on all supported platforms B) Performs static analysis to detect bugs and security issues C) Generates documentation PDFs D) Deploys the firmware to a cloud service Answer: B Explanation: The Coverity job runs static analysis and reports findings. Question 61. Which macro is used to define a kernel object that can be accessed from multiple threads safely? A) K_OBJ_DEFINE B) K_MUTEX_DEFINE C) K_SEM_DEFINE