I attached a patch to remove mincore01 test2.
From: Jin, Gordon=20
Sent: 2004=C4=EA11=D4=C213=C8=D5 9:04
Subject: mincore01 test2: use negative value for "length" with unsigned =
In ltp-20041007, 32-bit(x86) binary mincore01 fails on 64-bit =
Here is the cause:
The prototype of mincore is:
int mincore(void *start, size_t length, unsigned char *vec);
Please note the data type for length: size_t, i.e. unsigned type =
(unsigned int on x86, unsigned long on ia64/x86-64).
But test2 uses a negative value for length and expect EINVAL. This =
doesn't conform to the prototype.
For a native program, when a negative little value used (like mincore01 =
test2), the overflow will happen and return EINVAL.
If a negative big value used, it won't return EINVAL.
For a 32-bit binary running on 64-bit platform, the argument is =
zero-extended to be a positive little value, so this case will fail.
I know the case follows man page, but I think man page is not correct =
here. We need to conform to the prototype and I suggest to remove test2. =