Fix two minor typos
Ensure we have enough room for the ETA runstr

The calculation of 1:4 is wrong, it's 1:5. And we missed the similar
change in server.c.

Reported-by: Andreas Grünbacher <andreas.gruenbacher@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Add a get_jobs_eta() to return jobs eta information

We duplicate this code in eta.c and server.c, consolidate it.

Signed-off-by: Jens Axboe <axboe@fb.com>
Ensure that job name is set before being used

Andreas reports:

When passing the --readonly option, with the following write job (and
probably with any write job), I get an error message with a NULL job
name. Job description used:

[write]
thread
bs=64k
direct=1
ioengine=sync
size=128m
filename=test.tmp
rw=write
do_verify=0

Reported-by: Andreas Grünbacher <andreas.gruenbacher@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Get the crctest results properly aligned

Before:

md5:	534.03 MB/sec
crc64:	392.31 MB/sec
crc32:	352.36 MB/sec
crc32c:	8225.43 MB/sec
crc16:	384.46 MB/sec
crc7:	386.79 MB/sec
sha1:	381.15 MB/sec
sha256:	186.47 MB/sec
sha512:	303.18 MB/sec
xxhash:	6329.90 MB/sec

After:

md5:	  548.59 MB/sec
crc64:	  381.45 MB/sec
crc32:	  347.89 MB/sec
crc32c:	 8577.36 MB/sec
crc16:	  396.56 MB/sec
crc7:	  396.72 MB/sec
sha1:	  385.87 MB/sec
sha256:	  206.60 MB/sec
sha512:	  314.62 MB/sec
xxhash:	 6293.64 MB/sec

Signed-off-by: Jens Axboe <axboe@fb.com>
Cast input argument for json_object_add_value_int to long long

The latency related (and some other) variables type is uint32_t
but the JSON integer type is long long. So we need to cast
the numbers to long long type to make JSON output correctly.

Signed-off-by: Puthikorn Voravootivat <puthik@chromium.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
update_condensed_str(): Fix for empty input strings

Empty input strings resulted in unterminated result strings.
Verify: Fix and improve verify_header()

Report errors directly from verify_header(); requires passing in the header
number and length.  Correctly report the file name, offset, and expected header
size in all error messages.