stevieb9 / rpi-wiringpi

Perl interface to Raspberry Pi's board, GPIO and various sensors and ICs
7 stars 1 forks source link

meta data doesn't get cleaned up on failed tests #150

Closed stevieb9 closed 4 years ago

stevieb9 commented 5 years ago

We will somehow need a test to ensure that failed tests clean up properly...

                         '8e2c28516e3eda62fe1e1b847f1df430' => {
                                                                 'proc' => 19166,
                                                                 'label' => 't/335-shift_reg_adc.t'
                                                               },
                         '9666aba591fc178ab2112854ab2f4c11' => {
                                                                 'proc' => 18801,
                                                                 'label' => 't/150-cleanup.t'
                                                               },
                         'f693bbb439f879ee3fcf6344c16bc612' => {
                                                                 'proc' => 23802,
                                                                 'label' => 't/325-servo.t'
                                                               },
                         '46f2db2a844c876913207b4f4ccffe05' => {
                                                                 'proc' => 357,
                                                                 'label' => 't/105-pin.t'
                                                               },
                         '612f0ff8ee7b67a1e75c11c0b3b84edb' => {
                                                                 'proc' => 1470,
                                                                 'label' => 't/140-pwm_spi_adc.t'
                                                               },
                         '331bbd1a7bd10126666a0607ac8f956c' => {
                                                                 'label' => 't/150-cleanup.t',
                                                                 'proc' => 4548
                                                               },
                         'bf53328673cd2c4a39542a88da746c0b' => {
                                                                 'label' => 'multi_die',
                                                                 'proc' => 9634
                                                               }
                       },
          'pwm' => {
                     'in_use' => 0
                   },
          'pins' => {
                      '26' => {
                                'state' => 0,
                                'alt' => 0,
                                'comment' => '26:t/110-register.t',
                                'mode' => 0,
                                'users' => {
                                             '70e3b75d9fbcaff7be64c520f795766c' => 1
                                           }
                              },
                      '18' => {
                                'mode' => 0,
                                'users' => {
                                             '67badf1adb76d2d0f6167f234ac2684f' => 1
                                           },
                                'comment' => undef,
                                'alt' => 0,
                                'state' => 0
                              },
                      '12' => {
                                'comment' => '12:t/110-register.t',
                                'state' => 0,
                                'alt' => 0,
                                'users' => {
                                             '70e3b75d9fbcaff7be64c520f795766c' => 1
                                           },
                                'mode' => 0
                              }
                    },
stevieb9 commented 5 years ago

The good thing here is that there's only a single shared memory segment and semaphgre at all times.

stevieb9 commented 5 years ago

It's looking a whole lot better now. Going to run a dispatch until tomorrow and see the results before closing this.

stevieb9 commented 5 years ago

Although I've added the ability to separate shared mem spaces between prod and test, this is still on the radar.

It appears as though it's related to PWM and multi tests. The tester seems to hang mid-flight.

Overall though, ~70 runs kept things relatively very clean.

stevieb9 commented 5 years ago

This is becoming a bigger problem. t/310-dac.t fails, we have three pins remaining and can't be used again.

pi@pi-test:~/repos/rpi-wiringpi $ pimeta rpit
$VAR1 = {
          'objects' => {
                         '717545823cf2906f35e7ebd3dfc16ec0' => {
                                                                 'proc' => 872,
                                                                 'label' => 't/310-dac.t'
                                                               },
                         'd8250d07b27ee37c8fb97b7bff54c2a7' => {
                                                                 'label' => 'serial_arduino_display',
                                                                 'proc' => 374
                                                               },
                         'e369f185a7832fc05bda4ec12eb1c7c3' => {
                                                                 'proc' => 377,
                                                                 'label' => 'oled display date/time'
                                                               }
                       },
          'pwm' => {},
          'pins' => {
                      '12' => {
                                'mode' => 0,
                                'state' => 0,
                                'comment' => 'MCP4922 DAC CS',
                                'users' => {
                                             '717545823cf2906f35e7ebd3dfc16ec0' => 1
                                           },
                                'alt' => 0
                              },
                      '26' => {
                                'alt' => 0,
                                'users' => {
                                             '717545823cf2906f35e7ebd3dfc16ec0' => 1
                                           },
                                'comment' => 'MCP3008 ADC CS',
                                'state' => 0,
                                'mode' => 0
                              }
                    },
          'object_count' => 3,
          'testing' => {
                         'test_num' => '310',
                         'test_name' => 'dac'
                       }
        };
stevieb9 commented 5 years ago

The latter comment refers to #160, but things should still clean up properly if a program or test file crashes

stevieb9 commented 4 years ago

Unit test suite now cleans up properly