@@ -41,9 +41,8 @@ import (
4141func init () {
4242 err := updatePathEnv ()
4343 if err != nil {
44- panic (err )
44+ fmt . Println (err )
4545 }
46-
4746}
4847
4948func tearDown () error {
@@ -130,7 +129,7 @@ func startDaemon(ctx context.Context, shouldTearDown bool) {
130129// refuse a connection to it, and deleting it allows us
131130// to create a new socket when invoking containerd.New()
132131func deleteSocket () error {
133- err := os .Remove ("/run/containerd-test/containerd.sock" )
132+ err := os .Remove (defaultAddress )
134133 if err != nil {
135134 return err
136135 }
@@ -143,7 +142,7 @@ func deleteSocket() error {
143142// to $PATH, since the binaries are available there.
144143func updatePathEnv () error {
145144 // Create test dir for socket
146- err := os .MkdirAll ("/run/containerd-test" , 0777 )
145+ err := os .MkdirAll (defaultState , 0777 )
147146 if err != nil {
148147 return err
149148 }
@@ -273,7 +272,7 @@ func doFuzz(data []byte, shouldTearDown bool) int {
273272 if ctrd .cmd == nil {
274273 startDaemon (ctx , shouldTearDown )
275274 }
276- client , err := containerd .New (address )
275+ client , err := containerd .New (defaultAddress )
277276 if err != nil {
278277 // The error here is most likely with the socket.
279278 // Deleting it will allow the creation of a new
@@ -282,6 +281,7 @@ func doFuzz(data []byte, shouldTearDown bool) int {
282281 return - 1
283282 }
284283 defer client .Close ()
284+
285285 f := fuzz .NewConsumer (data )
286286
287287 // Begin import tars:
0 commit comments