11cb0ef41Sopenharmony_ci// Flags: --expose-internals 21cb0ef41Sopenharmony_ci'use strict'; 31cb0ef41Sopenharmony_ci 41cb0ef41Sopenharmony_ci// Check that if libuv reports a memory error on a DNS query, that the memory 51cb0ef41Sopenharmony_ci// error is passed through and not replaced with ENOTFOUND. 61cb0ef41Sopenharmony_ci 71cb0ef41Sopenharmony_cirequire('../common'); 81cb0ef41Sopenharmony_ci 91cb0ef41Sopenharmony_ciconst assert = require('assert'); 101cb0ef41Sopenharmony_ciconst errors = require('internal/errors'); 111cb0ef41Sopenharmony_ciconst { internalBinding } = require('internal/test/binding'); 121cb0ef41Sopenharmony_ci 131cb0ef41Sopenharmony_ciconst { UV_EAI_MEMORY } = internalBinding('uv'); 141cb0ef41Sopenharmony_ciconst memoryError = errors.dnsException(UV_EAI_MEMORY, 'fhqwhgads'); 151cb0ef41Sopenharmony_ci 161cb0ef41Sopenharmony_ciassert.strictEqual(memoryError.code, 'EAI_MEMORY'); 17