Merge ~bladernr/plainbox-provider-resource:1710172-executable-skips-symlinks into plainbox-provider-resource:master

Proposed by Jeff Lane 
Status: Merged
Approved by: Jeff Lane 
Approved revision: e4a6c7ea9740d20ce0a9f1310a6036e6b1e1ba24
Merged at revision: 633184307454e796020ee67e0990de1fd05362fd
Proposed branch: ~bladernr/plainbox-provider-resource:1710172-executable-skips-symlinks
Merge into: plainbox-provider-resource:master
Diff against target: 13 lines (+1/-1)
1 file modified
jobs/resource.pxu (+1/-1)
Reviewer Review Type Date Requested Status
Devices Certification Bot Needs Fixing
Jonathan Cave (community) Approve
Maciej Kisielewski Approve
Review via email: mp+328938@code.launchpad.net

Description of the change

Modifies executable to use -xtype so it also enumerates symlinked binaries like /usr/bin/sosreport

To post a comment you must log in.
Revision history for this message
Maciej Kisielewski (kissiel) wrote :

Great stuff!
+1

review: Approve
Revision history for this message
Jonathan Cave (jocave) wrote :

Looks good, I've not used -xtype before!

review: Approve
Revision history for this message
Devices Certification Bot (ce-certification-qa) wrote :

The merge was fine but running tests failed.

[trusty] starting container
[trusty] Unable to start ephemeral container!
[trusty] stdout: https://paste.ubuntu.com/25332794/
[trusty] stderr: https://paste.ubuntu.com/25332795/
[trusty] NOTE: unable to execute tests, marked as failed
[trusty] Destroying failed container to reclaim resources
[xenial] starting container
[xenial] (timing) 0.06user 0.02system 0:05.38elapsed 1%CPU (0avgtext+0avgdata 17148maxresident)k
[xenial] (timing) 0inputs+32outputs (0major+5612minor)pagefaults 0swaps
[xenial] provisioning container
[xenial] (timing) 21.58user 4.80system 3:59.97elapsed 10%CPU (0avgtext+0avgdata 79980maxresident)k
[xenial] (timing) 236296inputs+1180896outputs (204major+815128minor)pagefaults 0swaps
[xenial-testing] Starting tests...
Found a test script: ./requirements/container-tests-provider-resource-generic
[xenial-testing] container-tests-provider-resource-generic: PASS
[xenial-testing] (timing) 5.84user 0.52system 0:13.23elapsed 48%CPU (0avgtext+0avgdata 75440maxresident)k
[xenial-testing] (timing) 2784inputs+99416outputs (6major+83584minor)pagefaults 0swaps
[xenial-testing] Fixing file permissions in source directory
[xenial-testing] Destroying container
Name: xenial-testing
State: STOPPED

review: Needs Fixing

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/jobs/resource.pxu b/jobs/resource.pxu
2index 89240d7..8ee7701 100644
3--- a/jobs/resource.pxu
4+++ b/jobs/resource.pxu
5@@ -117,7 +117,7 @@ plugin: resource
6 _summary: Enumerate available system executables
7 _description: Generates a resource for all available executables
8 command:
9- find -H $(echo "$PATH" | sed -e 's/:/ /g') -maxdepth 1 -type f -executable -printf "name: %f\nlocation: %h\n\n"
10+ find -H $(echo "$PATH" | sed -e 's/:/ /g') -maxdepth 1 -xtype f -executable -printf "name: %f\nlocation: %h\n\n"
11
12 id: device
13 estimated_duration: 0.48

Subscribers

People subscribed via source and target branches