Skip to content

Commit

Permalink
Fix failing test and the false negative CI
Browse files Browse the repository at this point in the history
Signed-off-by: Shengjing Zhu <[email protected]>
  • Loading branch information
zhsj committed Jun 25, 2020
1 parent dbb4d68 commit 8e33885
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.SHELLFLAGS = -ec
PACKAGES ?= mountinfo mount
BINDIR ?= _build/bin

Expand Down
2 changes: 1 addition & 1 deletion mountinfo/mountinfo_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ func unescape(path string) (string, error) {
v := c - '0'
for j := 2; j < 4; j++ { // one digit already; two more
x := s[j] - '0'
if x < 0 || x > 7 {
if x > 7 {
return "", fmt.Errorf("bad escape sequence %q: not a digit", s[:3])
}
v = (v << 3) | x
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

0 comments on commit 8e33885

Please sign in to comment.