mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4498] [Benchmark] storage kinds ram and network; a btrfs subvolume resolves to its device #5067
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#5067
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/4498
Author: @coryjett
Created: 10/28/2026
Status: 🔄 Open
Base:
main← Head:fix-bench-storage-kind📝 Commits (1)
87cd510bench: storage kinds ram and network, and a btrfs subvolume resolves to its device (#4493)📊 Changes
2 files changed (+65 additions, -1 deletions)
View changed files
📝
strata_cli/bench_facts.py(+8 -1)➕
tests/terminal/test_bench_facts_storage.py(+57 -0)📄 Description
Problem and result
Fixes #4493.
storage_of(strata_cli/bench_facts.py) read the mount's SOURCE and gave up when it was not a/dev/path. A model copied to/dev/shm(tmpfs), a btrfs subvolume (SOURCE/dev/nvme0n1p2[/@home], theFedora default) and an NFS export (
host:/export) all producedhardware.storage: nullwith the reason "the driveholding the model files could not be identified". Our run in #4468 shows it for /dev/shm.
After: FSTYPE is read with SOURCE. tmpfs, ramfs, devtmpfs and hugetlbfs report
{"kind": "ram", "model": "tmpfs", "bus": "memory"}; nfs*, cifs, smb*, 9p, ceph, glusterfs and fuse.sshfs report{"kind": "network", "model": "<fstype>", "bus": "network"}(the host name stays out of the report); a btrfs[subvolume]suffix is strippedbefore
lsblk, so the disk is found as for any other device. Other sources still give None with the old reason.Related discussion
#4493
Approach
Linux branch of
storage_ofonly; Windows and thelsblkwalk are unchanged. The README line renders as"ram tmpfs (memory)" through the existing "%s %s (%s)" format.
validate()checks that the storage field exists,not its kind values, so the two new kinds pass as they are.
Validation
Passed:
python3.12 -m unittest tests.terminal.test_bench_facts_storage tests.terminal.test_bench_standard tests.terminal.test_bench_facts_amd:Ran 82 tests in 43.762s, OK (1 skipped). Strata Control 0.1.52's bundled Python 3.12.15, Ubuntu 26.10, this branch (main
46c152a1+ this commit).tests/terminal/test_bench_facts_storage.pyon unchanged main: Ran 5 tests in 0.002s FAILED (failures=3) (tmpfs, NFS and btrfs cases fail; the plain-device and unknown-source cases pass as before).Failed:
Not run:
strata bench runwith this branch (the real /dev/shm case is only covered by the unit test with findmnt's output string).Limits
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.