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
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>
{
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 ();
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>
{
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 ();
}
/* Check if the audit modules without GCS marking is loaded when GCS is
- overrided. */
+ overridden. */
#define AUDIT_MOD "tst-gcs-audit1.so"
{
/* 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 ();
#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 (
{
/* 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);
-/* 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"
/* 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"
{
/* 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
{
/* 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");