edith
Clone
https://git.tahinli.com/Tahinli/edith.git
0 watching0 forksRust18.3 MiBff99ad6Tahinli6 days ago1055 commits
| 1 | //! The decode seat for a test, shared by the engine's test binaries. |
| 2 | //! |
| 3 | //! `VE_SW` is process-wide and the test harness runs a binary's tests on many |
| 4 | //! threads, so a test that pins it for its own seat must not share the process |
| 5 | //! with one that unpins it. Every test that pins a seat takes [`SEAT`] for as |
| 6 | //! long as its guard lives, and the guard leaves `VE_SW` as it found it: the |
| 7 | //! software seat's tests are then one at a time, and none of them can see a |
| 8 | //! hardware pin that another test is holding. |
| 9 | //! |
| 10 | //! A test that means "the software seat" takes [`software`]; one that means "the |
| 11 | //! plugin, if the machine has it" takes [`hardware`]. A test that takes neither |
| 12 | //! is one whose assertions hold on either seat. |
| 13 | |
| 14 | use ; |
| 15 | |
| 16 | static SEAT: = new; |
| 17 | |
| 18 | /// Holds the seat for the test's duration. Dropping it removes `VE_SW`. |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | /// The software seat: the plugin forced off for as long as the guard lives. |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | /// The plugin, as the machine has it: `VE_SW` unset for as long as the guard lives. |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 |