uutils / uutils/coreutils

ls: gnu test case `capability` compatibility

Open
#6,540 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

This issue is for the Gnu test case capability.sh for util. This test case is used to check whether ls correctly colors the files with the Linux capabilities with ca color indicator.

Example

touch file1 file2
sudo setcap 'cap_net_bind_service=ep' file1
LS_COLORS="ca=30;41" ls --color=always

should produce output like this

^[[0m^[[30;41mfile1^[[0m     <-------------- correctly colors file with the capabilities set
file2

but uu_ls produce output like this

file1     <-------------- no color for the same file
file2

This test also checks that, whether the ex indicator is given or not, the ca indicator should be used to color the file with the capabilities.

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 the Gnu test case capability.sh for util and reproduce the example using setcap, LS_COLORS, and uu_ls. Compare the output with GNU ls, then make the test pass so files with Linux capabilities use the ca indicator whether or not the ex indicator is present.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, rust, shell
Domain
cli, operating-systems, testing-qa
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.