From 8492f115890d56c98c1da24b9fdf26bb1b714c05 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Thu, 4 Jan 2024 20:36:02 -0300 Subject: Setup stub unit test infrastructure --- src/conf/confstr.c | 8 ++++++++ src/conf/fpathconf.c | 8 ++++++++ src/conf/legacy.c | 8 ++++++++ src/conf/pathconf.c | 8 ++++++++ src/conf/sysconf.c | 8 ++++++++ 5 files changed, 40 insertions(+) (limited to 'src/conf') diff --git a/src/conf/confstr.c b/src/conf/confstr.c index 3d417284..36f499e2 100644 --- a/src/conf/confstr.c +++ b/src/conf/confstr.c @@ -15,3 +15,11 @@ size_t confstr(int name, char *buf, size_t len) // this completely useless function and its truncation semantics return snprintf(buf, len, "%s", s) + 1; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/conf/fpathconf.c b/src/conf/fpathconf.c index e6aca5cf..fbaa32fc 100644 --- a/src/conf/fpathconf.c +++ b/src/conf/fpathconf.c @@ -33,3 +33,11 @@ long fpathconf(int fd, int name) } return values[name]; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/conf/legacy.c b/src/conf/legacy.c index f1d9e325..5dc63561 100644 --- a/src/conf/legacy.c +++ b/src/conf/legacy.c @@ -20,3 +20,11 @@ long get_avphys_pages() { return sysconf(_SC_AVPHYS_PAGES); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/conf/pathconf.c b/src/conf/pathconf.c index 01e19c59..267982e0 100644 --- a/src/conf/pathconf.c +++ b/src/conf/pathconf.c @@ -4,3 +4,11 @@ long pathconf(const char *path, int name) { return fpathconf(-1, name); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/conf/sysconf.c b/src/conf/sysconf.c index 60d3e745..18815066 100644 --- a/src/conf/sysconf.c +++ b/src/conf/sysconf.c @@ -230,3 +230,11 @@ long sysconf(int name) } return values[name]; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif -- cgit v1.2.3