Setting up a raspberry pi and PreTestValidation is failing

0

When I run the test it fails saying it cannot make the directory /temp/idt. I am not sure where exactly it is trying to make this directory though. I am running the test from terminal on my Mac but I have the latest MacOS installed and you cannot create a folder in the root anymore. I can modify a file that will create something like a shortcut there that the system perceives to be a folder but it's just an alias. Is there a way to bypass this test or change the directory location so it won't bottleneck here? the command is using a "-p" switch so in theory if I know exactly where this is being created I can just create it manually and it should overlook after that. I just can't seem to see where it should go. The details, output, and logs are below. I appreciate any input here.

So simply put, I have all the prelims done, the environment: I'm running AWS CLI on my MacBook Air M2 (2022) running MacOS Ventura and the edge device is a Raspberry Pi 4 model B running 11.8. Testing suite: devicetester_greengrass_v2_4.5.11_testsuite_2.4.1_mac

when I run

./devicetester_mac_x86-64 run-suite --userdata userdata.json

the output is:

davidosullivan@Davids-MacBook-Air bin % ./devicetester_mac_x86-64 run-suite --userdata userdata.json [INFO] [2022-11-28 05:39:34]: Running pool=pool1 idt=4.5.11 suite=GGV2Q_2.4.1 [WARNING] [2022-11-28 05:39:34]: IDT is accessing to Device Under Test with an insecure SSH method, to make it more secure you can provide publicKeyPath to device.json or resource.json file. More details can be found on AWS IoT Device Tester documentation Configure IDT settings section. [INFO] [2022-11-28 05:39:35]: Automatic updates are supported for this release of IDT, checking for updates. [INFO] [2022-11-28 05:39:35]: executionId=a8751a98-6ed6-11ed-b7fb-f293db416e41 suiteId=GGV2Q [WARNING] [2022-11-28 05:39:35]: Failed to get version of Greengrass with error exit status 1 [WARNING] [2022-11-28 05:39:35]: Device Tester is not able to check for any latest IDT test suites [INFO] [2022-11-28 05:39:35]: Using test suite "GGV2Q_2.4.1" for execution [WARNING] [2022-11-28 05:39:35]: IDT is accessing to Device Under Test with an insecure SSH method, to make it more secure you can provide publicKeyPath to device.json or resource.json file. More details can be found on AWS IoT Device Tester documentation Configure IDT settings section. time="2022-11-28T05:39:35+01:00" level=info msg="GGV2 Suite Info" hostArch=amd64 hostName=Davids-Air.home hostOs=darwin groupId=pretestvalidation testCaseId=pretestvalidation deviceId=raspberrypi time="2022-11-28T05:39:35+01:00" level=info msg="Running test case" time="2022-11-28T05:39:35+01:00" level=info msg="Setting up device for testing" time="2022-11-28T05:39:36+01:00" level=info msg="Device architecture: armv7l" time="2022-11-28T05:39:36+01:00" level=info msg="Cleaning up test resources..." time="2022-11-28T05:39:36+01:00" level=info msg="Temporary resources on DUT are successfully removed" time="2022-11-28T05:39:36+01:00" level=info msg="Cleaning up dut resources..." time="2022-11-28T05:39:36+01:00" level=info msg="Cleaning up AWS resources... This may take a while..." [ERROR] [2022-11-28 05:39:36]: Test exited unsuccessfully executionId=a8751a98-6ed6-11ed-b7fb-f293db416e41 testCaseId=pretestvalidation error=exit status 1 [INFO] [2022-11-28 05:39:36]: All tests finished. executionId=a8751a98-6ed6-11ed-b7fb-f293db416e41 [INFO] [2022-11-28 05:39:36]:

========== Test Summary ========== Execution Time: 1s Tests Completed: 1 Tests Passed: 0 Tests Failed: 1 Tests Skipped: 0

Test Groups: pretestvalidation: FAILED

Failed Tests: Group Name: pretestvalidation Test Name: pretestvalidation Reason: Command '{mkdir -p /temp/idt map[] 0s}' exited with code 1. Error output: mkdir: cannot create directory ‘/temp/idt’: Permission denied .

Path to AWS IoT Device Tester Report: /Users/davidosullivan/projects/idt/devicetester_greengrass_v2_mac/results/a8751a98-6ed6-11ed-b7fb-f293db416e41/awsiotdevicetester_report.xml Path to Test Execution Logs: /Users/davidosullivan/projects/idt/devicetester_greengrass_v2_mac/results/a8751a98-6ed6-11ed-b7fb-f293db416e41/logs Path to Aggregated JUnit Report: /Users/davidosullivan/projects/idt/devicetester_greengrass_v2_mac/results/a8751a98-6ed6-11ed-b7fb-f293db416e41/GGV2Q_Report.xml

Note:

davidosullivan@Davids-MacBook-Air bin %

The Logs

<testsuites name="GGV2Q results" time="1" tests="1" failures="0" skipped="0" errors="1" disabled="0"> <testsuite name="pretestvalidation" package="" tests="1" failures="0" time="1" disabled="0" errors="1" skipped="0"> <testcase classname="GGV2Q pretestvalidation" name="pretestvalidation"> <error>Command &#39;{mkdir -p /temp/idt map[] 0s}&#39; exited with code 1. Error output: mkdir: cannot create directory ‘/temp/idt’: Permission denied&#xA;.</error> </testcase> </testsuite> </testsuites> <apnreport> <awsiotdevicetesterversion>4.5.11</awsiotdevicetesterversion> <testsuiteversion>2.4.1</testsuiteversion> <signature>283938a8376e684465e29efa2a88e61c1543dfd58dff21451248d707d73403a4bd81f766e97977ca46a986384b863a4698bdbc39c58d9f6d8edc3d26d49348a7</signature> <keyname>65d77318-3995-4993-9dd5-01b329742307</keyname> <session> <testsession>958c70de-6ed6-11ed-b139-f293db416e41</testsession> <starttime>2022-11-28T05:39:04.549453+01:00</starttime> <endtime>2022-11-28T05:39:05.584253+01:00</endtime> </session> <awsproduct> <name>AWS Greengrass</name> <version></version> <features> <feature name="aws-iot-greengrass-v2-core" value="not-supported" type="required"></feature> <feature name="aws-iot-greengrass-v2-ml-component" value="not-supported" type="optional"></feature> <feature name="aws-iot-greengrass-v2-docker-application-manager" value="not-supported" type="optional"></feature> <feature name="aws-iot-greengrass-v2-stream-management-component" value="not-supported" type="optional"></feature> <feature name="aws-iot-greengrass-v2-hsi" value="not-supported" type="optional"></feature> </features> </awsproduct> <device> <sku>hbshub</sku> <name>pool1</name> <features> <feature name="arch" value="armv7l"></feature> <feature name="ml" value="no"></feature> <feature name="docker" value="no"></feature> <feature name="streamManagement" value="no"></feature> <feature name="hsi" value="hsm | no"></feature> <feature name="platform.operatingSystem" value="Linux"></feature> </features> <executionMethod>ssh</executionMethod> </device> <devenvironment> <os name="darwin"></os> </devenvironment> <qualificationsuite> <checksumkeyname>GGV2Q_mac_2.4.1</checksumkeyname> <checksum>ca8c0331d16637835af8dc2f403ffcf217a70022e6c89e119f9be53d6ec2bb7f4ca30f21984d49a3a10634b0077a2a36</checksum> </qualificationsuite> <report> <testsuites name="GGV2Q results" time="1" tests="1" failures="0" skipped="0" errors="1" disabled="0"> <testsuite name="pretestvalidation" package="" tests="1" failures="0" time="1" disabled="0" errors="1" skipped="0"> <testcase classname="GGV2Q pretestvalidation" name="pretestvalidation"> <error>Command &#39;{mkdir -p /temp/idt map[] 0s}&#39; exited with code 1. Error output: mkdir: cannot create directory ‘/temp/idt’: Permission denied&#xA;.</error> </testcase> </testsuite> </testsuites> </report> </apnreport>
1 Answer
0

Hello David,

This particular folder you are facing issue with is, what IDT creates/deletes on the device under test.

As documented in the public documentation here, for TempResourcesDirOnDevice, the folder needs to be in the user space, without the need for super user permissions.

Please change this folder configuration in userdata.json, accordingly, and let us know the behavior.

AWS
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions