[PR #4498] [Benchmark] storage kinds ram and network; a btrfs subvolume resolves to its device #5067

Open
opened 2026-11-07 16:32:27 +07:00 by bsakaguchi · 0 comments
Owner

📋 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)

  • 87cd510 bench: 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], the
Fedora default) and an NFS export (host:/export) all produced hardware.storage: null with the reason "the drive
holding 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 stripped
before lsblk, so the disk is found as for any other device. Other sources still give None with the old reason.

#4493

Approach

Linux branch of storage_of only; Windows and the lsblk walk 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).
  • The new tests/terminal/test_bench_facts_storage.py on 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:

  • None observed.

Not run:

  • A new strata bench run with this branch (the real /dev/shm case is only covered by the unit test with findmnt's output string).
  • Windows.

Limits

  • The fstype lists are the common ones; an unlisted network filesystem still reports None with the old reason.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/4498 **Author:** [@coryjett](https://github.com/coryjett) **Created:** 10/28/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix-bench-storage-kind` --- ### 📝 Commits (1) - [`87cd510`](https://github.com/Niko1221/Strata/commit/87cd51021f86b1ca7869b22c1a34a3fd2a1881b4) bench: storage kinds ram and network, and a btrfs subvolume resolves to its device (#4493) ### 📊 Changes **2 files changed** (+65 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `strata_cli/bench_facts.py` (+8 -1) ➕ `tests/terminal/test_bench_facts_storage.py` (+57 -0) </details> ### 📄 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]`, the Fedora default) and an NFS export (`host:/export`) all produced `hardware.storage: null` with the reason "the drive holding 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 stripped before `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_of` only; Windows and the `lsblk` walk 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). - The new `tests/terminal/test_bench_facts_storage.py` on 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:** - None observed. **Not run:** - A new `strata bench run` with this branch (the real /dev/shm case is only covered by the unit test with findmnt's output string). - Windows. ## Limits - The fstype lists are the common ones; an unlisted network filesystem still reports None with the old reason. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#5067
No description provided.