oxidecomputer / oxidecomputer/humility
`humility ringbuf list` table is misaligned when a ringbuf has a long path
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 584
- Forks
- 63
- Avg merge
- 3h
- Merged PRs (30d)
- 2
Description
If the path to a ringbuf is longer than 30 characters, the ADDR and SIZE columns in the table printed by humility ringbuf list aren't aligned nicely. And, it turns out that when building Humility for a Gimlet, there are several ringbufs with paths longer than 30 characters:
eliza@cadbury ~ $ pfexec humility -t c71 ringbuf --list
humility: attached to 0483:3754:001100184741500820383733 via ST-Link V3
MODULE BUFFER ADDR SIZE
gimlet_seq drv_gimlet_seq_server::__RINGBUF 0x2403e640 3088
power drv_i2c_devices::adm1272::__RINGBUF 0x2403d500 652
thermal drv_i2c_devices::max31790::__RINGBUF 0x24003770 84
sbrmi drv_i2c_devices::sbrmi::__RINGBUF 0x2404d4ec 252
gimlet_seq drv_oxide_vpd::__RINGBUF 0x2403f250 108
host_sp_comms drv_oxide_vpd::__RINGBUF 0x24021ab0 108
gimlet_seq drv_packrat_vpd_loader::__RINGBUF 0x2403f2bc 588
sbrmi drv_sbrmi::__RINGBUF 0x2404d320 460
spi2_driver drv_stm32h7_spi_server_core::__RINGBUF 0x24048368 1036
sprot drv_stm32h7_spi_server_core::__RINGBUF 0x24034000 1036
sprot drv_stm32h7_sprot_server::__RINGBUF 0x2403440c 1804
i2c_driver drv_stm32xx_i2c::__RINGBUF 0x24049bb4 780
spd drv_stm32xx_i2c::__RINGBUF 0x2404a48c 780
i2c_driver drv_stm32xx_i2c_server::__RINGBUF 0x24049380 2100
net ksz8463::__RINGBUF 0x24019628 268
host_sp_comms ksz8463::__RINGBUF 0x24027c9c 268
update_server stm32h7_update_server::__RINGBUF 0x24045800 1036
control_plane_agent task_control_plane_agent::CRITICAL 0x2402b850 656
control_plane_agent task_control_plane_agent::__RINGBUF 0x24029000 1040
control_plane_agent task_control_plane_agent::update::rot::__RINGBUF 0x2402b244 1548
dump_agent task_dump_agent::__RINGBUF 0x24038960 60
dump_agent task_dump_agent::udp::__RINGBUF 0x240389a0 528
hiffy task_hiffy::stm32h7::__RINGBUF 0x24008408 1548
host_sp_comms task_host_sp_comms::__RINGBUF 0x24021000 2736
jefe task_jefe::dump::__RINGBUF 0x2404c600 236
jefe task_jefe::external::__RINGBUF 0x2404c6ec 60
net task_net::mgmt::__RINGBUF 0x24012158 528
packrat task_packrat::__RINGBUF 0x24006380 656
power task_power::__RINGBUF 0x2403c9c8 44
power task_power::bsp::__RINGBUF 0x2403c9f4 2828
spd task_spd::__RINGBUF 0x2404a380 268
thermal task_thermal::__RINGBUF 0x240039e0 784
validate task_validate::__RINGBUF 0x240443e8 1036
net vsc85xx::__RINGBUF 0x240197b4 204
Humility version:
eliza@cadbury ~ $ pfexec humility --version
humility 0.10.38
My guess is that the current lengths of these columns was selected to fit nicely in an 80-column terminal, which makes sense. But, when there are long paths, it's hard to read regardless of the terminal, and making the terminal wider doesn't help. We probably want to default to the current lengths, but scan the ringbuf paths first to see if there's any entry that's too long, and make it wider in that case?
Alternatively, since the address and size columns are almost always much shorter, we could just put them first, although I'll admit it's kinda weird to see the address and size without knowing what it is that you're looking at (as a right-to-left language reader)...
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the humility ringbuf list command and reproduce the output using a Gimlet or the long ringbuf paths shown in the report. Check the table formatting and verify that ADDR and SIZE remain aligned when paths exceed 30 characters, while the existing short-path layout is preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, devtools
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100