Test Reference Overview¶
Complete catalog of all built-in tests available in the BIT SDK.
Test Categories¶
The BIT SDK includes 52 tests organized by type:
- 21 PBIT Tests - Power-on validation tests
- 21 CBIT Tests - Continuous monitoring tests
- 9 FBIT Tests - Factory and manufacturing tests
- 1 Test Template - Example for custom test development
Quick Reference Table¶
PBIT Tests (Power-On)¶
| Test Name | Category | Description |
|---|---|---|
pbit_bsp_version |
System | Verify BSP release version and model |
pbit_can |
Network | CAN bus interface availability |
pbit_checksum |
Security | File checksum verification |
pbit_cpu_cores |
Hardware | CPU core count validation |
pbit_cpu_usage |
Resource | CPU utilization at boot |
pbit_disk_health |
Storage | Disk SMART status |
pbit_disk_usage |
Storage | Disk space availability |
pbit_dmesg_check |
System | Kernel message log analysis |
pbit_ethernet |
Network | Network interface status |
pbit_firewall_configuration |
Security | Firewall status verification |
pbit_gpio |
Hardware | GPIO pin state verification |
pbit_gpu_loading |
Hardware | GPU utilization check |
pbit_memory_usage |
Resource | Memory availability |
pbit_pci_whitelist |
Security | PCI device whitelist |
pbit_permissions_verification |
Security | File permissions check |
pbit_power_test |
Hardware | Power consumption validation |
pbit_selinux_apparmor_status |
Security | Security system status |
pbit_serial_ports |
Hardware | Serial port availability |
pbit_ssh_configuration |
Security | SSH daemon configuration |
pbit_syslog_analysis |
System | System log analysis |
pbit_temperature |
Hardware | Temperature sensor check |
pbit_usb_whitelist |
Security | USB device whitelist |
CBIT Tests (Continuous)¶
| Test Name | Category | Default Freq | Description |
|---|---|---|---|
cbit_bsp_version |
System | 300s | BSP version monitoring |
cbit_can |
Network | 5s | CAN interface monitoring |
cbit_checksum |
Security | 300s | File integrity monitoring |
cbit_cpu_cores |
Hardware | 300s | CPU core count monitoring |
cbit_cpu_usage |
Resource | 30s | CPU utilization monitoring |
cbit_disk_health |
Storage | 600s | Disk SMART monitoring |
cbit_disk_usage |
Storage | 30s | Disk space monitoring |
cbit_dmesg_check |
System | 60s | Kernel message monitoring |
cbit_ethernet |
Network | 30s | Network interface monitoring |
cbit_firewall_configuration |
Security | 60s | Firewall monitoring |
cbit_gpio |
Hardware | 30s | GPIO pin monitoring |
cbit_gpu_loading |
Hardware | 30s | GPU utilization monitoring |
cbit_memory_usage |
Resource | 30s | Memory usage monitoring |
cbit_pci_whitelist |
Security | 5s | PCI whitelist monitoring |
cbit_permissions_verification |
Security | 30s | File permissions monitoring |
cbit_power_consumption |
Hardware | 60s | Power consumption monitoring |
cbit_selinux_apparmor_status |
Security | 30s | Security system monitoring |
cbit_serial_ports |
Hardware | 60s | Serial port monitoring |
cbit_ssh_configuration |
Security | 30s | SSH configuration monitoring |
cbit_syslog_analysis |
System | 60s | System log monitoring |
cbit_temperature |
Hardware | 60s | Temperature monitoring |
cbit_usb_whitelist |
Security | 5s | USB whitelist monitoring |
FBIT Tests (Factory)¶
| Test Name | Category | Hardware Required | Description |
|---|---|---|---|
fbit_can_data |
Network | CAN loopback | CAN bus data transfer test |
fbit_gpio_data |
Hardware | GPIO wiring | GPIO loopback test |
fbit_pci |
Hardware | PCI devices | PCI capability test |
fbit_serial_data |
Hardware | Serial loopback | Serial port data transfer |
fbit_ssd |
Storage | Writable disk | SSD performance test |
fbit_system_data |
System | None | System data monitoring |
fbit_tcp_data |
Network | iPerf server | Network throughput test |
fbit_usb |
Hardware | USB storage | USB device test |
fbit_video |
Hardware | Video device | V4L2 video device test |
Test Categories Explained¶
Hardware Tests¶
Validate physical components and peripherals:
- CPU/GPU: Core count, utilization
- Memory: Availability, integrity
- Storage: Disk health, SMART data
- Interfaces: Network, CAN, GPIO, serial, USB, PCI
- Sensors: Temperature, power consumption
Resource Tests¶
Monitor system resource utilization:
- CPU Usage: Utilization thresholds
- Memory Usage: RAM and swap monitoring
- Disk Usage: Storage space monitoring
- Temperature: Thermal monitoring
- Power: Power consumption tracking
Security Tests¶
Verify security configuration and policies:
- Whitelists: USB/PCI device approval
- Permissions: File permission validation
- Security Systems: SELinux/AppArmor status
- SSH Configuration: Daemon settings verification
- Firewall: Firewall status monitoring
- Checksums: File integrity validation
System Tests¶
Validate system configuration and logs:
- BSP Version: Board support package info
- Dmesg: Kernel message analysis
- Syslog: System log monitoring
Network Tests¶
Verify network interface functionality:
- Ethernet: Interface status and speed
- CAN: CAN bus availability and status
- TCP: Network throughput (FBIT)
Configuration Requirements¶
Tests Requiring Hardware Detection¶
These tests use bit-learn to auto-detect hardware:
- USB Whitelist - Detects connected USB devices
- PCI Whitelist - Detects PCI devices
- Ethernet - Discovers network interfaces
- Temperature - Finds thermal sensors
- Disk Health - Identifies disk devices
- CPU Cores - Counts CPU cores
Tests Requiring User Input¶
These tests need threshold/policy decisions:
- CPU Usage - Utilization threshold
- Memory Usage - Memory threshold
- Disk Usage - Space threshold per disk
- Temperature - Temperature threshold per sensor
- Power - Voltage and power limits
Tests Requiring Manual Configuration¶
These may need manual setup when hardware isn't present:
- CAN - CAN interface names
- GPIO - GPIO pin numbers and states
- Serial Ports - Serial device paths
- SSH Configuration - Expected SSH settings
Test Dependencies¶
Tests That Share Configuration¶
PBIT generates, CBIT consumes:
pbit_usb_whitelist→cbit_usb_whitelistpbit_pci_whitelist→cbit_pci_whitelistpbit_checksum→cbit_checksumpbit_disk_health→cbit_disk_healthpbit_cpu_cores→cbit_cpu_corespbit_ethernet→cbit_ethernet(shares interface list)pbit_temperature→cbit_temperature(shares thresholds)
Independent Tests¶
These tests have standalone configurations:
- All FBIT tests
pbit_cpu_usage/cbit_cpu_usagepbit_memory_usage/cbit_memory_usagepbit_disk_usage/cbit_disk_usage- Security configuration tests (SSH, firewall, SELinux/AppArmor)
Privilege Requirements¶
Tests Requiring Root/Sudo¶
pbit_dmesg_check/cbit_dmesg_check- Kernel buffer accesspbit_can/cbit_can- Network device controlpbit_gpio/cbit_gpio- GPIO sysfs accesspbit_disk_health/cbit_disk_health- SMART data (requires smartctl)- All FBIT tests - Hardware access
Tests Running as Normal User¶
pbit_cpu_usage/cbit_cpu_usagepbit_memory_usage/cbit_memory_usagepbit_disk_usage/cbit_disk_usagepbit_ethernet/cbit_ethernet(read-only)pbit_usb_whitelist/cbit_usb_whitelist(read-only)pbit_pci_whitelist/cbit_pci_whitelist(read-only)
Test Selection Guide¶
Minimal Deployment (Resource-Constrained)¶
Essential tests only:
# PBIT
pbit_cpu_cores
pbit_disk_health
pbit_memory_usage
# CBIT (reduced frequency)
cbit_disk_usage (frequency = 300)
cbit_temperature (frequency = 120)
Standard Deployment (Typical Systems)¶
Comprehensive monitoring:
Security-Critical Deployment¶
Maximum security monitoring:
# All PBIT tests enabled
# CBIT whitelists with fast frequencies (5s)
# All security tests enabled
cbit_usb_whitelist (frequency = 5)
cbit_pci_whitelist (frequency = 5)
cbit_permissions_verification (frequency = 30)
cbit_ssh_configuration (frequency = 30)
cbit_firewall_configuration (frequency = 60)
Manufacturing/Factory¶
FBIT validation suite:
# All FBIT tests
fbit_can_data
fbit_serial_data
fbit_gpio_data
fbit_ssd
fbit_usb
fbit_tcp_data
fbit_video
fbit_pci
fbit_system_data
Common Test Combinations¶
Boot Validation¶
bit-manager \
-t pbit_cpu_cores \
-t pbit_cpu_usage \
-t pbit_memory_usage \
-t pbit_disk_health \
-t pbit_disk_usage \
-t pbit_ethernet \
-o
Network Validation¶
Security Audit¶
bit-manager \
-t pbit_usb_whitelist \
-t pbit_pci_whitelist \
-t pbit_firewall_configuration \
-t pbit_ssh_configuration \
-t pbit_selinux_apparmor_status \
-t pbit_permissions_verification \
-o
Resource Monitoring¶
bit-manager \
-t cbit_cpu_usage \
-t cbit_memory_usage \
-t cbit_disk_usage \
-t cbit_temperature \
-t cbit_power_consumption \
-o
Test Naming Convention¶
All tests follow a consistent naming pattern:
<type>_<component>_<aspect>
Examples:
pbit_cpu_usage # PBIT test for CPU usage
cbit_disk_health # CBIT test for disk health
fbit_serial_data # FBIT test for serial data
Type Prefixes:
- pbit_ - Power-On Built-In Test
- cbit_ - Continuous Built-In Test
- fbit_ - Factory Built-In Test
Finding More Information¶
Per-Test Documentation¶
Detailed information for each test:
- PBIT Tests - All power-on tests
- CBIT Tests - All continuous tests
- FBIT Tests - All factory tests
Using bit-inspect¶
# List all tests
bit-inspect
# Get details on specific test
bit-inspect pbit_cpu_usage
# View configuration
bit-inspect pbit_cpu_usage | grep -A 10 "Config Details"
Source Code Documentation¶
Each test includes inline documentation:
# View test source
cat pbit_cpu_usage/src/pbit_cpu_usage.rs
# View Rust docs
cargo doc --open --no-deps -p pbit_cpu_usage
Next Steps¶
- PBIT Tests - Detailed PBIT test reference
- CBIT Tests - Detailed CBIT test reference
- FBIT Tests - Detailed FBIT test reference
- Running Tests - How to execute tests
- Test Types - Understanding test types