Commit 17909888 authored by David Brown's avatar David Brown Committed by Fabio Utzig
Browse files

sim: Use image number instead of slot in dep test

When generating dependencies, we were using the slot number instead of
the image number to determine which dependencies to mark invalid.  Fix
this, so that we can test configurations where one image is upgradeable
and the other not.

Signed-off-by: default avatarDavid Brown <david.brown@linaro.org>
Signed-off-by: default avatarFabio Utzig <utzig@apache.org>
parent 135f716b
Loading
Loading
Loading
Loading
+1 −1
Changes for sim/src/depends.rs: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ impl Depender for PairDep {
    }

    fn my_deps(&self, _offset: usize, slot: usize) -> Vec<ImageVersion> {
        match self.test.depends[slot] {
        match self.test.depends[self.number] {
            DepType::Nothing => vec![],
            DepType::Correct => vec![
                ImageVersion::new_synthetic(self.other_id(), slot as u8, 0)