[Bug 12616] New: realpath/readlink is incompatible with coreutils implementation
bugzilla at busybox.net
bugzilla at busybox.net
Sat Mar 7 20:25:25 UTC 2020
https://bugs.busybox.net/show_bug.cgi?id=12616
Bug ID: 12616
Summary: realpath/readlink is incompatible with coreutils
implementation
Product: Busybox
Version: 1.31.x
Hardware: All
OS: Linux
Status: NEW
Severity: minor
Priority: P5
Component: Standard Compliance
Assignee: unassigned at busybox.net
Reporter: koichi at nksm.name
CC: busybox-cvs at busybox.net
Target Milestone: ---
Version:
https://git.busybox.net/busybox/commit/?id=9aa751b08ab03d6396f86c3df77937a19687981b
----------------
Repro 1:
$ cd /tmp
$ ln -s no-such-a-file symlink
Coreutils (expected):
$ readlink -f /tmp/symlink
/tmp/no-such-a-file
$ realpath /tmp/symlink
/tmp/no-such-a-file
Busybox (incorrect):
$ readlink -f symlink
/tmp/symlink
$ realpath symlink
/tmp/symlink
----------------
Repro 2:
$ cd /usr/bin
Coreutils (expected):
$ readlink -f ../.../
/usr/...
$ realpath ../.../
/usr/...
Busybox (incorrect):
$ readlink -f ../.../
(none, exit status: 1)
$ realpath ../.../
realpath: ../...: No such file or directory
----------------
Repro 3:
Coreutils (expected):
$ readlink -f /no-such-a-file
/no-such-a-file
$ realpath /no-such-a-file
/no-such-a-file
Busybox (incorrect):
$ readlink -f /no-such-a-file
(none, exit status: 1)
$ realpath /no-such-a-file
realpath: : No such file or directory
----------------
Repro 4:
$ cd /
Coreutils (expected):
$ readlink -f /./no-such-a-file
/no-such-a-file
$ realpath /./no-such-a-file
/no-such-a-file
Busybox (incorrect):
$ readlink -f /./no-such-a-file
//no-such-a-file
$ realpath /./no-such-a-file
//no-such-a-file
----------------
Repro 5:
$ cd /
$ ln -s ./no-such-a-file2 /symlink2
Coreutils (expected):
$ readlink -f symlink2
/no-such-a-file2
$ realpath symlink2
/no-such-a-file2
Busybox (incorrect):
$ readlink -f /symlink2
/./no-such-a-file2
$ realpath symlink2
/./no-such-a-file2
----------------
This is a different bug from
- https://bugs.busybox.net/show_bug.cgi?id=11021
- https://bugs.busybox.net/show_bug.cgi?id=11956
This bug was found during the development of
https://github.com/ko1nksm/readlinkf. It may be your help.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list