avocado-framework / avocado-misc-tests

Avocado tests repository
Other
4 stars 26 forks source link

TODO: Porting IOZone form autotest to avocado #36

Closed harish-24 closed 8 years ago

harish-24 commented 8 years ago

@ldoktor I was going through the iterations in #29. I used the suggested way for iteration.

    iteration: !mux
            1:
            2:

While performing 'gnuplot' , because of the ';' in folder name of each variant, the command fails.

2016-05-31 01:45:49,247 process          L0331 INFO | Running 'gnuplot /root/avocado/job-results/job-2016-05-31T01.39-24bd06e/test-results/1-io_iozone.py:IOZone.test;1/data/analysis/2d-write.do'
2016-05-31 01:45:49,260 process          L0418 DEBUG| [stderr] "/root/avocado/job-results/job-2016-05-31T01.39-24bd06e/test-results/1-io_iozone.py:IOZone.test", line 0: Cannot open script file '/root/avocado/job-results/job-2016-05-31T01.39-24bd06e/test-results/1-io_iozone.py:IOZone.test'
2016-05-31 01:45:49,260 process          L0418 DEBUG| [stderr]
2016-05-31 01:45:49,261 process          L0418 DEBUG| [stderr] /bin/sh: 1: 1/data/analysis/2d-write.do: not found
2016-05-31 01:45:49,261 iozone           L0354 ERROR| Problem plotting from commands file /root/avocado/job-results/job-2016-05-31T01.39-24bd06e/test-results/1-io_iozone.py:IOZone.test;1/data/analysis/2d-write.do

Is there a reason for using ';' in folder name for multiplex ? If so, do we need to handle it by gnuplot \"%s\" as a workaround ?

ldoktor commented 8 years ago

Hello @harish-24, yes the ; is part of the results dir specification and it will be present in case there are multiple variants of the test (not only iterations).

Does the '"%s"' work fine? If so then please add it as the dir name could also contain spaces, which usually generates troubles too. Alternatively (only if the '"%s"' does not work) you could use os.chdir() and os.path.relpath() but I'd prefer the cleaner solution you proposed.

harish-24 commented 8 years ago

'"%s"' works fine. Will use this.

ldoktor commented 8 years ago

Cool, I'm closing this issue, looking forward to the updated version of IOZone.

santhosh93 commented 8 years ago

@ldoktor : I am facing an similar kind of issue when I try to port ltp. Actually, my script has 26 variants and it does , os.chdir(self.srcdir) build.make(self.srcdir, extra_args='autotools')

So each time the source directory path is of the format - /var/tmp/avocado_6_AmUN/01-bkp.py_ltp.test;1/src

and make autotools fails with the error - o/p: Running 'make autotools' [stderr] /var/tmp/avocado_6_AmUN/01-bkp.py_ltp.test;1/src/include/mk/automake.mk:113: *\ missing separator. Stop.

If source directory path does not contain ';' I will not get this error How should I proceed now?

ldoktor commented 8 years ago

Well it's a pity some programs can't cope with such name. There is already one workaround for workdir introduced in 136a78b so let me add another one for ;.