mirror of
https://github.com/affaan-m/ECC.git
synced 2026-09-28 20:45:11 +02:00
Merge commit 'b87d8875825d052aff7aea6b69c0d92650dc62a4' into affaan/integrate-reviewed-followups-20260928
This commit is contained in:
@@ -455,12 +455,15 @@ function runTests() {
|
||||
}
|
||||
for (const defect of ['identity', 'bytes', 'path snapshot']) {
|
||||
test(`descriptor postimage assertion refuses different ${defect}`, value => {
|
||||
const fd = fs.openSync(value.legacyFile, 'r');
|
||||
const flags = defect === 'bytes' ? fs.constants.O_RDWR : fs.constants.O_RDONLY;
|
||||
const fd = fs.openSync(value.legacyFile, flags | (fs.constants.O_NOFOLLOW || 0), 0o600);
|
||||
let identity;
|
||||
try { identity = fs.fstatSync(fd, { bigint: true }); }
|
||||
try {
|
||||
identity = fs.fstatSync(fd, { bigint: true });
|
||||
if (defect === 'bytes') fs.writeFileSync(fd, 'changed private fixture bytes');
|
||||
}
|
||||
finally { fs.closeSync(fd); }
|
||||
if (defect === 'identity') identity = { ...identity, ino: identity.ino + 1n };
|
||||
if (defect === 'bytes') fs.writeFileSync(value.legacyFile, 'changed private fixture bytes');
|
||||
const opened = [];
|
||||
const closed = [];
|
||||
const facade = { ...fs,
|
||||
|
||||
Reference in New Issue
Block a user