[NSWI004] Is it test error or knowledge error?

Petr Tuma petr.tuma at d3s.mff.cuni.cz
Tue Oct 13 17:26:33 CEST 2020


Hi,

why do you think the two stack pointer address samples should differ ?

Petr


On 13/10/2020 16:31, Jura Pelc wrote:
> for test basic/stack_pointer I got following output.
> $sp unexpectedly changed (0x800003e8 => 0x800003e8)
> 
> As far as I understand this test and stack I think that last line should 
> have != instead ==
> ktest_assert(sp1 != sp2, "$sp unexpectedly changed (0x%x => 0x%x)", sp1, 
> sp2);
> 
> Is is this case or should I get back to drawing board and self-study.
> 
> original code in upstream
> 
> uintptr_t sp1 = value;
> uintptr_t sp2 = value;
> sp1 = debug_get_stack_pointer();
> sp2 = debug_get_stack_pointer();
> 
> dprintk("sp1 = %x\n", sp1);
> dprintk("sp2 = %x\n", sp2);
> 
> ktest_assert_in_range("$sp must be in mainmem", sp1, 0x80000000, 
> 0x80100000);
> ktest_assert(sp1 == sp2, "$sp unexpectedly changed (0x%x => 0x%x)", sp1, 
> sp2);
> 
> 
> 
> 
> 
> -- 
> 
> S pozdravem Jiří Pelc
> Matematicko-fyzikální fakulta
> Univerzita Karlova
> 
> _______________________________________________
> NSWI004 mailing list
> NSWI004 at d3s.mff.cuni.cz
> https://d3s.mff.cuni.cz/mailman/listinfo/nswi004
> 

-- 
Petr Tuma
Distributed and Dependable Systems
Faculty of Mathematics and Physics
Charles University, Czech Republic
       http://d3s.mff.cuni.cz


More information about the NSWI004 mailing list