device: fix matching parent device by connection UUID

We must compare the UUID with the one on the *parent* device.

Also, simplify the checks to only return TRUE at the end of function.

Fixes: 27c281ac ('device: deduplicate match_parent()')
14 jobs for bg/fix-device-parent-match-rh1716438 in 32 minutes and 52 seconds (queued for 2 seconds)
latest
Status Job ID Name Coverage
  Test
passed #333005
allowed to fail
checkpatch

00:01:41

manual #333010
allowed to fail manual
t_centos:7.5.1804
passed #333011
t_centos:7.6.1810

00:23:09

passed #333014
t_debian:9

00:21:57

passed #333016
t_debian:sid

00:21:53

manual #333015
allowed to fail manual
t_debian:testing
passed #333006
t_fedora:28

00:23:44

passed #333007
t_fedora:29

00:32:52

failed #333008
t_fedora:30

00:01:04

manual #333009
allowed to fail manual
t_fedora:rawhide
passed #333012
t_ubuntu:16.04

00:19:26

passed #333013
t_ubuntu:18.04

00:19:26

 
  External
failed NetworkManager test verification

failed NetworkManager test verification

05:41:31

 
Name Stage Failure
failed
t_fedora:30 Test
20190603-150107
$ date '+%Y%m%d-%H%M%S'; ! grep -q '^NAME=.*\(CentOS\)' /etc/os-release || (yum install -y glibc-common && localedef -c -i pl_PL -f UTF-8 pl_PL.UTF-8 && locale -a)
20190603-150107
$ date '+%Y%m%d-%H%M%S'; NM_INSTALL="yum install -y" ./contrib/fedora/REQUIRED_PACKAGES
20190603-150107
Fedora Modular 30 - x86_64 24 kB/s | 3.4 kB 00:00
Failed to synchronize cache for repo 'fedora-modular'
Error: Failed to synchronize cache for repo 'fedora-modular'
ERROR: Job failed: exit code 1