selftests: Add test plan API to kselftest.h and adjust callers
[sfrench/cifs-2.6.git] / tools / testing / selftests / breakpoints / step_after_suspend_test.c
index f82dcc1f8841e74b950257e2b96c3b0914987a12..cf868b5e00f79fec541e86c4c9320168449e8ca2 100644 (file)
@@ -173,6 +173,7 @@ int main(int argc, char **argv)
        int opt;
        bool do_suspend = true;
        bool succeeded = true;
+       unsigned int tests = 0;
        cpu_set_t available_cpus;
        int err;
        int cpu;
@@ -191,6 +192,13 @@ int main(int argc, char **argv)
                }
        }
 
+       for (cpu = 0; cpu < CPU_SETSIZE; cpu++) {
+               if (!CPU_ISSET(cpu, &available_cpus))
+                       continue;
+               tests++;
+       }
+       ksft_set_plan(tests);
+
        if (do_suspend)
                suspend();