[v4,3/3] statvfs: f_type: NEWS & test
Checks
Context |
Check |
Description |
redhat-pt-bot/TryBot-apply_patch |
success
|
Patch applied to master at the time it was sent
|
redhat-pt-bot/TryBot-32bit |
success
|
Build for i686
|
linaro-tcwg-bot/tcwg_glibc_build--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 |
fail
|
Testing failed
|
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_glibc_check--master-arm |
success
|
Testing passed
|
Commit Message
Also fix tst-statvfs so that it actually fails;
as it stood, all it did was return 0 always.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
---
NEWS | 5 +++++
io/tst-statvfs.c | 19 +++++++++++--------
2 files changed, 16 insertions(+), 8 deletions(-)
@@ -54,6 +54,11 @@ Major new features:
explicitly enabled, then fortify source is forcibly disabled so to keep
original behavior unchanged.
+* struct statvfs now has an f_type member, equal to the f_type statfs member;
+ on the Hurd this was always available under a reserved name,
+ and under Linux a spare has been allocated: it was always zero
+ in previous versions of glibc, and zero is not a valid result.
+
Deprecated and removed features, and other changes affecting compatibility:
* In the Linux kernel for the hppa/parisc architecture some of the
@@ -1,5 +1,7 @@
#include <stdio.h>
+#include <sys/statfs.h>
#include <sys/statvfs.h>
+#include <support/check.h>
/* This test cannot detect many errors. But it will fail if the
@@ -11,17 +13,18 @@ do_test (int argc, char *argv[])
for (int i = 1; i < argc; ++i)
{
struct statvfs st;
- if (statvfs (argv[i], &st) != 0)
- printf ("%s: failed (%m)\n", argv[i]);
- else
- printf ("%s: free: %llu, mandatory: %s\n", argv[i],
- (unsigned long long int) st.f_bfree,
+ struct statfs stf;
+ TEST_COMPARE (statvfs (argv[i], &st), 0);
+ TEST_COMPARE (statfs (argv[i], &stf), 0);
+ TEST_COMPARE (st.f_type, stf.f_type);
+ printf ("%s: free: %llu, mandatory: %s\n", argv[i],
+ (unsigned long long int) st.f_bfree,
#ifdef ST_MANDLOCK
- (st.f_flag & ST_MANDLOCK) ? "yes" : "no"
+ (st.f_flag & ST_MANDLOCK) ? "yes" : "no"
#else
- "no"
+ "no"
#endif
- );
+ );
}
return 0;
}