1f08c3bdfSopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later 2f08c3bdfSopenharmony_ci/* 3f08c3bdfSopenharmony_ci * Copyright (c) 2021, Linux Test Project 4f08c3bdfSopenharmony_ci */ 5f08c3bdfSopenharmony_ci/* 6f08c3bdfSopenharmony_ci * This test is set up so that the timeout is not long enough to guarantee 7f08c3bdfSopenharmony_ci * enough runtime for two iterations, i.e. the timeout without offset and after 8f08c3bdfSopenharmony_ci * scaling is too small and the tests ends up with TBROK. 9f08c3bdfSopenharmony_ci * 10f08c3bdfSopenharmony_ci * The default timeout in the test library is set to 30 seconds. The test 11f08c3bdfSopenharmony_ci * runtime is set to 5 so the test should timeout after 35 seconds. 12f08c3bdfSopenharmony_ci */ 13f08c3bdfSopenharmony_ci 14f08c3bdfSopenharmony_ci#include <stdlib.h> 15f08c3bdfSopenharmony_ci#include <unistd.h> 16f08c3bdfSopenharmony_ci#include "tst_test.h" 17f08c3bdfSopenharmony_ci 18f08c3bdfSopenharmony_cistatic void run(void) 19f08c3bdfSopenharmony_ci{ 20f08c3bdfSopenharmony_ci tst_res(TINFO, "Sleeping for 40 seconds"); 21f08c3bdfSopenharmony_ci sleep(40); 22f08c3bdfSopenharmony_ci tst_res(TFAIL, "Still alive"); 23f08c3bdfSopenharmony_ci} 24f08c3bdfSopenharmony_ci 25f08c3bdfSopenharmony_cistatic struct tst_test test = { 26f08c3bdfSopenharmony_ci .test_all = run, 27f08c3bdfSopenharmony_ci .max_runtime = 5, 28f08c3bdfSopenharmony_ci}; 29