Comments (16)
Actually locale has nothing to do this this.
The test fails because it expects an error: uvEnsureDir("/proc/1/root", &errmsg)
should return UV__ERROR
(where UV__ERROR
is defined as 1
), but it returns 0
instead, hence the (0 == 1)
diagnostic message.
Are you running the tests as root?
from raft.
Also, what's the output of ls -ld /proc/1
on your system?
from raft.
And of stat /proc/1/root
too please.
from raft.
$ LANG=C ls -ld /proc/1
dr-xr-xr-x 9 root root 0 Oct 30 14:42 /proc/1/
$ LANG=C stat /proc/1/root
File: /proc/1/rootstat: cannot read symbolic link '/proc/1/root': Permission denied
Size: 0 Blocks: 0 IO Block: 1024 symbolic link
Device: 5h/5d Inode: 332292 Links: 1
Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2019-10-31 12:51:44.641357192 +0300
Modify: 2019-10-31 12:51:43.049355999 +0300
Change: 2019-10-31 12:51:43.049355999 +0300
Birth: -
# LANG=C ls -l /proc/1/root
lrwxrwxrwx 1 root root 0 Oct 31 12:51 /proc/1/root -> /
from raft.
Are you running the tests as root?
from raft.
No, as dedicated user for the building.
from raft.
What's the output of:
make test/unit/uv && strace ./test/unit/uv --no-fork uvEnsureDir/statError
?
from raft.
strace.log
make-test-unit-uv.log
from raft.
The strace.log you attached contains:
write(1, "[ OK ] [ 0.00005429 / 0.00002"..., 95[ OK ] [ 0.00005429 / 0.00002694 CPU ]
1 of 1 (100%) tests successful, 0 (0%) test skipped.
which means that the test didn't fail. Please attach an strace.log where the test actually fails (e.g. running the command as part of your build/test process).
from raft.
(arguments '(#:configure-flags '("--enable-uv")
#:parallel-tests? #f
;; #:tests? #f
#:phases
(modify-phases
%standard-phases
(add-before 'check 'strace
(lambda _
(invoke "make" "test/unit/uv")
(invoke "strace" "test/unit/uv"
"--no-fork" "uvEnsureDir/statError"))))))
from raft.
Just inserted
(invoke "whoami")
(invoke "stat" "/proc/1/root")
and it says
nixbld
File: /proc/1/root -> /
Size: 0 Blocks: 0 IO Block: 1024 symbolic link
Device: 2eh/46d Inode: 817723 Links: 1
Access: (0777/lrwxrwxrwx) Uid: ( 999/ nixbld) Gid: (30000/ nixbld)
Access: 2019-10-31 13:39:50.778838105 +0000
Modify: 2019-10-31 13:39:50.778838105 +0000
Change: 2019-10-31 13:39:50.778838105 +0000
Birth: -
Apparently the builder has more permissions than my regular unprivileged user.
I'm not sure what the test is supposed to check, but I guess we by now have all the information.
from raft.
The test is supposed to check that the attempt to create the data dir fail if the process has not enough privileges to do so. I can put it place a workaround which skips the test if /proc/1/root is actually accessible by the test process.
from raft.
A little tangent:
I've just managed to build dqlite
on Guix, but only at the cost of disabling the tests in all the packages in the stack, all the way down to libuv
(including libuv itself). Didn't try if it's really working yet. But the need to disable the tests everywhere is kind of worrisome.
from raft.
The tests all pass on Travis, which is the project's official CI. If have an environment which differs from the one that Travis sets up, please just report your failures like this one and I'll be happy to fix them.
from raft.
(this is should be fixed in the last v0.9.9 release tag that I just pushed).
from raft.
OK. Thank you.
from raft.
Related Issues (20)
- missing getrandom on centos 7 HOT 1
- [question] Usage of raft_add, raft_remove, and raft_assign HOT 2
- [question] When is the first leader elected? HOT 2
- recvAppendEntries: Assertion `r->state == RAFT_FOLLOWER || r->state == RAFT_CANDIDATE` failed HOT 9
- [question] Forwarding request to leader HOT 8
- Potential use-after-free in handling of raft_transfer HOT 5
- Fix the 32-bit CI HOT 1
- can't build on m1 mac (`<linux/xxxxx.h>` is missing) HOT 3
- v1.x RFC: pull based approach HOT 5
- raft_start(): io: closed segment xxx is past last snapshot xxx HOT 4
- [question] Understanding how to add new servers HOT 15
- ./configure fails when no external dependency is found HOT 4
- Assertion: src/uv_truncate.c:168: UvTruncate: Assertion `index < uv->append_next_index' failed. HOT 3
- src/replication.c:457: getRequest: Assertion `req->type == type' failed. HOT 3
- Segment writes blocked when taking a snapshot. HOT 3
- src/log.c:87: refsTryInsert: Assertion `next_slot->term != term' failed. HOT 9
- Jepsen: Another truncate-related assertion failure
- [suggestion] add lock/unlock function pointers to raft_io (and use them) HOT 1
- `uvOsFallocateEmulation` taking too long time HOT 1
- CI: `xfs` test failures HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from raft.