morpho-blue icon indicating copy to clipboard operation
morpho-blue copied to clipboard

Test living vertigo mutations

Open Rubilmax opened this issue 1 year ago • 5 comments

Mutation testing report:
Number of mutations:    163
Killed:                 124 / 163

Mutations:
Mutation:
    File: /home/rubilmax/sites/morpho.xyz/morpho-blue/src/Morpho.sol
    Line nr: 245
    Result: Lived
    Original line:
                 _accrueInterest(marketParams, id);

    Mutated line:
                 

Mutation:
    File: /home/rubilmax/sites/morpho.xyz/morpho-blue/src/Morpho.sol
    Line nr: 129
    Result: Lived
    Original line:
                 _accrueInterest(marketParams, id);

    Mutated line:
                 


Mutation:
    File: /home/rubilmax/sites/morpho.xyz/morpho-blue/src/libraries/periphery/MorphoStorageLib.sol
    Line nr: 50
    Result: Lived
    Original line:
                     uint256(keccak256(abi.encode(user, keccak256(abi.encode(id, POSITION_SLOT))))) + SUPPLY_SHARES_OFFSET

    Mutated line:
                     uint256(keccak256(abi.encode(user, keccak256(abi.encode(id, POSITION_SLOT))))) - SUPPLY_SHARES_OFFSET


Mutation:
    File: /home/rubilmax/sites/morpho.xyz/morpho-blue/src/libraries/periphery/MorphoStorageLib.sol
    Line nr: 62
    Result: Lived
    Original line:
                 return bytes32(uint256(keccak256(abi.encode(id, MARKET_SLOT))) + TOTAL_SUPPLY_ASSETS_AND_SHARES_OFFSET);

    Mutated line:
                 return bytes32(uint256(keccak256(abi.encode(id, MARKET_SLOT))) - TOTAL_SUPPLY_ASSETS_AND_SHARES_OFFSET);


Mutation:
    File: /home/rubilmax/sites/morpho.xyz/morpho-blue/src/libraries/periphery/MorphoStorageLib.sol
    Line nr: 90
    Result: Lived
    Original line:
                 return bytes32(uint256(keccak256(abi.encode(id, ID_TO_MARKET_PARAMS_SLOT))) + LOAN_TOKEN_OFFSET);

    Mutated line:
                 return bytes32(uint256(keccak256(abi.encode(id, ID_TO_MARKET_PARAMS_SLOT))) - LOAN_TOKEN_OFFSET);

Rubilmax avatar Nov 23 '23 14:11 Rubilmax

I think this is the reference to the tool.

This seems to be an excerpt of the ouput. Can you provide the full ouput please and how to get it (parameters and configuration) ?

QGarchery avatar Nov 28 '23 12:11 QGarchery

Indeed @Rubilmax you should output the logs into a file instead of relying on the terminal output I think

Here are my logs meanwhile @QGarchery: log.txt

MerlinEgalite avatar Nov 28 '23 13:11 MerlinEgalite

I don't get the difference between your file and my logs @MerlinEgalite @QGarchery

It is an excerpt because I removed all mutations that were killed or errored at compilation, leaving only the viable mutations that we should test

Rubilmax avatar Nov 28 '23 14:11 Rubilmax

It is an excerpt because I removed all mutations that were killed or errored at compilation, leaving only the viable mutations that we should test

Ok got it now, sounds good.

How did you run the tool though ?

QGarchery avatar Nov 28 '23 15:11 QGarchery

How did you run the tool though ?

As indicated in their README: clone their repo, install python environment then run python file within this repo But it took a while...

Rubilmax avatar Nov 28 '23 16:11 Rubilmax