Thanks Tomohiro and Jens. I also tested the latest git. The previous method now fails: # QD=1 fio --server=localhost& # fio --client=localhost test.job and the more suitable method # fio --server=localhost& # QD=1 fio --client=localhost test.job passes as intended. Regards, Jeff -----Original Message----- From: fio-owner@xxxxxxxxxxxxxxx [mailto:fio-owner@xxxxxxxxxxxxxxx] On Behalf Of Jens Axboe Sent: Friday, June 15, 2018 7:56 AM To: Tomohiro Kusumi <kusumi.tomohiro@xxxxxxxxx>; fio@xxxxxxxxxxxxxxx Subject: Re: [PATCH] client: parse env variables before sending job-file contents to server On 6/15/18 9:11 AM, Tomohiro Kusumi wrote: > Fixes "fio environment var bug". > https://www.spinics.net/lists/fio/msg07093.html > > Add read_ini_data() to parse and expand env variables within job-file > before sending to server. By doing this, clients can control > parameters embedded within the job-file, without server side having to > set them separately. Looks good to me, just one minor comment: > +static int read_ini_data(int fd, void *data, size_t size) { > + char *p = data; > + int ret = 0; > + > + FILE *fp = fdopen(dup(fd), "r"); > + if (!fp) > + return errno; > + > + while (1) { > + ssize_t len; > + char buf[OPT_LEN_MAX+1], *sub; > + > + if (!fgets(buf, sizeof(buf), fp)) { > + if (ferror(fp)) { > + if (errno == EAGAIN || errno == EINTR) > + continue; > + ret = errno; > + break; > + } else > + break; > + } This should just be: if (!fgets(buf, sizeof(buf), fp)) { if (ferror(fp)) { if (errno == EAGAIN || errno == EINTR) continue; ret = errno; } break; } I'll make that change while applying. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe fio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html ��.n��������+%������w��{.n�������^n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�