[LTP] [PATCH v10 1/2] Rewrite aio-stress test using LTP API

Cyril Hrubis chrubis@suse.cz
Fri Dec 9 13:37:32 CET 2022


Hi!
> +static struct tst_test test = {
> +	.test_all = run,
> +	.setup = setup,
> +	.needs_tmpdir = 1,
> +	.needs_root = 1,

One more thing, this needs runtime treatement since if you pass large
enough file size the test will timeout.

First of all we should add large enough max runtime as we do for the
rest of the aio tests, i.e. .max_runtime = 1800,

And secondly, I would do that in a subsequent patchset, we should add
check for running out of runtime into the worker loop.

> +	.options = (struct tst_option[]){
> +		{ "a:", &str_iterations, "Total number of ayncs I/O the program will run (default 500)" },
> +		{ "b:", &str_max_io_submit, "Max number of iocbs to give io_submit at once" },
> +		{ "c:", &str_num_contexts, "Number of io contexts per file" },
> +		{ "d:", &str_depth, "Number of pending aio requests for each file (default 64)" },
> +		{ "e:", &str_io_iter, "Number of I/O per file sent before switching to the next file (default 8)" },
> +		{ "f:", &str_num_files, "Number of files to generate" },
> +		{ "g:", &str_context_offset, "Offset between contexts (default 2M)" },
> +		{ "l", &latency_stats, "Print io_submit latencies after each stage" },
> +		{ "L", &completion_latency_stats, "Print io completion latencies after each stage" },
> +		{ "m", &str_use_shm, "SHM use ipc shared memory for io buffers instead of malloc" },
> +		{ "n", &no_fsync_stages, "No fsyncs between write stage and read stage" },
> +		{ "o:", &str_stages, "Add an operation to the list: write=0, read=1, random write=2, random read=3" },
> +		{ "O", &str_o_flag, "Use O_DIRECT" },
> +		{ "r:", &str_rec_len, "Record size in KB used for each io (default 64K)" },
> +		{ "s:", &str_file_size, "Size in MB of the test file(s) (default 1024M)" },
> +		{ "t:", &str_num_threads, "Number of threads to run" },
> +		{ "u", &unlink_files, "Unlink files after completion" },
> +		{ "v", &verify, "Verification of bytes written" },
> +		{ "x", &no_stonewall, "Turn off thread stonewalling" },
> +		{},
> +	},
> +};

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list