Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failing test and the false negative CI #19

Merged
merged 3 commits into from
Jun 30, 2020
Merged
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
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.SHELLFLAGS = -ec
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 isn't that usually the default? Is that some weird configuration in GH Actions?

edit: ah! interesting https://www.gnu.org/software/make/manual/html_node/Choosing-the-Shell.html

The default value of .SHELLFLAGS is -c normally, or -ec in POSIX-conforming mode.

PACKAGES ?= mountinfo mount
BINDIR ?= _build/bin

Expand Down
4 changes: 2 additions & 2 deletions mountinfo/mountinfo_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,10 @@ func unescape(path string) (string, error) {
case '0', '1', '2', '3', '4', '5', '6', '7':
v := c - '0'
for j := 2; j < 4; j++ { // one digit already; two more
x := s[j] - '0'
if x < 0 || x > 7 {
kolyshkin marked this conversation as resolved.
Show resolved Hide resolved
if s[j] < '0' || s[j] > '7' {
return "", fmt.Errorf("bad escape sequence %q: not a digit", s[:3])
}
x := s[j] - '0'
v = (v << 3) | x
}
if v > 255 {
Expand Down
2 changes: 1 addition & 1 deletion mountinfo/mountinfo_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ func TestParseMountinfoWithSpaces(t *testing.T) {
Opts: "rw,relatime",
Optional: "",
Fstype: "cifs",
Source: `//foo/BLA\040BLA\040BLA/`,
Source: `//foo/BLA BLA BLA/`,
VfsOpts: `rw,sec=ntlm,cache=loose,unc=\\foo\BLA`,
},
{
Expand Down