File tree 4 files changed +22
-16
lines changed
4 files changed +22
-16
lines changed Original file line number Diff line number Diff line change 189
189
"hash" : " QmVvJ27GcLaLSXvcB4auk3Gn3xuWK5ti5ENkZ2pCoJEYW4" ,
190
190
"name" : " autobatch" ,
191
191
"version" : " 0.2.0"
192
+ },
193
+ {
194
+ "author" : " whyrusleeping" ,
195
+ "hash" : " QmdCL8M8DXJdSRnwhpDhukX5r8ydjxnzPJpaKrFudDA8yn" ,
196
+ "name" : " hang-fds" ,
197
+ "version" : " 0.0.0"
192
198
}
193
199
],
194
200
"gxVersion" : " 0.4.0" ,
Original file line number Diff line number Diff line change @@ -54,10 +54,18 @@ multihash_src:
54
54
$(eval MULTIHASH_HASH := $(shell cd .. && bin/gx deps find go-multihash) )
55
55
$(eval MULTIHASH_SRC := gx/ipfs/$(MULTIHASH_HASH ) /go-multihash)
56
56
57
+ hang-fds_src :
58
+ $(eval HANG_FDS_HASH := $(shell cd .. && bin/gx deps find hang-fds) )
59
+ $(eval HANG_FDS_SRC := gx/ipfs/$(HANG_FDS_HASH ) /hang-fds)
60
+
57
61
bin/multihash : multihash_src $(call find_go_files, $(MULTIHASH_SRC ) ) IPFS-BUILD-OPTIONS
58
62
@echo " *** installing $@ ***"
59
63
go build $(GOFLAGS ) -o bin/multihash $(MULTIHASH_SRC ) /multihash
60
64
65
+ bin/hang-fds : hang-fds_src $(call find_go_files, $(HANG_FDS_SRC ) ) IPFS-BUILD-OPTIONS
66
+ @echo " *** installing $@ ***"
67
+ go build $(GOFLAGS ) -o bin/hang-fds $(HANG_FDS_SRC )
68
+
61
69
iptb_src :
62
70
$(eval IPTB_HASH := $(shell cd .. && bin/gx deps find iptb) )
63
71
$(eval IPTB_SRC := gx/ipfs/$(IPTB_HASH ) /iptb)
Original file line number Diff line number Diff line change 8
8
9
9
T = $(sort $(wildcard t[0-9][0-9][0-9][0-9]-* .sh) )
10
10
BINS = bin/random bin/multihash bin/ipfs bin/pollEndpoint \
11
- bin/iptb bin/go-sleep bin/random-files
11
+ bin/iptb bin/go-sleep bin/random-files bin/hang-fds
12
12
SHARNESS = lib/sharness/sharness.sh
13
13
IPFS_ROOT = ../..
14
14
Original file line number Diff line number Diff line change @@ -129,21 +129,13 @@ test_expect_success "daemon raised its fd limit" '
129
129
grep "raised file descriptor limit to 1024." actual_daemon > /dev/null
130
130
'
131
131
132
- get_col_four () {
133
- awk ' { print $4 }' $1
134
- }
135
-
136
- if [ ` uname` == " Linux" ]; then
137
- test_expect_success " get fd limit through /proc" '
138
- cat /proc/$IPFS_PID/limits > limits &&
139
- grep "Max open files" limits > fd_limits_line &&
140
- limit=$(get_col_four fd_limits_line)
141
- '
142
-
143
- test_expect_success " limit from system looks good" '
144
- test "$limit" -eq 1024
145
- '
146
- fi
132
+ test_expect_success " daemon actually can handle 1024 file descriptors" '
133
+ hang-fds -hold=2s 1000 ' $API_MADDR '
134
+ '
135
+
136
+ test_expect_success " daemon didnt throw any errors" '
137
+ test_expect_code 1 grep "too many open files" daemon_err
138
+ '
147
139
148
140
test_kill_ipfs_daemon
149
141
You can’t perform that action at this time.
0 commit comments