[Pkg-javascript-devel] Bug#1135429: node-mock-fs: FTBFS: AssertionError: expected true to be false
Santiago Vila
sanvila at debian.org
Sat May 2 00:13:30 BST 2026
Package: src:node-mock-fs
Version: 5.5.0-1
Severity: serious
Tags: ftbfs forky sid
Dear maintainer:
During a rebuild of all packages in unstable, this package failed to build.
Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:
https://people.debian.org/~sanvila/build-logs/202605/
About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.
If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.
If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:node-mock-fs, so that this is still
visible in the BTS web page for this package.
Thanks.
--------------------------------------------------------------------------------
[...]
debian/rules clean
dh clean
dh_auto_clean --buildsystem=nodejs
rm -rf ./node_modules/.cache ./.nyc_output
rm ./node_modules/.cache
rm ./node_modules/.cache
debian/rules override_dh_clean
make[1]: Entering directory '/<<PKGBUILDDIR>>'
dh_clean -- readme.html readme.txt changelog.html changelog.txt
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
debian/rules binary
dh binary
dh_update_autotools_config
dh_autoreconf
dh_auto_configure --buildsystem=nodejs
[... snipped ...]
â updates timestamps for a file
â updates timestamps for a file following symlink
fs.lutimesSync(path, atime, mtime)
â updates timestamps for a file
â updates timestamps for a file but not following symlink
fs.futimes(fd, atime, mtime, callback)
â updates timestamps for a file
â updates timestamps for a file following symlink
â promise updates timestamps for a file
â updates timestamps for a directory
â promise updates timestamps for a directory
fs.futimesSync(path, atime, mtime)
â updates timestamps for a file
â updates timestamps for a file following symlink
fs.write(fd, buffer, offset, length, position, callback)
â writes a buffer to a file
â promise writes a buffer to a file
â writes a buffer to a file with implicit offset, length, position
â promise writes a buffer to a file with implicit offset, length, position
â can write a portion of a buffer to a file
â promise can write a portion of a buffer to a file
â can write a portion of a buffer to a file position
â promise can write a portion of a buffer to a file position
â can write a portion of a buffer to a file position and enlarge the file
â promise can write a portion of a buffer to a file position and enlarge the file
â can append to a file
â promise can append to a file
â fails if file not open for writing
â fails if file not open for writing
fs.writeSync(fd, buffer, offset, length, position)
â writes a buffer to a file
â can write a portion of a buffer to a file
â can append to a file
â fails if file not open for writing
fs.write(fd, data[, position[, encoding]], callback)
â writes a string to a file
â promise writes a string to a file
â writes a string to a file with implicit position and encoding
â promise writes a string to a file with implicit position and encoding
â can append to a file
â promise can append to a file
â can write to a position of a file
â promise can write to a position of a file
â can write to a position of a file and enlarge it
â promise can write to a position of a file and enlarge it
â fails if file not open for writing
â promise fails if file not open for writing
fs.writeSync(fd, data[, position[, encoding]])
â writes a string to a file
â can append to a file
â fails if file not open for writing
fs.writeFile(filename, data, [options], callback)
â writes a string to a file
â promise writes a string to a file
â updates mtime of parent directory
â promise updates mtime of parent directory
â writes a buffer to a file
â promise writes a buffer to a file
â fails if directory does not exist
â promise fails if directory does not exist
fs.writeFileSync(filename, data, [options]
â writes a string to a file
â writes a buffer to a file
â fails if directory does not exist
The API
mock()
â configures the real fs module with a mock file system
â provides direct access to the internal filesystem object
â creates process.cwd() and os.tmpdir() by default
â passes the createCwd option to the FileSystem constructor
â passes the createTmp option to the FileSystem constructor
- uses the real fs module in require() calls
mock.restore()
â restores bindings for the real file system
mock.file()
â lets you create files with additional properties
mock.directory()
â lets you create directories with more properties
â works with a trailing slash
â works without a trailing slash
mock.symlink()
â lets you create symbolic links
mock.load()
File
â creates a File factory with correct attributes
â lazy=false loads file content
â can read file from mocked FS
lazy=true
â creates accessors
â read file loads data and replaces accessors
â write file updates content and replaces accessors
Dir
â creates a Directory factory with correct attributes
â recursive=false creates files & does not recurse
â can read file from mocked FS
recursive=true
â creates all files & dirs
â respects lazy setting
process.cwd()
â maintains current working directory
â allows changing directory
â prevents changing directory to non-existent path
â prevents changing directory to non-directory path
â restores original methods on restore
â restores original working directory on restore
security
â denies dir listing without execute on parent
â denies file read without execute on parent
â denies file read without read on file
â denies file write without write on file
Item
constructor
â creates a new instance
#getATime()
â returns a date
#setATime()
â sets the atime
#getCTime()
â returns a date
#setCTime()
â sets the ctime
#getBirthtime()
â returns a date
#setBirthtime()
â sets the birthtime
#getMTime()
â returns a date
#setMTime()
â sets the mtime
#getMode()
â returns a number
#setMode()
â sets the mode
â updates the ctime
#setUid()
â sets the uid
â updates the ctime
#setGid()
â sets the gid
â updates the ctime
#canRead()
â returns true if owner and 0700
â returns true if owner and 0600
â returns true if owner and 0500
â returns true if owner and 0400
â returns false if owner and 0300
â returns false if owner and 0200
â returns false if owner and 0100
â returns false if not owner and 0700 (different user)
â returns false if not owner and 0700 (different group)
â returns false if owner and 0170
â returns true if in group and 0170
â returns false if not in group and 0770
â returns true if not in group and 0777
â always returns true if process runs as root
#canWrite()
â returns true if owner and 0700
â returns true if owner and 0600
â returns false if owner and 0500
â returns false if owner and 0400
â returns true if owner and 0300
â returns true if owner and 0200
â returns false if owner and 0100
â returns false if not owner and 0700 (different user)
â returns false if not owner and 0700 (different group)
â returns false if owner and 0170
â returns true if in group and 0170
â returns false if not in group and 0770
â returns true if not in group and 0777
â always returns true if process runs as root
#canExecute()
â returns true if owner and 0700
â returns false if owner and 0600
â returns true if owner and 0500
â returns false if owner and 0400
â returns true if owner and 0300
â returns false if owner and 0200
â returns true if owner and 0100
â returns false if not owner and 0700 (different user)
â returns false if not owner and 0700 (different group)
â returns false if owner and 0270
â returns true if in group and 0270
â returns false if not in group and 0770
â returns true if not in group and 0777
â always returns true if process runs as root
getReadFileContextPrototype
â provides access to the internal ReadFileContext
patchReadFileContext
â patch forwards calls to mocked binding when available
fs.readFile() with ReadFileContext
â allows file reads to be aborted
â allows file reads with a numeric descriptor
â allows file reads with unknown size
920 passing (431ms)
3 pending
2 failing
1) fs.rmdirSync(path)
recursively remove empty directory:
AssertionError: expected true to be false
+ expected - actual
-true
+false
at Assertion.<anonymous> (/usr/share/nodejs/chai/lib/chai/core/assertions.js:701:10)
at Assertion.propertyGetter (/usr/share/nodejs/chai/lib/chai/utils/addProperty.js:62:29)
at Object.proxyGetter [as get] (/usr/share/nodejs/chai/lib/chai/utils/proxify.js:98:22)
at assert.isFalse (/usr/share/nodejs/chai/lib/chai/interface/assert.js:386:53)
at Context.<anonymous> (test/lib/fs.rmdir.spec.js:223:12)
at callFn (/usr/share/nodejs/mocha/lib/runnable.js:366:21)
at Runnable.run (/usr/share/nodejs/mocha/lib/runnable.js:354:5)
at Runner.runTest (/usr/share/nodejs/mocha/lib/runner.js:719:10)
at /usr/share/nodejs/mocha/lib/runner.js:842:12
at next (/usr/share/nodejs/mocha/lib/runner.js:634:14)
at /usr/share/nodejs/mocha/lib/runner.js:644:7
at next (/usr/share/nodejs/mocha/lib/runner.js:527:14)
at cbHookRun (/usr/share/nodejs/mocha/lib/runner.js:592:7)
at done (/usr/share/nodejs/mocha/lib/runnable.js:310:5)
at callFn (/usr/share/nodejs/mocha/lib/runnable.js:389:7)
at Runnable.run (/usr/share/nodejs/mocha/lib/runnable.js:354:5)
at next (/usr/share/nodejs/mocha/lib/runner.js:551:10)
at Immediate._onImmediate (/usr/share/nodejs/mocha/lib/runner.js:612:5)
at process.processImmediate (node:internal/timers:504:21)
2) fs.rmdirSync(path)
recursively remove non-empty directory:
AssertionError: expected true to be false
+ expected - actual
-true
+false
at Assertion.<anonymous> (/usr/share/nodejs/chai/lib/chai/core/assertions.js:701:10)
at Assertion.propertyGetter (/usr/share/nodejs/chai/lib/chai/utils/addProperty.js:62:29)
at Object.proxyGetter [as get] (/usr/share/nodejs/chai/lib/chai/utils/proxify.js:98:22)
at assert.isFalse (/usr/share/nodejs/chai/lib/chai/interface/assert.js:386:53)
at Context.<anonymous> (test/lib/fs.rmdir.spec.js:230:12)
at callFn (/usr/share/nodejs/mocha/lib/runnable.js:366:21)
at Runnable.run (/usr/share/nodejs/mocha/lib/runnable.js:354:5)
at Runner.runTest (/usr/share/nodejs/mocha/lib/runner.js:719:10)
at /usr/share/nodejs/mocha/lib/runner.js:842:12
at next (/usr/share/nodejs/mocha/lib/runner.js:634:14)
at /usr/share/nodejs/mocha/lib/runner.js:644:7
at next (/usr/share/nodejs/mocha/lib/runner.js:527:14)
at cbHookRun (/usr/share/nodejs/mocha/lib/runner.js:592:7)
at done (/usr/share/nodejs/mocha/lib/runnable.js:310:5)
at callFn (/usr/share/nodejs/mocha/lib/runnable.js:389:7)
at Runnable.run (/usr/share/nodejs/mocha/lib/runnable.js:354:5)
at next (/usr/share/nodejs/mocha/lib/runner.js:551:10)
at Immediate._onImmediate (/usr/share/nodejs/mocha/lib/runner.js:612:5)
at process.processImmediate (node:internal/timers:504:21)
dh_auto_test: error: /bin/sh -ex debian/nodejs/test returned exit code 2
make: *** [debian/rules:10: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
--------------------------------------------------------------------------------
More information about the Pkg-javascript-devel
mailing list