diffutils > /dev/full panics

Open
#165 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Reproduce the three commands using /dev/full, then inspect src/diff.rs:94:41 and the output paths used by diff, cmp, and the utility-name error. Trace how stdout write failures are handled; done means these cases report the I/O error without panicking.

Written by the indexing model from the issue text.

Description

$ diffutils > /dev/full
Expected utility name as second argument, got nothing.

thread 'main' (20009) panicked at library/std/src/io/stdio.rs:1165:9:
failed printing to stdout: No space left on device (os error 28)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

$ diffutils diff /dev/null /etc/hosts > /dev/full

thread 'main' (20028) panicked at src/diff.rs:94:41:
called `Result::unwrap()` on an `Err` value: Os { code: 28, kind: StorageFull, message: "No space left on device" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

$ diffutils cmp /etc/mtab /etc/hosts > /dev/full

thread 'main' (20087) panicked at library/std/src/io/stdio.rs:1165:9:
failed printing to stdout: No space left on device (os error 28)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Dominant language
Rust
Stars
276
Forks
39
Avg merge
3h 27m
Merged PRs (30d)
3

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.

More from uutils/diffutils

All issues in uutils/diffutils

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.