diff --git a/detcore/src/logdiff.rs b/detcore/src/logdiff.rs index 8faad5c..f6da64d 100644 --- a/detcore/src/logdiff.rs +++ b/detcore/src/logdiff.rs @@ -245,7 +245,7 @@ fn is_detlog_syscall_result(line: &str) -> bool { // TODO: // Append together a sequence of messages while truncating if there are too many. fn _truncate_messages(_v: &[&str]) -> String { - todo!() + unimplemented!() } fn filter_infos<'a>(v: &[(usize, &'a str)]) -> Vec<(usize, &'a str)> { diff --git a/detcore/src/scheduler.rs b/detcore/src/scheduler.rs index d60604a..a2d729d 100644 --- a/detcore/src/scheduler.rs +++ b/detcore/src/scheduler.rs @@ -755,7 +755,7 @@ impl Scheduler { .iter() .map(|(ix, path)| (*ix, Some(vec[*ix as usize].clone()), path.clone())) .collect(); - let mut replayer = Replayer::new(vec.into_iter()); + let mut replayer = Replayer::new(vec); replayer.replay_exhausted_panic = cfg.replay_exhausted_panic; replayer.die_on_desync = cfg.die_on_desync; (Some(replayer), Some(toprint)) diff --git a/detcore/src/tool_global.rs b/detcore/src/tool_global.rs index 46531bb..ef64753 100644 --- a/detcore/src/tool_global.rs +++ b/detcore/src/tool_global.rs @@ -290,7 +290,9 @@ impl GlobalState { if self.cfg.virtualize_time { let final_time = self.global_time.lock().unwrap(); let final_time_ns = final_time.as_nanos(); - let epoch_ns = LogicalTime::from_nanos(self.cfg.epoch.timestamp_nanos() as u64); + #[allow(deprecated)] // FIXME! Deprecatd in chrono-0.4.31 + let nanos = self.cfg.epoch.timestamp_nanos() as u64; + let epoch_ns = LogicalTime::from_nanos(nanos); summary.virttime_final = final_time_ns.as_nanos(); summary.virttime_elapsed = if final_time_ns.as_nanos() >= epoch_ns.as_nanos() { (final_time_ns - epoch_ns).as_nanos() @@ -854,10 +856,13 @@ impl GlobalState { async fn recv_determinize_inode(&self, from: Tid, ino: RawInode) -> (DetInode, LogicalTime) { // Here we establish a policy that when we first see a file its mtime is epoch. - let (dino, ns) = self.inodes.lock().unwrap().add_inode( - ino, - LogicalTime::from_nanos(self.cfg.epoch.timestamp_nanos() as u64), - ); + #[allow(deprecated)] // FIXME! Deprecatd in chrono-0.4.31 + let nanos = self.cfg.epoch.timestamp_nanos() as u64; + let (dino, ns) = self + .inodes + .lock() + .unwrap() + .add_inode(ino, LogicalTime::from_nanos(nanos)); trace!( "[detcore, dtid {}] resolved (raw) inode {:?} to {:?}, mtime {}", from, @@ -880,7 +885,9 @@ impl GlobalState { // In this scenario, virtualize_metadata is set and virtualize_time isn't. // We virtualize initial mtimes, but update using realtime. let dt: DateTime = Utc::now(); - LogicalTime::from_nanos(dt.timestamp_nanos() as u64) + #[allow(deprecated)] // FIXME! Deprecatd in chrono-0.4.31 + let nanos = dt.timestamp_nanos() as u64; + LogicalTime::from_nanos(nanos) }; trace!( "[dtid {}] bumping mtime on file (rawinode {:?}) to {}", @@ -894,10 +901,9 @@ impl GlobalState { } else { // Otherwise we haven't seen this inode yet (e.g. because there hasnt been a // stat on it), so we just-in-time add it. - let (d, _) = mg.add_inode( - ino, - LogicalTime::from_nanos(self.cfg.epoch.timestamp_nanos() as u64), - ); + #[allow(deprecated)] // FIXME! Deprecatd in chrono-0.4.31 + let nanos = self.cfg.epoch.timestamp_nanos() as u64; + let (d, _) = mg.add_inode(ino, LogicalTime::from_nanos(nanos)); d }; let info = mg diff --git a/hermit-cli/src/bin/hermit/analyze/phases.rs b/hermit-cli/src/bin/hermit/analyze/phases.rs index 089261b..2bd77b8 100644 --- a/hermit-cli/src/bin/hermit/analyze/phases.rs +++ b/hermit-cli/src/bin/hermit/analyze/phases.rs @@ -684,10 +684,10 @@ impl AnalyzeOpts { pub fn main(&mut self, global: &GlobalOpts) -> anyhow::Result { // Not implemented yet: if self.run1_schedule.is_some() { - todo!() + unimplemented!() } if self.run2_schedule.is_some() { - todo!() + unimplemented!() } self.phase0_initialize()?; // Need this early to set tmp_dir. diff --git a/tests/rust/heap_ptrs.rs b/tests/rust/heap_ptrs.rs index 7c5f767..c2c109c 100644 --- a/tests/rust/heap_ptrs.rs +++ b/tests/rust/heap_ptrs.rs @@ -8,6 +8,7 @@ //! Test deterministic Rust heap allocation +#[allow(clippy::useless_vec)] fn main() { // Go far enough that we trigger an mmap directly for a big allocation. // Interleaving print/alloc makes it easy to see which ones call mmap in an strace.