Code Monkey home page Code Monkey logo

Comments (16)

freeekanayaka avatar freeekanayaka commented on July 22, 2024

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.

freeekanayaka avatar freeekanayaka commented on July 22, 2024

Also, what's the output of ls -ld /proc/1 on your system?

from raft.

freeekanayaka avatar freeekanayaka commented on July 22, 2024

And of stat /proc/1/root too please.

from raft.

amiloradovsky avatar amiloradovsky commented on July 22, 2024
$ 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.

freeekanayaka avatar freeekanayaka commented on July 22, 2024

Are you running the tests as root?

from raft.

amiloradovsky avatar amiloradovsky commented on July 22, 2024

No, as dedicated user for the building.

from raft.

freeekanayaka avatar freeekanayaka commented on July 22, 2024

What's the output of:

make test/unit/uv && strace ./test/unit/uv --no-fork uvEnsureDir/statError

?

from raft.

amiloradovsky avatar amiloradovsky commented on July 22, 2024

strace.log
make-test-unit-uv.log

from raft.

freeekanayaka avatar freeekanayaka commented on July 22, 2024

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.

amiloradovsky avatar amiloradovsky commented on July 22, 2024

guix-build.log

    (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.

amiloradovsky avatar amiloradovsky commented on July 22, 2024

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.

freeekanayaka avatar freeekanayaka commented on July 22, 2024

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.

amiloradovsky avatar amiloradovsky commented on July 22, 2024

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.

freeekanayaka avatar freeekanayaka commented on July 22, 2024

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.

freeekanayaka avatar freeekanayaka commented on July 22, 2024

(this is should be fixed in the last v0.9.9 release tag that I just pushed).

from raft.

amiloradovsky avatar amiloradovsky commented on July 22, 2024

OK. Thank you.

from raft.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.