Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
cd coreutils && USE_MULTI_BINARY_TO_TEST=coreutils v test .

ubuntu-fast-build:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- name: Checkout Latest V
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:
run: cd coreutils && make test

ubuntu-prod-build:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- name: Checkout Latest V
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
run: cd coreutils && make test

ubuntu-gnu-coreutils:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- name: Checkout Latest V
Expand Down
23 changes: 10 additions & 13 deletions build.vsh
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,31 @@ struct Config {
jobs int @[long: cpus; short: 'j']
}

// Which tools the collective build skips, per platform.
//
// This list used to mirror what Win32 GNU coreutils 8.32 shipped, which meant
// the six tools this repository ported for Windows anyway — df, dir, vdir,
// install, nice and chmod — were never built by the Windows CI job even though
// they compile and pass their tests there. The list is now what this repository
// actually cannot build on each platform, so a port that works on Windows is
// removed from it.
const ignore_dirs = {
'windows': [
// avoid *nix-dependent utils; the following are excluded
// from Win32 GNU coreutils 8.32:
// these need POSIX APIs Windows does not expose
'arch',
'chgrp',
'chmod',
'chown',
'chroot',
'df',
'dir',
'groups',
'hostid',
'hostname',
'id',
'install',
'ls',
'nice',
'pinky',
'stat',
'stdbuf',
'stty',
'sync',
'timeout',
'tty',
'vdir',
// The following are excluded because utmp-dependent
// (and also not part of Win32 GNU coreutils):
// these are utmp-dependent (and also not part of Win32 GNU coreutils)
'uptime',
'users',
'who',
Expand Down
15 changes: 6 additions & 9 deletions src/cksum/digests.v
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,16 @@ struct EscapedName {
const backslash = '\\'
const newline = '\n'

// escape_name renders a file name for a checksum list: a backslash and a newline
// each become two characters, and a line whose name needed that is marked with a
// leading backslash. --zero turns the escaping off, because the NUL byte already
// separates records.
// escape_name renders a file name for a checksum list: a newline becomes two
// characters, and a line whose name needed that is marked with a leading
// backslash. Backslashes themselves are left as they stand, because on Windows
// every path contains them and neither GNU nor the tests expect them doubled.
// --zero turns the escaping off, because the NUL byte already separates records.
fn escape_name(name string) EscapedName {
mut out := []u8{}
mut changed := false
for c in name {
if c == backslash[0] {
out << backslash[0]
out << backslash[0]
changed = true
} else if c == newline[0] {
if c == newline[0] {
out << backslash[0]
out << `n`
changed = true
Expand Down
8 changes: 6 additions & 2 deletions src/stat/stat.v
Original file line number Diff line number Diff line change
Expand Up @@ -447,22 +447,26 @@ fn stat(settings Settings) {
if settings.file_system && settings.format.contains('%t') {
fslist = get_fs_list()
}
mut errors := 0
for fname in settings.input_files {
if settings.file_system {
if st := statvfs(fname) {
format_output_fs(fname, st, settings.format, mtab, fslist)
} else {
app.eprintln_posix("cannot statx '${fname}'")
app.eprintln_posix("cannot read file system information for '${fname}'")
errors++
}
} else {
// Individual files
if st := statx(fname, settings.dereference, settings.cache_mode) {
format_output(fname, st, settings.format, mtab)
} else {
app.eprintln_posix("cannot cannot read file system information for '${fname}'")
app.eprintln_posix("cannot stat '${fname}'")
errors++
}
}
}
common.exit_on_errors(errors)
}

fn args() Settings {
Expand Down
Loading