Rainbow/Testing: Difference between revisions

From OLPC
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(One intermediate revision by one other user not shown)
Line 5: Line 5:
To test it on a regular system, you might [[#Installation|install it]], then run something like:
To test it on a regular system, you might [[#Installation|install it]], then run something like:


sudo rainbow-easy gaming /bin/bash
sudo rainbow-easy gaming /bin/bash
sudo rainbow-easy banking /usr/bin/firefox -no-remote
sudo rainbow-easy banking /usr/bin/firefox -no-remote
sudo rainbow-easy av /usr/bin/mplayer ~/some/movie
sudo rainbow-easy av /usr/bin/mplayer ~/some/movie


These examples will drop you into an isolated bash session, firefox session, or mplayer session in which you can play.
These examples will drop you into an isolated bash session, firefox session, or mplayer session in which you can play.
Line 13: Line 13:
''NB: If you want to isolate more complicated software, then you're going to use the low-level <tt>rainbow-run</tt> interface used by <tt>rainbow-easy</tt>. Here are some examples to help you get started:
''NB: If you want to isolate more complicated software, then you're going to use the low-level <tt>rainbow-run</tt> interface used by <tt>rainbow-easy</tt>. Here are some examples to help you get started:


''Launch mplayer with a fresh nested Xephyr X server.''
''Launch mplayer with a fresh nested Xephyr X server.''
sudo rainbow-run -v -v -v -s /var/spool/rainbow/2 -u $USER -c "`pwd`" -f 0 -f 1 -f 2 -E "DISPLAY=:0" -o audio -a /usr/bin/rainbow-xify -o xephyr -- /usr/bin/mplayer ~/some/movie
sudo rainbow-run -v -v -v -s /var/spool/rainbow/2 -u $USER -c "`pwd`" -f 0 -f 1 -f 2 -E "DISPLAY=:0" -o audio -a /usr/bin/rainbow-xify -o xephyr -o network -- /usr/bin/mplayer ~/some/movie
''Launch bash in a previously generated container.''
''Launch bash in a previously generated container.''
sudo rainbow-run -v -v -v -s /var/spool/rainbow/2 -u $USER -f 0 -f 1 -f 2 -i secrets -r 10000 -- /bin/bash
sudo rainbow-run -v -v -v -s /var/spool/rainbow/2 -u $USER -f 0 -f 1 -f 2 -i secrets -r 10000 -- /bin/bash


Obviously, please contribute more automated tests, helpers, and [[Reporting bugs|bug reports]]!
Obviously, please contribute more automated tests, helpers, and [[Reporting bugs|bug reports]]!

Latest revision as of 22:25, 28 November 2009

Rainbow :: git :: sources :: rainbow-0.8.6.tar.bz2 :: announcement


Rainbow is easy to test in chroots, for example, those created by mock. See test-rainbow and, in particular,this small multi-user test script.

To test it on a regular system, you might install it, then run something like:

sudo rainbow-easy gaming /bin/bash
sudo rainbow-easy banking /usr/bin/firefox -no-remote
sudo rainbow-easy av /usr/bin/mplayer ~/some/movie

These examples will drop you into an isolated bash session, firefox session, or mplayer session in which you can play.

NB: If you want to isolate more complicated software, then you're going to use the low-level rainbow-run interface used by rainbow-easy. Here are some examples to help you get started:

Launch mplayer with a fresh nested Xephyr X server. 
sudo rainbow-run -v -v -v -s /var/spool/rainbow/2 -u $USER -c "`pwd`" -f 0 -f 1 -f 2 -E "DISPLAY=:0" -o audio -a /usr/bin/rainbow-xify -o xephyr -o network -- /usr/bin/mplayer ~/some/movie
Launch bash in a previously generated container.
sudo rainbow-run -v -v -v -s /var/spool/rainbow/2 -u $USER -f 0 -f 1 -f 2 -i secrets -r 10000 -- /bin/bash

Obviously, please contribute more automated tests, helpers, and bug reports!