11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ci 31cb0ef41Sopenharmony_ciconst common = require('../common'); 41cb0ef41Sopenharmony_ciconst initHooks = require('./init-hooks'); 51cb0ef41Sopenharmony_ciconst verifyGraph = require('./verify-graph'); 61cb0ef41Sopenharmony_ci 71cb0ef41Sopenharmony_ciconst net = require('net'); 81cb0ef41Sopenharmony_ci 91cb0ef41Sopenharmony_ciconst tmpdir = require('../common/tmpdir'); 101cb0ef41Sopenharmony_citmpdir.refresh(); 111cb0ef41Sopenharmony_ci 121cb0ef41Sopenharmony_ciconst hooks = initHooks(); 131cb0ef41Sopenharmony_cihooks.enable(); 141cb0ef41Sopenharmony_ci 151cb0ef41Sopenharmony_ciconst server = net.createServer((c) => { 161cb0ef41Sopenharmony_ci c.end(); 171cb0ef41Sopenharmony_ci server.close(); 181cb0ef41Sopenharmony_ci}).listen(common.PIPE, common.mustCall(onlisten)); 191cb0ef41Sopenharmony_ci 201cb0ef41Sopenharmony_cifunction onlisten() { 211cb0ef41Sopenharmony_ci net.connect(common.PIPE, common.mustCall(onconnect)); 221cb0ef41Sopenharmony_ci} 231cb0ef41Sopenharmony_ci 241cb0ef41Sopenharmony_cifunction onconnect() {} 251cb0ef41Sopenharmony_ci 261cb0ef41Sopenharmony_ciprocess.on('exit', onexit); 271cb0ef41Sopenharmony_ci 281cb0ef41Sopenharmony_cifunction onexit() { 291cb0ef41Sopenharmony_ci hooks.disable(); 301cb0ef41Sopenharmony_ci verifyGraph( 311cb0ef41Sopenharmony_ci hooks, 321cb0ef41Sopenharmony_ci [ { type: 'PIPESERVERWRAP', id: 'pipeserver:1', triggerAsyncId: null }, 331cb0ef41Sopenharmony_ci { type: 'PIPEWRAP', id: 'pipe:1', triggerAsyncId: 'pipeserver:1' }, 341cb0ef41Sopenharmony_ci { type: 'PIPECONNECTWRAP', id: 'pipeconnect:1', 351cb0ef41Sopenharmony_ci triggerAsyncId: 'pipe:1' }, 361cb0ef41Sopenharmony_ci { type: 'PIPEWRAP', id: 'pipe:2', triggerAsyncId: 'pipeserver:1' }, 371cb0ef41Sopenharmony_ci { type: 'SHUTDOWNWRAP', id: 'shutdown:1', triggerAsyncId: 'pipe:2' } ], 381cb0ef41Sopenharmony_ci ); 391cb0ef41Sopenharmony_ci} 40