#include "struct_ops_private_stack_fail.skel.h"
#include "struct_ops_private_stack_recur.skel.h"
+#if defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__)
static void test_private_stack(void)
{
struct struct_ops_private_stack *skel;
if (!ASSERT_OK_PTR(skel, "struct_ops_private_stack__open"))
return;
- if (skel->data->skip) {
- test__skip();
- goto cleanup;
- }
-
err = struct_ops_private_stack__load(skel);
if (!ASSERT_OK(err, "struct_ops_private_stack__load"))
goto cleanup;
if (!ASSERT_OK_PTR(skel, "struct_ops_private_stack_fail__open"))
return;
- if (skel->data->skip) {
- test__skip();
- goto cleanup;
- }
-
err = struct_ops_private_stack_fail__load(skel);
ASSERT_ERR(err, "struct_ops_private_stack_fail__load");
-cleanup:
struct_ops_private_stack_fail__destroy(skel);
}
if (!ASSERT_OK_PTR(skel, "struct_ops_private_stack_recur__open"))
return;
- if (skel->data->skip) {
- test__skip();
- goto cleanup;
- }
-
err = struct_ops_private_stack_recur__load(skel);
if (!ASSERT_OK(err, "struct_ops_private_stack_recur__load"))
goto cleanup;
struct_ops_private_stack_recur__destroy(skel);
}
-void test_struct_ops_private_stack(void)
+static void __test_struct_ops_private_stack(void)
{
if (test__start_subtest("private_stack"))
test_private_stack();
if (test__start_subtest("private_stack_recur"))
test_private_stack_recur();
}
+#else
+static void __test_struct_ops_private_stack(void)
+{
+ test__skip();
+}
+#endif
+
+void test_struct_ops_private_stack(void)
+{
+ __test_struct_ops_private_stack();
+}