summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)Author
2019-11-14t/run-fio-tests: improve error handlingVincent Fu
More gracefully handle errors when running a test. Also change the EXAMPLE to refer to fio's canonical git repository. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-11-14io_u: move to next zone even if zoneskip is unsetVincent Fu
This patch makes fio's behavior under zonemode=strided conform to the documentation: I/O happens in a single zone until zonesize bytes have been transferred. After that number of bytes has been transferred processing of the next zone starts. With zonemode=strided, before commit 35f561eb, fio would only move to the next zone when zoneskip > 0 and zonesize bytes were written. There would always be zoneskip bytes between the end of one zone and the beginning of the next zone. If zoneskip was not set or set to 0, all IO would happen in the first zone. Commit 35f561eb changed this so that fio would move to the next zone upon writing zonesize bytes if zoneskip was explicitly set to a value >= 0. This option made it possible for zones to be contiguous. The documentation was not updated to reflect the new behavior. I originally intended to submit a patch to update fio's documentation, but upon further reflection it seems better to change fio's behavior and have a clean user interface than to change the documentation to note that zoneskip must be explciitly set in order for fio to move to the next zone. This patch also updates t/strided.py to reflect the new behavior. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-11-06t/run-fio-tests: a script to automate running fio testsVincent Fu
fio actually has a substantial test infrastructure but lacks a convenient way to run existing tests in an automated fashion. This script provides the means to run almost all of fio's existing tests with a single command. A full run finishes in less than 10 minutes. This script can be used to catch bugs before patches are submitted. It can also be used to test new fio builds as patches are committed to the repository.
2019-11-06t/jobs: fix t0011 syntax errorVincent Fu
2019-11-06t/jobs: clean up t0009 and use only 4 CPUsVincent Fu
There are two runtime= lines in t0009. Comment out the one that is ignored. Also reduce the number of CPUs required from 6 to 4 so that this can be run on more systems. The failure still occurs on systems with four CPUs.
2019-11-06t/jobs: drop time_based in t0007Vincent Fu
This is an extraneous option that produces a warning message which complicates using this job file for automated testing.
2019-11-06t/jobs: use current directory for test file for t0003 and t0004Vincent Fu
This makes it easier to investigate problems when these job files are used for automated testing.
2019-11-06t/jobs: fixup t0002 test jobsVincent Fu
- add .fio extension to match other job files - change line endings from DOS to UNIX - use local file instead of device
2019-11-06t/stest: non-zero exit value on failureVincent Fu
To facilitate automated testing, return a non-zero exit value when a smalloc failure occurs.
2019-11-06t/sgunmap-test.py: drop six.moves dependencyVincent Fu
range was never actually used in this script.
2019-11-06t/steadystate_tests: better support automated testingVincent Fu
To better support using this script for automated testing, do the following: - Use a more portable python interpreter reference - Drop six.moves dependency - Eliminate two potential divide-by-zero runtime errors - Count and report the number of passed and failed tests - Keep the output of the test jobs for inspection in case of failure - Exit code 0 if all tests pass and non-zero otherwise
2019-11-06t/strided.py: change LFSR testsVincent Fu
LFSR init fails on occasion with small zoneranges. This patch increases the zonerange for LFSR tests to eliminate these failures. Also fix a typo in the last test job.
2019-11-06t/readonly: replace shell script with python scriptVincent Fu
The new script better supports automated testing than the previous one. Also get rid of the t/jobs/readonly-?.fio job files. Using jobs files with the --readonly parameter produces the same behavior as when --readonly precedes --rw=XXX on the command line.
2019-11-06t/iee754: add return valueVincent Fu
To facilitate automated testing, return 0 when all tests succeed and a non-zero value otherwise. Also add one more test value.
2019-10-15testing: add test script for zonemode=stridedVincent Fu
Python script to run jobs with randommap, with LFSR, and with nonrandommap. Uses null ioengine or a real file. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-09-26t/zbd: Avoid magic number of test case countShin'ichiro Kawasaki
In the test script t/zbd/test-zbd-support, the number of test cases is defined as a raw constant. Every time a new test case is added, need to update the constant but this chore tends to be overlooked. When test case 47 was added recently, the number was not incremented from 46. Then the test script does not run the test case 47. To avoid the constant increment chore, automate the test case number counting. List bash functions which implement test cases and convert the list to test case numbers. Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-08-29zbd: Add support for zoneskip optionDamien Le Moal
To speed up device tests (performance and or quality validation) of very large capacity block devices such as SMR disks, it is useful to allow skipping some block ranges for sequential workloads. While the zonemode=stridded implements such feature, it does not allow controlling read operations in partially written zones of zoned block devices (i.e. prevent reads after a zone write pointer) and can result in IO errors if executed on a zoned block devices with zones already written. To solve this problem, add support for the zoneskip option with zonemode=zbd, allowing a sequential workload to skip zoneskip bytes once a zone has been fully written or its data has been read. The zoneskip option is ignored for random workloads. For read workloads, zone skipping takes into account the read_beyond_wp option to switch zone either when all valid data in the zone is read (read_beyond_wp=0) or the entire zone has been read (read_beyond_wp=1). Add test47 to t/zbd/test-zbd-support to test that zoneskip invalid values are handled correctly. Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-08-29zbd: Cleanup zbd_init()Damien Le Moal
For a job using a zoned device, the zonesize option must always specify the device zone size. That is checked in the function parse_zone_info(). The zonesize checks in zbd_init() apply only to jobs running with zonemode=zbd on a regular block device. So move these checks into init_zone_info() which is used to emulate zone information for regular block devices. Fix t/zbd test #43 accordingly. Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-08-14zbd: Improve robustness of unit testsBart Van Assche
Give up if creation of the null_blk instance fails. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-08-08t/zbd: Fix I/O bytes rounding errorsShin'ichiro Kawasaki
When fio reports write bytes or read bytes, it rounds the number with units MiB or KiB to fit the number within limited number of digits. This results in rounding errors of the reported bytes and sometimes causes test failures for test case #17 in test-zbd-support which reports incorrect total I/O bytes in case both of write bytes and read bytes are rounded up. To avoid the rounding error, increase the number of digits from default value 4 to 10 to keep precision. For example, a number "256MiB" will be reported as "267911168B" with this change. Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-07-31t/stest: make the test more challengingVincent Fu
Add large smalloc requests to the sfree phase of the test. This exposes a smalloc garbage collection issue.
2019-05-09t/io_uring: improve EOPNOTSUPP messageJens Axboe
Put in one line and include kernel as well. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-05-08t/io_uring: clarify polled support is fs + deviceJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-04-25io_uring: remove cachehit informationJens Axboe
This patch never made it into the upstream kernel, remove knowledge of it from fio. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-03-11t/io_uring: memset() allocated memoryKeith Busch
But I totally rushed this patch and just sent it once I heard it "worked", and it really doesn't because malloc doesn't zero the buffer. My mistake, kzalloc spoiled me. Here's the fix: Fixes: e39863e3cb61 ("t/io_uring: add depth options") Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-03-08t/io_uring: add depth optionsKeith Busch
Make depth options command line parameters so a recompile isn't required to see how it affects performance. Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-03-06t/io_uring: stop when max number of files is reachedJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-02-23t/zbd: Add multi-job libaio testDamien Le Moal
Introduce test case 46 to verify that write ordering is correct and that no job deadlock occurs in the case of a multi job run with an asynchronous I/O engine (libaio). Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-02-23t/zbd: Default to using blkzone toolShin'ichiro Kawasaki
The test-zbd-support script fails to execute for partition devices with the error message "Open /dev/sdX1 failed (No such file or directory)" when libzbc tools are used by the script to open the specified partition device. This is due to libzbc also opening a partition holder block device file, which when closed causes a partition table revalidation and the partition device files to be deleted and recreated by udev through the RRPART ioctl. To avoid the failure, default to using blkzone for zone report and reset if supported by the system (util-linux v2.30 and higher) as this tool does not open the older device and avoids the same problem. To obtain the device maximum number of open zones, which is not advertized by blkzone, use sg_inq for SCSI devices and use the default maximum of 128 for other device types (i.e. null_blk devices in zone mode). Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-02-23t/zbd: Fix test 2 and 3 result handlingDamien Le Moal
Removal of the message "No I/O performed" when fio does not execute any I/O broke zbd tests 2 and 3 as this message is looked after to test for success. Fix this by looking for a "Run status" line starting with "WRITE:" for test 2 and "READ:" for test 3. The run status lines are not printed when no I/O is performed. Testing for the absence of these strings thus allows to easily test if I/Os where executed or not. Fixes: ff3aa922570c ("Kill "No I/O performed by ..." message") Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-02-23t/zbd: Fix handling of partition devicesShin'ichiro Kawasaki
To allow t/zbd/tests-zbd-support test script to run correctly on partitions of zoned block devices, fix access to the device properties through sysfs by referencing the sysfs directory of the holder block device. Doing so, the "zoned", "logical_block_size" and "mq" attributes can be correctly accessed. Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-02-11Document switch fall-through casesJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-31t/io_uring: verbose error for -95/-EOPNOTSUPP failureJens Axboe
If we fail with this error and polling is enabled, it's because the file system hosting the file doesn't support polling. Let the user know. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-29io_uring: ensure we use the right argument syscallJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-29t/io_uring: fix bad ifJens Axboe
We need braces for that check, or it's always going to be true. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-28io_uring: sync with kernelJens Axboe
- Update to newer kernel API header - Use IORING_ENTER_SQ_WAKEUP Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-16io_uring: sync with upstream APIJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-15t/io_uring: use fio provided memory barriersJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-15t/io_uring: fixesJens Axboe
- Break out if we get a fatal error from reap_events() - Ignore polled=1 if do_nop=1 Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-15t/io_uring: terminate buf[] file depth stringJens Axboe
Prevents garbage print for !s->nr_files (do_nop = 1). Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-15t/io_uring: wait if we're at queue limitJens Axboe
There was an off-by-one there, it's perfectly fine not to specify events to wait for if the submission will take us to the queue depth limit. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-15t/io_uring: print file depthsJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-15t/io_uring: pick next file if we're over the limtiJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-13t/io_uring: use the right check for when to waitJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-13t/io_uring: only call setrlimit() for fixedbufsJens Axboe
It's root only. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-13t/io_uring: add option for register_filesJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-13io_uring: fix pointer cast warning on 32-bitJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-13Move io_uring to os/linux/Jens Axboe
It's not a generic OS header, reflect the fact that it's Linux only by moving it to a linux/ directory. Also update io_uring_sqe to match current API. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-12t/io_uring: add IORING_OP_NOP supportJens Axboe
Doesn't do anything on the kernel side, just a round trip through the SQ and CQ ring. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-11t/io_uring: only set IORING_ENTER_GETEVENTS when actively reapingJens Axboe
Don't set it if we don't need to find an event (to_wait == 0). Signed-off-by: Jens Axboe <axboe@kernel.dk>