1. 08 Dec, 2020 1 commit
  2. 07 Dec, 2020 1 commit
  3. 04 Dec, 2020 2 commits
  4. 02 Dec, 2020 4 commits
  5. 01 Dec, 2020 2 commits
  6. 30 Nov, 2020 4 commits
  7. 27 Nov, 2020 1 commit
  8. 26 Nov, 2020 1 commit
  9. 25 Nov, 2020 2 commits
  10. 23 Nov, 2020 8 commits
    • Marco Trevisan's avatar
      identify: Use stored print to show identify information · dda3587b
      Marco Trevisan authored
      The stored print may contain more metadata, so let's use that for
      device-stored print, if available.
      dda3587b
    • Marco Trevisan's avatar
      examples: Add Identify example · fb585421
      Marco Trevisan authored
      It was the only main action left in the examples, we use the gallery
      from the device if available, otherwise the local one.
      fb585421
    • Benjamin Berg's avatar
      virtual-image: Add command to trigger device removal · 21ee241f
      Benjamin Berg authored
      This is primarily useful for fprintd testing.
      21ee241f
    • Benjamin Berg's avatar
      image-device: Fix incorrect g_free of error · 280f916a
      Benjamin Berg authored
      GError needs to be free'ed using g_error_free, fix this.
      280f916a
    • Benjamin Berg's avatar
      tests: Add device removal test · 1b5dd005
      Benjamin Berg authored
      This tests all relevant scenarios of device removal, i.e.:
       * device is not open
       * device is currently closing
       * device is open and idle
       * device is currently opening
       * device is open and active
      
      The test ensures that in all scenarios the following holds true:
       * device "removed" signal is only emitted after the action completes
       * context "device-removed" signal is only emitted after the device has
         been closed
      
      Note that the "opening" case is special. Here we confirm that a success
      from "open" will not be overriden by a FP_DEVICE_ERROR_REMOVED error, in
      order to correctly signal that the internal device state is open and it
      needs to be closed.
      1b5dd005
    • Benjamin Berg's avatar
      virtual-image: Add a notify::removed handler · 8a6f1932
      Benjamin Berg authored
      In general, we rely on the underlying transport layer to throw errors
      which will abort the current operation. This does not work for the
      virtual image device though, but we need it there for testing purposes.
      
      Add a notify::removed handler that makes things work as expected. Let it
      throw a protocol error which should not be visible to the outside.
      8a6f1932
    • Benjamin Berg's avatar
      device: Treat devices as closed even after a close failure · 0051ff63
      Benjamin Berg authored
      We require the close call, but as the underlying transport layer is
      gone, it will generally just return an error.
      
      In principle, it makes sense to think of close as a function that always
      succeeds (i.e. it makes no sense to try again). Should the device be in
      a bad state, then a subsequent open() will simply fail.
      0051ff63
    • Benjamin Berg's avatar
      Rework device removal to have a nice API · b6dd5224
      Benjamin Berg authored
      This enhances the device removal to create a well defined behaviour.
      
      Primarily, it means that:
       * "device-removed" will only be called for closed devices
       * "removed" will be called only when no operation is active
      
      Note that all actions will fail with FP_DEVICE_ERROR_REMOVED, *except*
      for open which will only return this error if it failed.
      
      Resolves: #330
      b6dd5224
  11. 18 Nov, 2020 1 commit
  12. 10 Nov, 2020 1 commit
    • Benjamin Berg's avatar
      virtual-image: Fix race condition closing new connection · fe498c56
      Benjamin Berg authored
      When a new connection came in we would close the old connection. This in
      turn would trigger a receive error causing the *new* connection to be
      closed from the error handler.
      
      Fix this by simply cancelling any pending transfers when a new
      connection comes in. Also change the error handling code to catch issues
      like partial writes correctly.
      
      This fixes an issue for the fprintd test where some tests were flaky.
      fe498c56
  13. 08 Nov, 2020 2 commits
  14. 07 Nov, 2020 4 commits
  15. 05 Nov, 2020 2 commits
    • Benjamin Berg's avatar
      tests: Add a new test for vfs301 · ae3baadc
      Benjamin Berg authored
      See: #320
      ae3baadc
    • Benjamin Berg's avatar
      tests: Store temporary directory on failure · 4f29a32d
      Benjamin Berg authored
      It is not very useful to just delete the data again after a failure, as
      it might be useful for debugging. Just store it into an "errors"
      subdirectory of the PWD in the hope that this is a sane location.
      
      Note that it'll error out if the directory already exists, but that
      should be acceptable in all cases. i.e. it won't exist in the CI and
      developers can just wipe the directory.
      4f29a32d
  16. 04 Nov, 2020 4 commits
    • Benjamin Berg's avatar
      vfs301: Start capture only on state change to AWAIT_FINGER_ON · e5fa54e8
      Benjamin Berg authored
      Start the capture when the state changes to AWAIT_FINGER_ON instead of
      assuming that the device should always be active.
      
      Closes: #320
      e5fa54e8
    • Benjamin Berg's avatar
      vfs301: Fix device pointer handling in callback · d3076039
      Benjamin Berg authored
      When porting the driver to the new libfprint 1.90.0 a mistake was made
      where the device was not passed through user_data anymore but it was
      still read from there. Stop using user_data in the callback to fix this.
      
      See: #320
      d3076039
    • Benjamin Berg's avatar
      elan: Simplify elan driver internal state machine · a748f4d3
      Benjamin Berg authored
      The elan driver always "deactivates" the device after a cpature run. We
      can simplify the while internal state into a single "active" state and
      rely on the image device driving this state machine correctly.
      
      i.e.:
       * We start a callibrate/capture/deactivate when we go into the
         AWAIT_FINGER_ON state
       * We only store the fact that we are active and want to deactivate
       * We rely on the image device never going into the AWAIT_FINGER_ON
         state without first waiting for the finger to be off (which implies
         deactivation).
      a748f4d3
    • Benjamin Berg's avatar
      image-device: Redefine internal states and valid transitions · 3ee5536a
      Benjamin Berg authored
      This adds a number of new internal states to better capture what is
      going on. Also added are checks that all transitions we make are in the
      set of expected and valid transitions.
      
      Only three drivers use the state_change notification. These drivers are
      updated accordingly.
      3ee5536a