[LTP] [PATCH] getrlimit03: adjust a bit of code to compatiable with mips32

Jan Stancek jstancek@redhat.com
Wed Jul 17 10:36:02 CEST 2019



----- Original Message -----
> Error info:
> getrlimit03.c:104: FAIL: __NR_prlimit64(0) had rlim_cur =
> ffffffffffffffff but __NR_getrlimit(0) had rlim_cur = 7fffffff
> 
> According to kernel code: [arch/mips/include/uapi/asm/resource.h]
> RLIM_INFINITY is set to 0x7fffffffUL instead of ULONG_MAX on mips32.
> 
>  /*
>  * SuS says limits have to be unsigned.
>  * Which makes a ton more sense anyway,
>  * but we keep the old value on MIPS32,
>  * for compatibility:
>  */
>  #ifndef __mips64
>  # define RLIM_INFINITY      0x7fffffffUL
>  #endif
> 
> Adding conditional statement about mips to fix this.
> 
> Signed-off-by: Jan Stancek <jstancek@redhat.com>
> Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com>

Pushed.

Thanks,
Jan


More information about the ltp mailing list