Skip to content

Fix test for tp1–act-4-4 by reseting the `locked` field on sleeplock initialization.

Florentin Labelle requested to merge flow/os-corrector-scripts:fix-act-4-4 into main

The test for tp1-act-4-4 can fail (and actually does consistently) because the locked field is not reset to 0 on sleeplock initialization, contrary to the actual xv6 implementation of initsleeplock.

tp1-act-4-4:

    // testator/main-tp1-act-4-4.c#L26
    assert(stub_files[fd]->mutex.locked == 0, "mutex lock should not be locked", NOSTOP);

Merge request reports

Loading