Skip to contentSkip to conversation

Add tst_parse_filesize functionality in LTP test API

PATCH In review Andrea Cervesato via ltp 2 participants 2 messages Dec 9, 2021 Library code

lore
Share & tools
lore
#0 lore raw

PATCH v5 1/1 Add tst_parse_filesize functionality in LTP test API

---
 include/tst_test.h                     |   1 +
 lib/newlib_tests/.gitignore            |   1 +
 lib/newlib_tests/test_parse_filesize.c | 122 +++++++++++++++++++++++++
 lib/tst_test.c                         |  41 +++++++++
 4 files changed, 165 insertions(+)
 create mode 100644 lib/newlib_tests/test_parse_filesize.c
include/tst_test.h +1 -0
index c06a4729b..450ddf086 100644
@@ -122,6 +122,7 @@ struct tst_option {
 int tst_parse_int(const char *str, int *val, int min, int max);
 int tst_parse_long(const char *str, long *val, long min, long max);
 int tst_parse_float(const char *str, float *val, float min, float max);
+int tst_parse_filesize(const char *str, long long *val, long long min, long long max);
 
 struct tst_tag {
 	const char *name;
lib/newlib_tests/.gitignore +1 -0
index cf467b5a0..6259692b1 100644
@@ -47,3 +47,4 @@ tst_fuzzy_sync01
 tst_fuzzy_sync02
 tst_fuzzy_sync03
 test_zero_hugepage
+test_parse_filesize
lib/newlib_tests/test_parse_filesize.c new file +122 -0

122 lines not on this page · raw message

lib/tst_test.c +41 -0

47 lines not on this page · raw message

Signature · 5 lines
2.34.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp