afm-test /usr/AGL/apps/testwgt/*test.wgt failed

Description

Hi, all

I follow the instructions on https://docs.automotivelinux.org/docs/en/guppy/apis_services/reference/afb-test/3_Launch_the_tests.html  to launch test on target board, but I can not successfully test any *test.wgt.

 

test process(on target board,use agl-service-telephony-test.wgt as example ):

raspberrypi3:/usr/AGL/apps/testwgt# afm-test ./agl-service-telephony-test.wgt find: /home/0/app-data/agl-service-telephony-test: No such file or directory ERROR: cannot-start FAIL: Failed to start application agl-service-telephony-test@1.0-d226a35 ERROR: bad-request null

log of journalctl -f:

Jul 30 22:11:32 raspberrypi3 afbd-agl-service-telephony-test@1.0-d226a35[761]: /bin/mkdir: cannot create directory '/home/0/app-data/agl-service-telephony-test': Permission denied Jul 30 22:11:32 raspberrypi3 systemd[1]: afm-appli-agl-service-telephony-test--1.0-d226a35--main@0.service: Control process exited, code=exited status=1 Jul 30 22:11:32 raspberrypi3 systemd[1]: afm-appli-agl-service-telephony-test--1.0-d226a35--main@0.service: Failed with result 'exit-code'. Jul 30 22:11:32 raspberrypi3 systemd[1]: Failed to start Test widget used to launch tests for the project agl-service-telephony. Jul 30 22:11:32 raspberrypi3 afm-system-daemon[258]: ERROR: start error system unit afm-appli-agl-service-telephony-test--1.0-d226a35--main@.service for uid 0: failed [/w/workspace/release-jjb-halibut-snapshot/MACHINE/raspberrypi3/label/agl-test-slave/repoclone/output/tmp/work/armv7vet2hf-neon-vfpv4-agl-linux-gnueabi/af-main/halibut+gitAUTOINC+533d5a1a51-r0/git/src/afm-urun.c:266] Jul 30 22:11:32 raspberrypi3 kernel: audit: type=1400 audit(1564524692.189:17): lsm=SMACK fn=smack_inode_permission action=denied subject="User::App::agl-service-telephony-test" object="_" requested=wx pid=761 comm="mkdir" name="app-data" dev="mmcblk0p2" ino=120375

I noticed this line  "/bin/mkdir: cannot create directory '/home/0/app-data/agl-service-telephony-test': Permission denied".

Is there something wrong with appfw's permission policy?  Or with my process method and enviroment configuration?

 

If it is a common applicaion,  I can add the “require-permission: scope-platform or display" in config file to avoid the error.  So I unpack the test wgt,  modify the config.xml and wgtpkg-pack a new wgt. But afm-test new test wgt  still failed.

 

log of the modified wgt(use agl-service-radio-test as example):

Jul 30 23:07:45 raspberrypi3 afm-system-daemon[258]: NOTICE: -- INSTALLING widget /usr/AGL/apps/testwgt/agl-service-radio-test-test.wgt to /var/local/lib/afm/applications -- [/w/workspace/release-jjb-halibut-snapshot/MACHINE/raspberrypi3/label/agl-test-slave/repoclone/output/tmp/work/armv7vet2hf-neon-vfpv4-agl-linux-gnueabi/af-main/halibut+gitAUTOINC+533d5a1a51-r0/git/src/wgtpkg-install.c:547] Jul 30 23:07:46 raspberrypi3 systemd[1]: Reloading. Jul 30 23:07:46 raspberrypi3 systemd[1]: Configuration file /lib/systemd/system/systemd-udevd.service.d/udev-shared.conf is marked executable. Please remove executable permission bits. Proceeding anyway. Jul 30 23:07:49 raspberrypi3 systemd[1]: Stopped target Sockets. Jul 30 23:07:49 raspberrypi3 systemd[1]: Stopping Sockets. Jul 30 23:07:49 raspberrypi3 systemd[1]: Reached target Sockets. Jul 30 23:07:49 raspberrypi3 afm-system-daemon[258]: ERROR: can't start system unit afm-appli-agl-service-radio-test--8.0--main.service for uid 0 [/w/workspace/release-jjb-halibut-snapshot/MACHINE/raspberrypi3/label/agl-test-slave/repoclone/output/tmp/work/armv7vet2hf-neon-vfpv4-agl-linux-gnueabi/af-main/halibut+gitAUTOINC+533d5a1a51-r0/git/src/afm-urun.c:252] Jul 30 23:07:49 raspberrypi3 afm-system-daemon[258]: NOTICE: -- UNINSTALLING widget of id agl-service-radio-test@8.0 from /var/local/lib/afm/applications -- [/w/workspace/release-jjb-halibut-snapshot/MACHINE/raspberrypi3/label/agl-test-slave/repoclone/output/tmp/work/armv7vet2hf-neon-vfpv4-agl-linux-gnueabi/af-main/halibut+gitAUTOINC+533d5a1a51-r0/git/src/wgtpkg-uninstall.c:47]

Anyone can figure out? Thanks.

 

Best Regards

Environment

None

Activity

Jan-Simon Moeller 
March 30, 2021 at 12:19 PM
(edited)

My steps:

  1. gIt clone https://git.automotivelinux.org/apps/agl-service-weather

  2. source /opt/sdk/environment-setup-aarch64-agl-linux

  3. cd agl-service-weather; ./autobuild/agl/autobuild

  4. scp agl-service-weather-test.wgt to target; (scp agl-service-weather-test.wgt root@192.168.11.126:/var/backup)

  5. ssh to target;

  6. (login -f agl-driver)

  7. afm-test agl-service-weather-test.wgt

Recommendation: use pyagl

fnstzl 
March 30, 2021 at 7:41 AM

Board: Pi4

AGL: koi 11.0.0

Hellow, I  test all the test.wgt inside /usr/AGL/apps/test,  and all of them can work as expected.

takeagl-service-weather-test.wgt as example, log:

 

raspberrypi4-64:/usr/AGL/apps/test$ afm-test agl-service-weather-test.wgt /usr/bin/afm-test: line 95: /run/platform/debug//agl-service-weather-test.env: Permission denied PASS: agl-service-weather-test started with pid=4454 PASS: 1 double subscribe.testFunction PASS: 2 testSubscribeWrongArg.testFunction PASS: 3 testUnsubscribeWrongArg.testFunction PASS: 4 testSubscribeWrongInvalidValue.testFunction PASS: 5 testUnsubscribeWrongInvalidValue.testFunction FAIL: 6 testCurrentweatherSuccess.testFunction FAIL: 7 testAPIKeySuccess.testFunction PASS: 8 testSubscribeSuccess.testFunction PASS: 9 testUnsubscribeSuccess.testFunction # Ran 9 tests in 0.011 seconds, 7 successes, 2 failures PASS: agl-service-weather-test killed and removed

 

 

Then, I download the script from gerrit and build the test widget,  run the afm-test agl-service-weather-test.wgt I built on boad, but test failed!

Error log:

raspberrypi4-64:/var/backups$ afm-test agl-service-weather-test.wgt ERROR:  failed installation failed: Invalid argument find: '/home/1001/app-data/agl-service-cloudproxy-test': Permission denied find: '/home/1001/app-data/agl-service-audiomixer-test': Permission denied find: '/home/1001/app-data/agl-service-mediascanner-test': Permission denied find: '/home/1001/app-data/signal-composer-test': Permission denied find: '/home/1001/app-data/agl-service-can-low-level-test': Permission denied find: '/home/1001/app-data/agl-service-iiodevices-test': Permission denied find: '/home/1001/app-data/agl-service-network-test': Permission denied find: '/home/1001/app-data/agl-service-mediaplayer-test': Permission denied find: '/home/1001/app-data/persistence-binding-test': Permission denied find: '/home/1001/app-data/agl-service-geoclue-test': Permission denied find: '/home/1001/app-data/agl-service-bluetooth-map-test': Permission denied find: '/home/1001/app-data/agl-service-nfc-test': Permission denied find: '/home/1001/app-data/agl-service-platform-info-test': Permission denied find: '/home/1001/app-data/agl-service-bluetooth-test': Permission denied find: '/home/1001/app-data/agl-service-weather-test': Permission denied find: '/home/1001/app-data/agl-service-bluetooth-pbap-test': Permission denied find: '/home/1001/app-data/agl-service-gps-test': Permission denied /usr/bin/afm-test: line 95: /run/platform/debug//.env: Permission denied ERROR:  not-found find: '/home/1001/app-data/agl-service-cloudproxy-test': Permission denied find: '/home/1001/app-data/agl-service-audiomixer-test': Permission denied find: '/home/1001/app-data/agl-service-mediascanner-test': Permission denied find: '/home/1001/app-data/signal-composer-test': Permission denied find: '/home/1001/app-data/agl-service-can-low-level-test': Permission denied find: '/home/1001/app-data/agl-service-iiodevices-test': Permission denied find: '/home/1001/app-data/agl-service-network-test': Permission denied find: '/home/1001/app-data/agl-service-mediaplayer-test': Permission denied find: '/home/1001/app-data/persistence-binding-test': Permission denied find: '/home/1001/app-data/agl-service-geoclue-test': Permission denied find: '/home/1001/app-data/agl-service-bluetooth-map-test': Permission denied find: '/home/1001/app-data/agl-service-nfc-test': Permission denied find: '/home/1001/app-data/agl-service-platform-info-test': Permission denied find: '/home/1001/app-data/agl-service-bluetooth-test': Permission denied find: '/home/1001/app-data/agl-service-weather-test': Permission denied find: '/home/1001/app-data/agl-service-bluetooth-pbap-test': Permission denied find: '/home/1001/app-data/agl-service-gps-test': Permission denied ERROR:  failed uninstallation failed: Invalid argument PASS:  killed and removed

 

 I doubt there is something wrong with my  command?

My steps:

  1. gIt clone https://git.automotivelinux.org/apps/agl-service-weather

  2. source /opt/sdk/environment-setup-aarch64-agl-linux

  3. cd  agl-service-weather; mkdir build; cd build; cmake ..; make;  make test_widget;

  4. scp agl-service-weather-test.wgt to target; (scp agl-service-weather-test.wgt root@192.168.11.126:/var/backup)

  5. ssh to target; 

  6. login -f agl-driver

  7. afm-test agl-service-weather-test.wgt

 

Li Xiaoming 
June 28, 2020 at 9:28 AM

My test env:

Board: Pi3 & Pi4
AGL: Icefish 9.0.2

Li Xiaoming 
June 28, 2020 at 9:27 AM
(edited)

Today,  I  test all the test.wgt inside /usr/AGL/apps/testwgt,  but only part of them can work as expected.

The failed ones  still reports the error, that sth like "/bin/mkdir: cannot create directory '/home/1001': Permission denied ".

:   do you know this issue ?

 

test.wgt which can work: 

aftest-test.wgt agl-service-network-test.wgt agl-service-bluetooth-pbap-test.wgt agl-service-bluetooth-test.wgt agl-service-can-low-level-debug-test.wgt agl-service-mediaplayer-test.wgt agl-service-nfc-test.wgt agl-service-weather-test.wgt persistence-binding-test.wgt signal-composer-test.wgt

can not work:  the rest ones

 

take agl-service-audiomixer-test.wgt as example, error log:

raspberrypi4:/usr/AGL/apps/testwgt$ whoami agl-driver raspberrypi4:/usr/AGL/apps/testwgt$ afm-test ./agl-service-audiomixer-test.wgt /usr/bin/afm-test: line 86: /run/platform/debug//agl-service-audiomixer-test@0.1-aa33a3e.env: Permission denied ERROR: cannot-start FAIL: Failed to start application agl-service-audiomixer-test@0.1-aa33a3e ERROR: bad-request null

 

raspberrypi4:~# journalctl -xf r/AGLBRANCH/icefish/MACHINE/raspberrypi4/label/agl-test-slave/sstate-build/build-raspberrypi4/tmp/work/aarch64-agl-linux/af-binder/icefish+gitAUTOINC+68de5060b2-r0/git/src/afb-api-so-v3.c:84,afb_api_so_v3_add] Apr 06 18:32:11 raspberrypi4 afbd-agl-service-audiomixer-test@0.1-aa33a3e[905]: ERROR: [API /run/user/1001/apis/link/aft] CtlPreInit: No aft-agl* config found in /var/local/lib/afm/applications/agl-service-audiomixer-test/0.1-aa33a3e:/var/local/lib/afm/applications/afbtest/8.99/lib/..:./etc:/usr/afTest/etc:/opt/AGL/afTest/etc:/w/workspace/sandbox-build-machines-sstate-mirror/AGLBRANCH/icefish/MACHINE/raspberrypi4/label/agl-test-slave/sstate-build/build-raspberrypi4/tmp/work/aa [/w/workspace/sandbox-build-machines-sstate-mirror/AGLBRANCH/icefish/MACHINE/raspberrypi4/label/agl-test-slave/sstate-build/build-raspberrypi4/tmp/work/aarch64-agl-linux/afb-test/9.0.2-r0/git/src/aft.c:310,afbBindingV3entry] Apr 06 18:32:11 raspberrypi4 afbd-agl-service-audiomixer-test@0.1-aa33a3e[905]: ERROR: binding [/run/user/1001/apis/link/aft] initialisation failed [/w/workspace/sandbox-build-machines-sstate-mirror/AGLBRANCH/icefish/MACHINE/raspberrypi4/label/agl-test-slave/sstate-build/build-raspberrypi4/tmp/work/aarch64-agl-linux/af-binder/icefish+gitAUTOINC+68de5060b2-r0/git/src/afb-api-so-v3.c:134,afb_api_so_v3_add] Apr 06 18:32:11 raspberrypi4 afbd-agl-service-audiomixer-test@0.1-aa33a3e[905]: ERROR: can't start the binding /run/user/1001/apis/link/aft [/w/workspace/sandbox-build-machines-sstate-mirror/AGLBRANCH/icefish/MACHINE/raspberrypi4/label/agl-test-slave/sstate-build/build-raspberrypi4/tmp/work/aarch64-agl-linux/af-binder/icefish+gitAUTOINC+68de5060b2-r0/git/src/main-afb-daemon.c:178,apiset_start_list] Apr 06 18:32:11 raspberrypi4 afm-system-daemon[295]: ERROR: start error system unit afm-appli-agl-service-audiomixer-test--0.1-aa33a3e--main@.service for uid 1001: failed [/w/workspace/sandbox-build-machines-sstate-mirror/AGLBRANCH/icefish/MACHINE/raspberrypi4/label/agl-test-slave/sstate-build/build-raspberrypi4/tmp/work/aarch64-agl-linux/af-main/icefish+gitAUTOINC+7084f123b4-r0/git/src/afm-urun.c:281] Apr 06 18:32:11 raspberrypi4 systemd[1]: afm-appli-agl-service-audiomixer-test--0.1-aa33a3e--main@1001.service: Main process exited, code=exited, status=1/FAILURE Apr 06 18:32:11 raspberrypi4 systemd[1]: afm-appli-agl-service-audiomixer-test--0.1-aa33a3e--main@1001.service: Failed with result 'exit-code'. Apr 06 18:32:11 raspberrypi4 systemd[1]: Failed to start Test widget used to launch tests for the project agl-service-audiomixer. -- Subject: Unit afm-appli-agl-service-audiomixer-test--0.1-aa33a3e--main@1001.service has failed

 

 

 

Clément Bénier 
February 26, 2020 at 8:50 AM

: Hi, you are right, it will be fixed in the next version of halibut not in 8.0.5.

Regards,

Fixed

Details

Assignee

Reporter

Labels

Contract ID

Priority

Created September 4, 2019 at 2:42 AM
Updated April 8, 2021 at 4:30 PM
Resolved April 8, 2021 at 4:30 PM

Flag notifications