[LTP] [COMMITTED] [PATCH] dio_sparse: Fix compilation on alternative libc
Cyril Hrubis
chrubis@suse.cz
Fri Dec 10 16:39:03 CET 2021
The LONG_LONG_MAX is not actually correct macro for the long long limits
it should have been LLONG_MAX. Actually I do not have idea where this
comes from on my system, but the test fails to compile on Alpine with
musl.
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
testcases/kernel/io/ltp-aiodio/dio_sparse.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/testcases/kernel/io/ltp-aiodio/dio_sparse.c b/testcases/kernel/io/ltp-aiodio/dio_sparse.c
index 7a76f4c16..929adbfba 100644
--- a/testcases/kernel/io/ltp-aiodio/dio_sparse.c
+++ b/testcases/kernel/io/ltp-aiodio/dio_sparse.c
@@ -69,13 +69,13 @@ static void setup(void)
if (tst_parse_int(str_numchildren, &numchildren, 1, INT_MAX))
tst_brk(TBROK, "Invalid number of children '%s'", str_numchildren);
- if (tst_parse_filesize(str_writesize, &writesize, 1, LONG_LONG_MAX))
+ if (tst_parse_filesize(str_writesize, &writesize, 1, LLONG_MAX))
tst_brk(TBROK, "Invalid write blocks size '%s'", str_writesize);
- if (tst_parse_filesize(str_filesize, &filesize, 1, LONG_LONG_MAX))
+ if (tst_parse_filesize(str_filesize, &filesize, 1, LLONG_MAX))
tst_brk(TBROK, "Invalid file size '%s'", str_filesize);
- if (tst_parse_filesize(str_offset, &offset, 0, LONG_LONG_MAX))
+ if (tst_parse_filesize(str_offset, &offset, 0, LLONG_MAX))
tst_brk(TBROK, "Invalid file offset '%s'", str_offset);
SAFE_STAT(".", &sb);
--
2.32.0
More information about the ltp
mailing list