uutils / uutils/coreutils

df, Windows: Not compatible with RAM disk

Open
#10,452 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

U - df
Dominant language
Rust
Stars
24.1k
Forks
2k
Avg merge
1d 5h
Merged PRs (30d)
365

Description

The GitHub action

- name: Setup RAM disk
  if: matrix.job.os == 'windows-latest'
  shell: powershell
  run: |
    choco install imdisk -y
    imdisk -a -s 3G -m Z: -p "/fs:exfat /q /y"
    echo "CARGO_TARGET_DIR=Z:\cargo-target" >> $env:GITHUB_ENV
    echo "TMP=Z:" >> $env:GITHUB_ENV
    echo "TEMP=Z:" >> $env:GITHUB_ENV

caused

failures:
---- filesystem::tests::mount_info_from_path::test_dev_name_match stdout ----
thread 'filesystem::tests::mount_info_from_path::test_dev_name_match' (6148) panicked at src\uu\df\src\filesystem.rs:297:18:
Failed to canonicalize tmp path: Os { code: 1, kind: Uncategorized, message: "Incorrect function." }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
    filesystem::tests::mount_info_from_path::test_dev_name_match
test result: FAILED. 49 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s
error: test failed, to rerun pass `-p uu_df --lib`

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/uu/df/src/filesystem.rs at the canonicalization failure reported near line 297, then run filesystem::tests::mount_info_from_path::test_dev_name_match or cargo test -p uu_df --lib on the Windows RAM-disk setup. Trace why the RAM disk path cannot be canonicalized and verify that the test passes without breaking the other df filesystem tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.