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 shutdown check in t0023 #3969

Merged
merged 1 commit into from
Jun 11, 2017
Merged
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
6 changes: 5 additions & 1 deletion test/sharness/t0023-shutdown.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ test_expect_success "shutdown succeeds" '
'

test_expect_success "daemon no longer running" '
test_expect_code 1 kill -0 $IPFS_PID
for i in $(test_seq 1 100)
do
go-sleep 100ms
! kill -0 $IPFS_PID 2>/dev/null && return
done
Copy link
Member

Choose a reason for hiding this comment

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

I think it will never fail.

Copy link
Member Author

Choose a reason for hiding this comment

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

Its exactly the same code as the other kill check, and that one works

Copy link
Member Author

Choose a reason for hiding this comment

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

If kill -0 $IPFS_PID fails, then it returns. which seems right to me

'

test_launch_ipfs_daemon --offline
Expand Down