Re: [PATCH] Download and run Dogtail script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris Lumens wrote:
+               # download completed, run the test
+               if not os.fork():
+                   # we are in the child
+                   os.chmod(testcase, 0755)
+                   os.execv(testcase, [testcase])
+                   sys.exit(0)
+               else:
+                   # we are in the parent, sleep to give time for the testcase to initialize
+                   # todo: is this needed, how to avoid possible race conditions
+                   time.sleep(1)

Probably cleaner here to os.waitpid() instead of sleeping, but it looks
fine otherwise.

From the Python docs:
"On Unix: Wait for completion of a child process given by process id pid, and return a tuple containing its process id and exit status indication".

We're not waiting for the child process to finish. Just give it some time to initialize and then continue with normal execution of anaconda. That's to give time to the Dogtail test script to initialize and be able to test stuff before anaconda proceeds with execution.
Not really very smart and may not be so usable.


We will probably also want to add a dogtail command to kickstart which
is very easy to do.


already closed as WONTFIX:
https://bugzilla.redhat.com/show_bug.cgi?id=236915

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux