[LTP] [PATCH] zram01: Fix division by 0

Petr Vorel pvorel@suse.cz
Wed Jul 31 09:27:44 CEST 2019


Hi Li,

> > +       if [ $used_mem -eq 0 ]; then
> > +               tst_resm TBROK "no memory used by zram"
> > +               return
> > +       fi

> Why not use tst_brkm directly? Otherwise looks good to me.
Make sense.
Thanks for your ack, lets wait for Alexey.

I wonder how this can happen (found occasionally on ppc64le).

If this happen than zram02 and zram03 fails on timeout:
/opt/ltp/testcases/bin/zram_lib.sh: line 38: echo: write error: Device or resource busy
zram03      1  TBROK  :  safe_file_ops.c:301: Failed to close FILE '/sys/block/zram0/disksize' at zram03.c:87: errno=EBUSY(16): Device or resource busy

Maybe some timeout would help, need to look into it.

Petr


More information about the ltp mailing list