Skip to contentSkip to conversation

fio exits with 0 with some bad job files

DISCUSSION Bruce Cran 2 participants 3 messages Oct 6, 2014 – Oct 7, 2014

lore
Share & tools
lore

Bruce Cran

author
#0 lore raw

If you run fio with --parse-only and a job file such as examples/tiobench-example.fio that's had the semi-colons removed from the first two lines, fio prints an error message but still exits with 0:

% ./fio examples/tiobench-example.fio --parse-only
fio: option <tiobench like setup, add more fX files between the stonewalls to> outside of [] job section % echo $?
0
%

I'd have expected it to exit with a non-zero value.

Signature · 1 line
Bruce
#1 lore raw
Quoted 4 lines · Bruce Cran

If you run fio with --parse-only and a job file such as examples/tiobench-example.fio that's had the semi-colons removed from the first two lines, fio prints an error message but still exits with 0:

Quoted 8 lines

% ./fio examples/tiobench-example.fio --parse-only
fio: option <tiobench like setup, add more fX files between the stonewalls to> outside of [] job section
% echo $?
0
%

I'd have expected it to exit with a non-zero value.

Not too surprising, don't think any of that was really audited. But a bug, of course, will look at fixing that up. Is it consistent across any error, or did you just notice this particular one?

Signature · 1 line
Jens Axboe
#2 lore raw
Quoted 12 lines · Jens Axboe
Quoted 11 lines · Bruce Cran

If you run fio with --parse-only and a job file such as examples/tiobench-example.fio that's had the semi-colons removed from the first two lines, fio prints an error message but still exits with 0:

% ./fio examples/tiobench-example.fio --parse-only
fio: option <tiobench like setup, add more fX files between the stonewalls to> outside of [] job section
% echo $?
0
%

Quoted 5 lines
Quoted 1 line

I'd have expected it to exit with a non-zero value.

Not too surprising, don't think any of that was really audited. But a bug, of course, will look at fixing that up. Is it consistent across any error, or did you just notice this particular one?

That particular one was a silly one, affected the non parse-only as well. It ended up erroring out on no jobs being defined, so this improves the behavior for that too.

http://git.kernel.dk/?p=fio.git;a=commit;h=0e9c21a29431e43cd73c83c13271ee6e94fe1328

Signature · 1 line
Jens Axboe