()
| 28 | } |
| 29 | |
| 30 | async function validateReadFileProc() { |
| 31 | // Test to make sure reading a file under the /proc directory works. Adapted |
| 32 | // from test-fs-read-file-sync-hostname.js. |
| 33 | // Refs: |
| 34 | // - https://groups.google.com/forum/#!topic/nodejs-dev/rxZ_RoH1Gn0 |
| 35 | // - https://github.com/nodejs/node/issues/21331 |
| 36 | |
| 37 | // Test is Linux-specific. |
| 38 | if (!common.isLinux) |
| 39 | return; |
| 40 | |
| 41 | const hostname = await readFile('/proc/sys/kernel/hostname'); |
| 42 | assert.ok(hostname.length > 0); |
| 43 | } |
| 44 | |
| 45 | function validateReadFileAbortLogicBefore() { |
| 46 | const signal = AbortSignal.abort(); |
no test coverage detected