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

t0060: expect success with stdin #1277

Closed
wants to merge 1 commit into from
Closed

Conversation

chriscool
Copy link
Contributor

This issue has been fixed by merging PR #1263 or PR #1238.
This fixes issue #861 (Strange error trying to run the daemon through supervisord).

License: MIT
Signed-off-by: Christian Couder [email protected]

@jbenet jbenet added the status/in-progress In progress label May 22, 2015
@chriscool
Copy link
Contributor Author

I had a look at the output of Travis for some other PR and indeed it looks like issue #861 is fixed.

@chriscool
Copy link
Contributor Author

It looks like curl is not installed on the Jenkins machine:

curl is required to run tests. please install it
make: *** [curl] Error 1
Build step 'Execute shell' marked build as failure
Finished: FAILURE

@chriscool
Copy link
Contributor Author

The Travis builds failed with:

expecting success: 
    echo "Error: open $IPFS_PATH/repo.lock: permission denied" > init_fail_exp &&
    test_cmp init_fail_out init_fail_exp
> diff -u init_fail_out init_fail_exp
--- init_fail_out   2015-05-22 03:40:35.000000000 +0000
+++ init_fail_exp   2015-05-22 03:40:35.000000000 +0000
@@ -1,2 +1 @@
-Error: ipfs daemon is running. please stop it to run this command
-Use 'ipfs init --help' for information about this command
+Error: open /Users/travis/gopath/src/github.com/ipfs/go-ipfs/test/sharness/trash directory.t0020-init.sh/.badipfs/repo.lock: permission denied
not ok 3 - ipfs init output looks good
#   
#       echo "Error: open $IPFS_PATH/repo.lock: permission denied" > init_fail_exp &&
#       test_cmp init_fail_out init_fail_exp
#   

@whyrusleeping
Copy link
Member

that last travis failure is fixed by #1276

This issue has been fixed by merging PR #1263 or PR #1238.

License: MIT
Signed-off-by: Christian Couder <[email protected]>
@jbenet
Copy link
Member

jbenet commented May 22, 2015

rebased on #1276 -- let's see what happens

@jbenet
Copy link
Member

jbenet commented May 22, 2015

i think this is unrelated, but @chriscool thoughts on this failure? https://travis-ci.org/ipfs/go-ipfs/jobs/63627076#L2979

expecting success: 
        kill -0 $IPFS_PID

./t0090-get.sh: 2: kill: No such process
not ok 42 - 'ipfs daemon' is still running
#   
#           kill -0 $IPFS_PID
#       
expecting success: 
        test_kill_repeat_10_sec $IPFS_PID

./t0090-get.sh: 247: kill: No such process

@jbenet
Copy link
Member

jbenet commented May 22, 2015

Odd, @travisperson take a look at: https://travis-ci.org/ipfs/go-ipfs/jobs/63627091

--- FAIL: TestResolveInvalidPath (0.02s)
    pathresolver_test.go:18: Should get invalid path. ipfs path must contain at least one component
FAIL
FAIL    github.com/ipfs/go-ipfs/core    0.031s

looks like your test fails?

@chriscool
Copy link
Contributor Author

Here are the Travis errors now:

--- FAIL: TestResolveInvalidPath (0.02s)
    pathresolver_test.go:18: Should get invalid path. ipfs path must contain at least one component
FAIL
FAIL    github.com/ipfs/go-ipfs/core    0.031s
expecting success: 
    export IPFS_PATH="$IPTB_ROOT/2" &&
    ipfs cat $FILEA_HASH >fileb
Error: context deadline exceeded
not ok 3 - cat that file on node2
#   
#       export IPFS_PATH="$IPTB_ROOT/2" &&
#       ipfs cat $FILEA_HASH >fileb
#   
expecting success: 
        IPFS_PID=$! &&
        pollEndpoint -ep=/version -host=$ADDR_API -v -tout=1s -tries=60 2>poll_apierr > poll_apiout ||
        test_fsh cat actual_daemon || test_fsh cat daemon_err || test_fsh cat poll_apierr || test_fsh cat poll_apiout

> cat actual_daemon
Initializing daemon...
API server listening on /ip4/127.0.0.1/tcp/5432
Gateway (readonly) server listening on /ip4/127.0.0.1/tcp/8432
Publishing!
> cat daemon_err
Error: listen tcp4 127.0.0.1:5432: bind: address already in use
> cat poll_apierr
> cat poll_apiout
time="2015-05-22T10:14:21Z" level=debug msg=starting timeout=1s tries=60 url="http://127.0.0.1:5432/version" when=2015-05-22 10:14:21.677571562 +0000 UTC 
time="2015-05-22T10:14:21Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=60 
time="2015-05-22T10:14:22Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=59 
time="2015-05-22T10:14:23Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=58 
time="2015-05-22T10:14:24Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=57 
time="2015-05-22T10:14:25Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=56 
time="2015-05-22T10:14:26Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=55 
time="2015-05-22T10:14:27Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=54 
time="2015-05-22T10:14:28Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=53 
time="2015-05-22T10:14:29Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=52 
time="2015-05-22T10:14:30Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=51 
time="2015-05-22T10:14:31Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=50 
time="2015-05-22T10:14:32Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=49 
time="2015-05-22T10:14:33Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=48 
time="2015-05-22T10:14:34Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=47 
time="2015-05-22T10:14:35Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=46 
time="2015-05-22T10:14:36Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=45 
time="2015-05-22T10:14:37Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=44 
time="2015-05-22T10:14:38Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=43 
time="2015-05-22T10:14:39Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=42 
time="2015-05-22T10:14:40Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=41 
time="2015-05-22T10:14:41Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=40 
time="2015-05-22T10:14:42Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=39 
time="2015-05-22T10:14:43Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=38 
time="2015-05-22T10:14:44Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=37 
time="2015-05-22T10:14:45Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=36 
time="2015-05-22T10:14:46Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=35 
time="2015-05-22T10:14:47Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=34 
time="2015-05-22T10:14:48Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=33 
time="2015-05-22T10:14:49Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=32 
time="2015-05-22T10:14:50Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=31 
time="2015-05-22T10:14:51Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=30 
time="2015-05-22T10:14:52Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=29 
time="2015-05-22T10:14:53Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=28 
time="2015-05-22T10:14:54Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=27 
time="2015-05-22T10:14:55Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=26 
time="2015-05-22T10:14:56Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=25 
time="2015-05-22T10:14:57Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=24 
time="2015-05-22T10:14:58Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=23 
time="2015-05-22T10:15:00Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=22 
time="2015-05-22T10:15:01Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=21 
time="2015-05-22T10:15:02Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=20 
time="2015-05-22T10:15:03Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=19 
time="2015-05-22T10:15:04Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=18 
time="2015-05-22T10:15:05Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=17 
time="2015-05-22T10:15:06Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=16 
time="2015-05-22T10:15:07Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=15 
time="2015-05-22T10:15:08Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=14 
time="2015-05-22T10:15:09Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=13 
time="2015-05-22T10:15:10Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=12 
time="2015-05-22T10:15:11Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=11 
time="2015-05-22T10:15:12Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=10 
time="2015-05-22T10:15:13Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=9 
time="2015-05-22T10:15:14Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=8 
time="2015-05-22T10:15:15Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=7 
time="2015-05-22T10:15:16Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=6 
time="2015-05-22T10:15:17Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=5 
time="2015-05-22T10:15:18Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=4 
time="2015-05-22T10:15:19Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=3 
time="2015-05-22T10:15:20Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=2 
time="2015-05-22T10:15:21Z" level=debug msg="get failed" error="Get http://127.0.0.1:5432/version: EOF" tries=1 
time="2015-05-22T10:15:22Z" level=info msg=failed. 
not ok 22 - 'ipfs daemon' is ready
#   
#           IPFS_PID=$! &&
#           pollEndpoint -ep=/version -host=$ADDR_API -v -tout=1s -tries=60 2>poll_apierr > poll_apiout ||
#           test_fsh cat actual_daemon || test_fsh cat daemon_err || test_fsh cat poll_apierr || test_fsh cat poll_apiout
#       

@chriscool
Copy link
Contributor Author

@jbenet by the way above you ask me about https://travis-ci.org/ipfs/go-ipfs/jobs/63627091 which contains:

kill -0 $IPFS_PID

./t0090-get.sh: 2: kill: No such process
not ok 42 - 'ipfs daemon' is still running
...

but this is not the first error in the tests. There is one "not ok 22 - 'ipfs daemon' is ready" failure before.
And the "not ok 22" error looks similar to the last error in my comment just above this one.

@chriscool
Copy link
Contributor Author

In fact both "not ok 22" errors contain the following line:

Error: listen tcp4 127.0.0.1:5432: bind: address already in use

so it looks like we have to randomize ports more or something like that.

@whyrusleeping
Copy link
Member

whats the status here? is this RFM?

@chriscool
Copy link
Contributor Author

@whyrusleeping yeah, it would be nice if you could merge it as the Travis errors are not related.

@jbenet
Copy link
Member

jbenet commented May 24, 2015

I get:

Error: no ipfs repo found in '/Users/jbenet/go/src/github.com/ipfs/go-ipfs/test/sharness/trash directory.t0060-daemon.sh/.ipfs'. please run: ipfs init
not ok 4 - ipfs peer id looks good
#
#     PEERID=$(ipfs config Identity.PeerID) &&
#     echo $PEERID | tr -dC "[:alnum:]" | wc -c | tr -d " " >actual &&
#     echo "46" >expected &&
#     test_cmp_repeat_10_sec expected actual
#

locally in OSX.

@chriscool
Copy link
Contributor Author

@jbenet maybe but the change made by this PR is at the bottom of t0060 (test number 13) while the "ipfs peer id looks good" is test number 4 in t0060, so it is not related to this PR.

@chriscool
Copy link
Contributor Author

@jbenet by the way I tried to reproduce the "Error: no ipfs repo found in ..." on my Linux machine, by running for i in $(seq 1 20); do ./t0060-daemon.sh; done but it never failed. Running ./t0060-daemon.sh after building with -race also doesn't show any data race.

@cryptix
Copy link
Contributor

cryptix commented May 29, 2015

Fixed by #1297

@cryptix cryptix closed this May 29, 2015
@jbenet jbenet removed the status/in-progress In progress label May 29, 2015
@jbenet
Copy link
Member

jbenet commented May 29, 2015

@chriscool if #1297 did not fix pls reopen. sorry for the delay

@whyrusleeping whyrusleeping mentioned this pull request Jun 2, 2015
58 tasks
@whyrusleeping whyrusleeping mentioned this pull request Jun 9, 2015
50 tasks
@jbenet jbenet mentioned this pull request Jun 16, 2015
55 tasks
@chriscool chriscool deleted the t0060-stdin-works branch April 30, 2016 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants