arch_tests,
 };
 
+static struct test_workload *workloads[] = {
+       &workload__noploop,
+};
+
 static int num_subtests(const struct test_suite *t)
 {
        int num;
        return 0;
 }
 
+static int run_workload(const char *work, int argc, const char **argv)
+{
+       unsigned int i = 0;
+       struct test_workload *twl;
+
+       for (i = 0; i < ARRAY_SIZE(workloads); i++) {
+               twl = workloads[i];
+               if (!strcmp(twl->name, work))
+                       return twl->func(argc, argv);
+       }
+
+       pr_info("No workload found: %s\n", work);
+       return -1;
+}
+
 int cmd_test(int argc, const char **argv)
 {
        const char *test_usage[] = {
        NULL,
        };
        const char *skip = NULL;
+       const char *workload = NULL;
        const struct option test_options[] = {
        OPT_STRING('s', "skip", &skip, "tests", "tests to skip"),
        OPT_INCR('v', "verbose", &verbose,
                    "be more verbose (show symbol address, etc)"),
        OPT_BOOLEAN('F', "dont-fork", &dont_fork,
                    "Do not fork for testcase"),
+       OPT_STRING('w', "workload", &workload, "work", "workload to run for testing"),
        OPT_END()
        };
        const char * const test_subcommands[] = { "list", NULL };
        if (argc >= 1 && !strcmp(argv[0], "list"))
                return perf_test__list(argc - 1, argv + 1);
 
+       if (workload)
+               return run_workload(workload, argc, argv);
+
        symbol_conf.priv_size = sizeof(int);
        symbol_conf.sort_by_name = true;
        symbol_conf.try_vmlinux_path = true;
 
 DECLARE_SUITE(vectors_page);
 #endif
 
+/*
+ * Define test workloads to be used in test suites.
+ */
+typedef int (*workload_fnptr)(int argc, const char **argv);
+
+struct test_workload {
+       const char      *name;
+       workload_fnptr  func;
+};
+
+#define DECLARE_WORKLOAD(work) \
+       extern struct test_workload workload__##work
+
+#define DEFINE_WORKLOAD(work) \
+struct test_workload workload__##work = {      \
+       .name = #work,                          \
+       .func = work,                           \
+}
+
+/* The list of test workloads */
+DECLARE_WORKLOAD(noploop);
+
 #endif /* TESTS_H */
 
--- /dev/null
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <stdlib.h>
+#include <signal.h>
+#include <unistd.h>
+#include <linux/compiler.h>
+#include "../tests.h"
+
+static volatile sig_atomic_t done;
+
+static void sighandler(int sig __maybe_unused)
+{
+       done = 1;
+}
+
+static int noploop(int argc, const char **argv)
+{
+       int sec = 1;
+
+       if (argc > 0)
+               sec = atoi(argv[0]);
+
+       signal(SIGINT, sighandler);
+       signal(SIGALRM, sighandler);
+       alarm(sec);
+
+       while (!done)
+               continue;
+
+       return 0;
+}
+
+DEFINE_WORKLOAD(noploop);