Compare commits

...

8 Commits

Author SHA1 Message Date
Bastien Nocera
9b3e9d9e8c elan: Fix frames being leaked
==24440== 14,416 bytes in 2 blocks are possibly lost in loss record 9,233 of 9,261
==24440==    at 0x483980B: malloc (vg_replace_malloc.c:309)
==24440==    by 0x7846BB8: g_malloc (gmem.c:102)
==24440==    by 0x48A2ABC: elan_process_frame_thirds (elan.c:277)
==24440==    by 0x785FB37: g_slist_foreach (gslist.c:864)
==24440==    by 0x48A57EE: elan_submit_image (elan.c:320)
==24440==    by 0x48A57EE: capture_complete (elan.c:591)
==24440==    by 0x4880C9C: fpi_ssm_mark_completed (fpi-ssm.c:369)
==24440==    by 0x4881003: fpi_ssm_mark_failed (fpi-ssm.c:437)
==24440==    by 0x48A5424: elan_cmd_cb (elan.c:347)
==24440==    by 0x4882296: transfer_finish_cb (fpi-usb-transfer.c:351)
==24440==    by 0x79BFC68: g_task_return_now (gtask.c:1214)
==24440==    by 0x79BFCA8: complete_in_idle_cb (gtask.c:1228)
==24440==    by 0x78410BD: g_main_dispatch (gmain.c:3272)
==24440==    by 0x78410BD: g_main_context_dispatch (gmain.c:3937)
2019-12-06 16:22:26 +01:00
Marco Trevisan (Treviño)
bb0ef04b85 ci: Partially hardcode the fedora image path 2019-12-05 17:31:46 +01:00
Benjamin Berg
0a475196e0 ci: Use CI generated build image 2019-12-05 14:38:46 +01:00
Benjamin Berg
1dee7985b9 ci: Remove Dockerfile as it is replaced by new logic 2019-12-05 14:38:46 +01:00
Benjamin Berg
a1a3933191 ci: Add fedora image builder target for schedule 2019-12-05 14:38:46 +01:00
Benjamin Berg
9c8360ad67 ci: Do not run usual targets from a scheduled job
This is in preparation to building docker images automatically.
2019-12-05 14:14:13 +01:00
Benjamin Berg
0c7d2d8ecd ci: Define a variable for the fedora docker image 2019-12-05 13:56:12 +01:00
Benjamin Berg
6209b22e3b print: Fix match error propagation
The FPI_MATCH_ERROR constant was set to 0, however it is propagated to
the task completion using g_task_propagate_int. As g_task_propagate_int
will always return -1 on error, we either need to add an explicit -1
check or we just need to match the semantics.

Change the constant to -1, also rearange FP_MATCH_SUCCESS so that it
does not end up being 0.
2019-12-05 11:46:11 +00:00
4 changed files with 66 additions and 43 deletions

View File

@@ -1,13 +1,22 @@
image: registry.freedesktop.org/libfprint/libfprint/master:v1
variables:
FEDORA_TAG: rawhide
FEDORA_VERSION: rawhide
FEDORA_IMAGE: "$CI_REGISTRY/libfprint/$CI_PROJECT_NAME/fedora/$FEDORA_VERSION:$FEDORA_TAG"
BUNDLE: "org.freedesktop.libfprint.Demo.flatpak"
LAST_ABI_BREAK: "056ea541ddc97f5806cffbd99a12dc87e4da3546"
include:
- project: 'wayland/ci-templates'
ref: master
file: '/templates/fedora.yml'
stages:
- check-source
- build
- test
- flatpack
variables:
BUNDLE: "org.freedesktop.libfprint.Demo.flatpak"
LAST_ABI_BREAK: "056ea541ddc97f5806cffbd99a12dc87e4da3546"
image: "$FEDORA_IMAGE"
.build_one_driver_template: &build_one_driver
script:
@@ -29,6 +38,9 @@ variables:
build:
stage: build
except:
variables:
- $CI_PIPELINE_SOURCE == "schedule"
variables:
driver: virtual_image
<<: *build_one_driver
@@ -37,6 +49,9 @@ build:
test:
stage: test
except:
variables:
- $CI_PIPELINE_SOURCE == "schedule"
script:
- meson --werror -Ddrivers=all . _build
- ninja -C _build
@@ -44,6 +59,9 @@ test:
test_valgrind:
stage: test
except:
variables:
- $CI_PIPELINE_SOURCE == "schedule"
script:
- meson -Ddrivers=all . _build
- ninja -C _build
@@ -51,6 +69,9 @@ test_valgrind:
test_indent:
stage: check-source
except:
variables:
- $CI_PIPELINE_SOURCE == "schedule"
script:
- scripts/uncrustify.sh --check
@@ -80,6 +101,9 @@ test_indent:
.flatpak_master_template: &flatpak_master
image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:3.32
stage: flatpack
except:
variables:
- $CI_PIPELINE_SOURCE == "schedule"
variables:
MANIFEST_PATH: "demo/org.freedesktop.libfprint.Demo.json"
# From demo/org.freedesktop.libfprint.Demo.json
@@ -101,3 +125,37 @@ flatpak-manual master:
except:
- tags
- master
# CONTAINERS creation stage
container_fedora_build:
extends: .fedora@container-build
only:
variables:
- $CI_PIPELINE_SOURCE == "schedule" && $CRON_TASK == "BUILD_CI_IMAGES"
variables:
GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
# a list of packages to install
FEDORA_RPMS:
doxygen
flatpak-builder
gcc
gcc-c++
git
glib2-devel
glibc-devel
gobject-introspection-devel
gtk-doc
gtk3-devel
libabigail
libgusb-devel
libX11-devel
libXv-devel
meson
nss-devel
pixman-devel
python3-cairo
python3-gobject
systemd
umockdev
uncrustify
valgrind

View File

@@ -1,36 +0,0 @@
# Rebuild and push with
#
# cd .gitlab-ci/
# docker build --no-cache -t registry.freedesktop.org/libfprint/libfprint/master:v1 .
# docker push registry.freedesktop.org/libfprint/libfprint/master:v1
#
FROM fedora:rawhide
RUN dnf -y update && dnf -y upgrade && \
dnf -y install \
doxygen \
flatpak-builder \
gcc \
gcc-c++ \
git \
glib2-devel \
glibc-devel \
gobject-introspection-devel \
gtk-doc \
gtk3-devel \
libabigail \
libgusb-devel \
libX11-devel \
libXv-devel \
meson \
nss-devel \
pixman-devel \
python3-cairo \
python3-gobject \
systemd \
umockdev \
uncrustify \
valgrind \
&& \
dnf clean all

View File

@@ -320,6 +320,7 @@ elan_submit_image (FpImageDevice *dev)
g_slist_foreach (raw_frames, (GFunc) self->process_frame, &frames);
fpi_do_movement_estimation (&assembling_ctx, frames);
img = fpi_assemble_frames (&assembling_ctx, frames);
g_slist_free_full (frames, g_free);
fpi_image_device_image_captured (dev, img);
}

View File

@@ -21,13 +21,13 @@ typedef enum {
/**
* FpiMatchResult:
* @FPI_MATCH_ERROR: An error occured during matching
* @FPI_MATCH_SUCCESS: The prints matched
* @FPI_MATCH_FAIL: The prints did not match
* @FPI_MATCH_SUCCESS: The prints matched
*/
typedef enum {
FPI_MATCH_ERROR = 0,
FPI_MATCH_SUCCESS,
FPI_MATCH_ERROR = -1, /* -1 for g_task_propagate_int */
FPI_MATCH_FAIL,
FPI_MATCH_SUCCESS,
} FpiMatchResult;
void fpi_print_add_print (FpPrint *print,