aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorYury Khrustalev <yury.khrustalev@arm.com>2026-02-05 15:16:42 +0000
committerYury Khrustalev <yury.khrustalev@arm.com>2026-02-06 12:56:56 +0000
commit672aec0de053aee13c3d64c75c46c5666da09ff3 (patch)
tree2068c45f211a9bdaf4d0ab5f2222ef90d330b0af /sysdeps
parent280119e974f1f5e5efcc94e065dd86ba4c515286 (diff)
downloadglibc-master.zip
glibc-master.tar.gz
glibc-master.tar.bz2
tests: aarch64: clean up BTI and GCS testsHEADmaster
No functional change, just cleaning up code, fixing style and correcting typos. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/tst-bti-abort-static.c6
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/tst-bti-ld-debug-exe.c3
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/tst-bti-skeleton-dlopen.c4
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/tst-bti-skeleton.c8
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/tst-gcs-audit-override.c2
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/tst-gcs-dlopen.c6
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/tst-gcs-helper.h3
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/tst-gcs-noreturn.c5
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/tst-gcs-preload-optional.c2
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/tst-gcs-preload-override.c2
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/tst-gcs-shared.c5
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/tst-gcs-skeleton.c5
12 files changed, 12 insertions, 39 deletions
diff --git a/sysdeps/unix/sysv/linux/aarch64/tst-bti-abort-static.c b/sysdeps/unix/sysv/linux/aarch64/tst-bti-abort-static.c
index 6385e41..f9f0b7b 100644
--- a/sysdeps/unix/sysv/linux/aarch64/tst-bti-abort-static.c
+++ b/sysdeps/unix/sysv/linux/aarch64/tst-bti-abort-static.c
@@ -18,14 +18,8 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
-#include <stdio.h>
-#include <stddef.h>
-#include <stdint.h>
-#include <string.h>
#include <sys/auxv.h>
-
#include <support/check.h>
-#include <support/support.h>
#include <support/test-driver.h>
static int
diff --git a/sysdeps/unix/sysv/linux/aarch64/tst-bti-ld-debug-exe.c b/sysdeps/unix/sysv/linux/aarch64/tst-bti-ld-debug-exe.c
index 99511e2..21be054 100644
--- a/sysdeps/unix/sysv/linux/aarch64/tst-bti-ld-debug-exe.c
+++ b/sysdeps/unix/sysv/linux/aarch64/tst-bti-ld-debug-exe.c
@@ -16,10 +16,7 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
-#include <stdio.h>
#include <sys/auxv.h>
-#include <sys/signal.h>
-
#include <support/check.h>
#include <support/test-driver.h>
diff --git a/sysdeps/unix/sysv/linux/aarch64/tst-bti-skeleton-dlopen.c b/sysdeps/unix/sysv/linux/aarch64/tst-bti-skeleton-dlopen.c
index 8f09a4f..c29e47a 100644
--- a/sysdeps/unix/sysv/linux/aarch64/tst-bti-skeleton-dlopen.c
+++ b/sysdeps/unix/sysv/linux/aarch64/tst-bti-skeleton-dlopen.c
@@ -33,9 +33,7 @@ do_test (void)
{
unsigned long hwcap2 = getauxval (AT_HWCAP2);
if ((hwcap2 & HWCAP2_BTI) == 0)
- {
- FAIL_UNSUPPORTED ("BTI is not supported by this system");
- }
+ FAIL_UNSUPPORTED ("BTI is not supported by this system");
void *h = dlopen (TEST_BTI_DLOPEN_MODULE, RTLD_NOW);
const char *err = dlerror ();
diff --git a/sysdeps/unix/sysv/linux/aarch64/tst-bti-skeleton.c b/sysdeps/unix/sysv/linux/aarch64/tst-bti-skeleton.c
index bf0e627..87ce648 100644
--- a/sysdeps/unix/sysv/linux/aarch64/tst-bti-skeleton.c
+++ b/sysdeps/unix/sysv/linux/aarch64/tst-bti-skeleton.c
@@ -17,10 +17,7 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
-#include <stdio.h>
#include <sys/auxv.h>
-#include <sys/signal.h>
-
#include <support/check.h>
#include <support/test-driver.h>
@@ -38,10 +35,7 @@ do_test (void)
{
unsigned long hwcap2 = getauxval (AT_HWCAP2);
if ((hwcap2 & HWCAP2_BTI) == 0)
- {
- FAIL_UNSUPPORTED ("BTI is not supported by this system");
- }
-
+ FAIL_UNSUPPORTED ("BTI is not supported by this system");
fun_t fn = &fun;
return fn ();
}
diff --git a/sysdeps/unix/sysv/linux/aarch64/tst-gcs-audit-override.c b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-audit-override.c
index b1e6423..055ada9 100644
--- a/sysdeps/unix/sysv/linux/aarch64/tst-gcs-audit-override.c
+++ b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-audit-override.c
@@ -1,5 +1,5 @@
/* Check if the audit modules without GCS marking is loaded when GCS is
- overrided. */
+ overridden. */
#define AUDIT_MOD "tst-gcs-audit1.so"
diff --git a/sysdeps/unix/sysv/linux/aarch64/tst-gcs-dlopen.c b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-dlopen.c
index f332116..06391e8 100644
--- a/sysdeps/unix/sysv/linux/aarch64/tst-gcs-dlopen.c
+++ b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-dlopen.c
@@ -26,10 +26,8 @@ do_test (void)
{
/* Check if GCS could possible by enabled. */
if (!(getauxval (AT_HWCAP) & HWCAP_GCS))
- {
- puts ("kernel or CPU does not support GCS");
- return EXIT_UNSUPPORTED;
- }
+ FAIL_UNSUPPORTED ("kernel or CPU does not support GCS");
+
/* The tst-gcs-mod2.so test library does not have GCS marking. */
void *h = dlopen ("tst-gcs-mod2.so", RTLD_NOW);
const char *err = dlerror ();
diff --git a/sysdeps/unix/sysv/linux/aarch64/tst-gcs-helper.h b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-helper.h
index 35ce003..493f65b 100644
--- a/sysdeps/unix/sysv/linux/aarch64/tst-gcs-helper.h
+++ b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-helper.h
@@ -26,7 +26,8 @@
#include <stdio.h>
#include <sys/auxv.h>
-static bool __check_gcs_status (void)
+static bool
+__check_gcs_status (void)
{
register unsigned long x16 asm ("x16");
asm volatile (
diff --git a/sysdeps/unix/sysv/linux/aarch64/tst-gcs-noreturn.c b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-noreturn.c
index fc173ce..2d4f20d 100644
--- a/sysdeps/unix/sysv/linux/aarch64/tst-gcs-noreturn.c
+++ b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-noreturn.c
@@ -73,10 +73,7 @@ do_test (void)
{
/* Check if GCS could possible by enabled. */
if (!(getauxval (AT_HWCAP) & HWCAP_GCS))
- {
- puts ("kernel or CPU does not support GCS");
- return EXIT_UNSUPPORTED;
- }
+ FAIL_UNSUPPORTED ("kernel or CPU does not support GCS");
bool gcs_enabled = __check_gcs_status ();
/* This test should be rung with GCS initially disabled. */
TEST_VERIFY (!gcs_enabled);
diff --git a/sysdeps/unix/sysv/linux/aarch64/tst-gcs-preload-optional.c b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-preload-optional.c
index 9f6c151..2e95717 100644
--- a/sysdeps/unix/sysv/linux/aarch64/tst-gcs-preload-optional.c
+++ b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-preload-optional.c
@@ -1,4 +1,4 @@
-/* Checks if GCS is disabled when a LD_PRELOADA is used without GCS marking
+/* Checks if GCS is disabled when a LD_PRELOAD is used without GCS marking
and GCS is optional. */
#define TEST_GCS_EXPECT_ENABLED 0
#include "tst-gcs-skeleton.c"
diff --git a/sysdeps/unix/sysv/linux/aarch64/tst-gcs-preload-override.c b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-preload-override.c
index 8ccb389..07b2689 100644
--- a/sysdeps/unix/sysv/linux/aarch64/tst-gcs-preload-override.c
+++ b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-preload-override.c
@@ -1,4 +1,4 @@
/* Checks if GCS is enabled when a LD_PRELOAD is used without GCS marking and
- GCS is overrided. */
+ GCS is overridden. */
#define TEST_GCS_EXPECT_ENABLED 1
#include "tst-gcs-skeleton.c"
diff --git a/sysdeps/unix/sysv/linux/aarch64/tst-gcs-shared.c b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-shared.c
index a128a19..8a428fc 100644
--- a/sysdeps/unix/sysv/linux/aarch64/tst-gcs-shared.c
+++ b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-shared.c
@@ -26,10 +26,7 @@ do_test (void)
{
/* Check if GCS could possible by enabled. */
if (!(getauxval (AT_HWCAP) & HWCAP_GCS))
- {
- puts ("kernel or CPU does not support GCS");
- return EXIT_UNSUPPORTED;
- }
+ FAIL_UNSUPPORTED ("kernel or CPU does not support GCS");
#if TEST_GCS_EXPECT_ENABLED
TEST_VERIFY (__check_gcs_status ());
#else
diff --git a/sysdeps/unix/sysv/linux/aarch64/tst-gcs-skeleton.c b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-skeleton.c
index be39e99..2391267 100644
--- a/sysdeps/unix/sysv/linux/aarch64/tst-gcs-skeleton.c
+++ b/sysdeps/unix/sysv/linux/aarch64/tst-gcs-skeleton.c
@@ -23,10 +23,7 @@ do_test (void)
{
/* Check if GCS could possible by enabled. */
if (!(getauxval (AT_HWCAP) & HWCAP_GCS))
- {
- puts ("kernel or CPU does not support GCS");
- return EXIT_UNSUPPORTED;
- }
+ FAIL_UNSUPPORTED ("kernel or CPU does not support GCS");
bool gcs_enabled = __check_gcs_status ();
if (gcs_enabled)
puts ("GCS enabled");