Repository navigation
Description
Summary
Every JIFS entry reports getLastModified() == 0, so dir shows 1970.01.01 00:00 for /jifs and everything under it, while the ramfs mount point /jnode shows the current boot time.
Steps to Reproduce
- Boot JNode (reproduced live on the running VirtualBox VM "JNodePR", and on a stock QEMU boot):
qemu-system-x86_64 -cdrom all/build/cdroms/jnode-x86-lite.iso -m 1024 -nographic - At the shell prompt run
dir, thendir /jifsanddir /jnode.
Buggy Outcome
$ dir
2026.11.27 21:17 [devices]
1970.01.01 00:00 [jifs]
2026.11.27 21:17 [jnode]
$ dir /jifs
1970.01.01 00:00 [extended]
1970.01.01 00:00 [lib]
1970.01.01 00:00 [plugins]
1970.01.01 00:00 [threads]
1404B 1970.01.01 00:00 devices
98B 1970.01.01 00:00 meminfo
62B 1970.01.01 00:00 uptime
146B 1970.01.01 00:00 version
$ dir /jnode
2026.11.27 21:17 [.systemPrefs]
2026.11.27 21:17 [home]
2026.11.27 21:17 [lib]
2026.11.27 21:17 [tmp]
The whole JIFS subtree (directories and files) stamps 1970.01.01 00:00.
Expected Outcome
JIFS entries report the time they were created (the boot time), like ramfs does, so dir /jifs shows a 2026 date matching the rest of the root listing. Concretely, FSEntry.getLastModified(), and the created/accessed equivalents, return the entry's construction time instead of 0.
JIFS is a synthesized read-only view (plugin list, devices, threads, uptime, version), so there is no real filesystem timestamp to report - but an entry has a creation instant, and a client asking for it should get that, not the epoch.
Root Cause
fs/src/fs/org/jnode/fs/jifs/JIFSDirectory.java:128 and fs/src/fs/org/jnode/fs/jifs/JIFSFile.java:136 both hardcode:
public long getLastModified() {
return 0;
}
public void setLastModified(long lastModified) {
}The setters are no-ops too, so a caller cannot even stamp an entry afterwards. The consumer is the FSEntry.getLastModified() API (fs/src/fs/org/jnode/fs/FSEntry.java:65), which is what the dir column prints.
For contrast, ramfs records real times: fs/src/fs/org/jnode/fs/ramfs/RAMDirectory.java:69 does
this.created = this.lastModified = this.lastAccessed = System.currentTimeMillis();, with a working getter at :104 and setter at :143 - which is why /jnode prints the boot time.
Test Coverage Basis
- Existing module:
fs/src/test/org/jnode/fs/jifs/files/JIFSFpluginJarTest.javacovers a JIFS file's read behaviour; nothing asserts any timestamp. - Gap: no test touches
getLastModified()on a JIFS entry, so a 0 return passes everything. - Proposed test: host-JVM test in
fs/src/test/org/jnode/fs/jifs/that builds a JIFSDirectory and a JIFSFile (the existing test already constructs JIFS objects directly), assertsgetLastModified() > 0, that created/last-modified are equal to each other, and that they fall within a sane window around the construction call. Register it infs/src/test/org/jnode/test/fs/filesystem/FSTestSuite.javaif that is where jifs tests are wired.
Explicit constraints
- Java 1.6 only, US-ASCII, JNode formatter.
- Do not invent per-entry data (there is no underlying on-disk timestamp); the entry's own construction time is the value.
- Keep
setLastModifiedan intentional no-op ONLY if the entry is genuinely read-only - if a no-op stays, it must be documented, but the getters must stop returning 0. - No changes under
core/src/native/x86/, and no config/plugin-list touch.
Environment
- Commit: 8a7e894
- Host JDK: 8 for builds (build needs 1.6/1.7/1.8); reproduced interactively, so host-independent
- Build target: cd-x86-lite
- Bitness: 32-bit
- Run: VirtualBox VM "JNodePR" (running, headless), also reproducible in QEMU with the command above
- ISO: all/build/cdroms/jnode-x86-lite.iso
- Boot reached shell prompt: yes
Triage Addendum (auto, 2026-11-27)
- Area / Kind: area/fs (Sub: JIFS) + kind/bug
- Blast radius: L2 package (org.jnode.fs.jifs, JIFSDirectory + JIFSFile; no FSEntry API or plugin descriptor change)
- Expected scope: fs/src/fs/org/jnode/fs/jifs/JIFSDirectory.java + JIFSFile.java: store construction time and return it from getLastModified; honor or document setLastModified; add a host-JVM test under fs/src/test/org/jnode/fs/jifs/ and register it in FSTestSuite. No-go: FSEntry signature, RAMFS, native ASM, config/plugin lists.
- Test path:
sh build.sh -f fs/build-tests.xml all-junit - Merge signal: human-review (kind/bug; behavior change in FS entry timestamps)
- Gaps: none blocking. JIFS implements neither FSEntryCreated nor FSEntryLastAccessed, so created/accessed coverage requires adding those optional interfaces; setters are no-ops on a read-only view and must be documented if kept.
- Full report:
## Triagecomment below.
✅ Ticket Runner Status
| Field | Value |
|---|---|
| Phase | DONE |
| Turn | 0/7 |
| Retries | 0/3 |
| PR | #989 |
| Review in progress | no |
| Started | 2026-11-27T19:55:52.211Z |
Activity
LSantha commentedon Nov 27, 2026
/oc triage issue #988
Triage run ONLY. Load the jnode-triage-issue skill and obey it. Output is exactly one ## Triage comment plus kind/area label edits. FORBIDDEN in this run: git checkout -b, git push, gh pr create, any branch, any PR.
LSantha commentedon Nov 27, 2026
Triage
qemu-system-x86_64 -cdrom all/build/cdroms/jnode-x86-lite.iso -m 1024 -nographic, rundir/dir /jifs; actual1970.01.01 00:00vs expected boot-time date. Code pointers:JIFSDirectory.java:128andJIFSFile.java:136return 0.JIFSDirectory.java+JIFSFile.java(~10-15 lines) store construction time and return it fromgetLastModified; honor or documentsetLastModified; add a host-JVM test underfs/src/test/org/jnode/fs/jifs/and register it inFSTestSuite. No-go: FSEntry signature, RAMFS, native ASM, config/plugin lists.sh build.sh -f fs/build-tests.xml all-junitFSEntryCreatednorFSEntryLastAccessed, so created/accessed coverage requires adding those optional interfaces; setters are no-ops on a read-only view and must be documented if kept.github run
LSantha commentedon Nov 27, 2026
/oc Please proceed with this task.
LSantha commentedon Nov 27, 2026
Created PR #989
github run