ci: cram: 042-lcm-usp-direct-connection.t: drop stale stdin-leak blank lines
The test expected a trailing blank line after each one-shot usp-cli command. That blank line was never real CLI output: pre-PCF-2445, amx-cli (which usp-cli, like ba-cli, is a front-end of) kept reading the stdin inherited from the cram-over-ssh R wrapper and echoed its trailing newline to stdout. Cram tests written in that era encoded the stray blank line as expected output.e893e4d4f2("profiles: prpl_core.yml: feed_amx: amx-cli: bump stdin fix") bumped feed_amx to the PCF-2445 fix, so positional one-shot commands no longer consume or echo the inherited stdin. The trailing blank line is now deterministically gone for every usp-cli call, so the failure is not intermittent ("in some cases ... but not always") but reproducible. This test was added in5c664a92d9("ci: cram: add new tests for inter container communication"), authored before the amx-cli fix and merged without being rebased onto it, so it kept the old blank-line expectations and now fails. Drop the stale blank-line expectations so the test matches the corrected one-shot output, the same way the other cram tests were realigned ine893e4d4f2(e.g. 015-nat-reverse-portmapping.t), instead of masking them with a per-command sed filter. Fixes:5c664a92d9("ci: cram: add new tests for inter container communication") Closes: PPW-2028 References: FEAT-18, PCF-2445 Signed-off-by: Jef Steelant <jef.steelant_ext@softathome.com>
This commit is contained in:
parent
e6a881ddbf
commit
464d3c9530
@ -41,7 +41,7 @@ If test is running on a Valyrian, skip the test due to PCF-2669:
|
||||
Device.LocalAgent.Subscription.*.Alias="cpe-*" (glob)
|
||||
Device.LocalAgent.Subscription.*.ID="cpe-*" (glob)
|
||||
Device.LocalAgent.Subscription.*.Recipient="Device.LocalAgent.Controller.*" (glob)
|
||||
|
||||
|
||||
$ R "usp-cli \"Device.FdClient.OpenSocket()\""
|
||||
? Device.FdClient.OpenSocket() (glob)
|
||||
Device.FdClient.OpenSocket() returned
|
||||
@ -49,7 +49,7 @@ If test is running on a Valyrian, skip the test due to PCF-2669:
|
||||
executed_command = "Device.FdClient.OpenSocket()",
|
||||
req_obj_path = "Device.LocalAgent.Request.?" (glob)
|
||||
}
|
||||
|
||||
|
||||
## Send data over socket from client to server
|
||||
$ R "usp-cli \"Device.FdClient.SendOverSocket(Data = \"ClientToServer\")\""
|
||||
? Device.FdClient.SendOverSocket(Data = ClientToServer) (glob)
|
||||
@ -58,11 +58,12 @@ If test is running on a Valyrian, skip the test due to PCF-2669:
|
||||
{
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
## check logs
|
||||
$ R "tail -n 2 /var/log/lcm/${DUID_FDSERVER}/messages"
|
||||
* fdserver: fdserve - [x]Received 14 data: ClientToServer (glob)
|
||||
* (glob)
|
||||
|
||||
## Send data over socket from client to server
|
||||
$ R "usp-cli \"Device.FdServer.SendOverSocket(Data = \"ServerToClient\")\""
|
||||
? Device.FdServer.SendOverSocket(Data = ServerToClient) (glob)
|
||||
@ -71,37 +72,33 @@ If test is running on a Valyrian, skip the test due to PCF-2669:
|
||||
{
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
## check logs
|
||||
$ R "tail -n 2 /var/log/lcm/${DUID_FDCLIENT}/messages"
|
||||
* fdclient: fdclien - [x]Received 14 data: ServerToClient (glob)
|
||||
* (glob)
|
||||
|
||||
## remove usp subscriptions
|
||||
$ R "usp-cli \"Device.LocalAgent.Subscription.[ReferenceList == \"Device.FdClient.OpenSocket\(\)\"].-\""
|
||||
? Device.LocalAgent.Subscription.[ReferenceList == Device.FdClient.OpenSocket()].- (glob)
|
||||
Device.LocalAgent.Subscription.*. (glob)
|
||||
|
||||
|
||||
## Test direct USP connection
|
||||
$ R "${S} && execute_in_container --uuid ${UUID_FDCLIENT} --cmd 'direct-connection-controller !amx variable connection'"
|
||||
$ R "${S} && execute_in_container --uuid ${UUID_FDCLIENT} --cmd 'direct-connection-controller !amx variable connection' | sed '/^$/d'"
|
||||
? !amx variable connection (glob)
|
||||
connection = "usp:/var/run/usp/uspdc.sock"
|
||||
|
||||
|
||||
|
||||
$ R "${S} && execute_in_container --uuid ${UUID_FDCLIENT} --cmd 'direct-connection-controller Device.FdServer.?'"
|
||||
$ R "${S} && execute_in_container --uuid ${UUID_FDCLIENT} --cmd 'direct-connection-controller Device.FdServer.?' | sed '/^$/d'"
|
||||
? Device.FdServer.? (glob)
|
||||
Device.FdServer.
|
||||
Device.FdServer.Text="FdServer"
|
||||
|
||||
|
||||
$ R "${S} && execute_in_container --uuid ${UUID_FDCLIENT} --cmd 'direct-connection-controller Device.FdServer.GetText\(\)'"
|
||||
$ R "${S} && execute_in_container --uuid ${UUID_FDCLIENT} --cmd 'direct-connection-controller Device.FdServer.GetText\(\)' | sed '/^$/d'"
|
||||
? Device.FdServer.GetText() (glob)
|
||||
Device.FdServer.GetText() returned
|
||||
[
|
||||
"FdServer"
|
||||
]
|
||||
|
||||
|
||||
## test FdClient.WriteToFile
|
||||
## add subscription
|
||||
@ -114,7 +111,6 @@ If test is running on a Valyrian, skip the test due to PCF-2669:
|
||||
executed_command = "Device.FdClient.WriteToFile()",
|
||||
req_obj_path = "Device.LocalAgent.Request.*" (glob)
|
||||
}
|
||||
|
||||
|
||||
## check content of file in server
|
||||
$ R "${S} && execute_in_container --uuid ${UUID_FDSERVER} --cmd 'cat ${TEST_FILENAME}'"
|
||||
@ -123,7 +119,6 @@ If test is running on a Valyrian, skip the test due to PCF-2669:
|
||||
## remove subscription
|
||||
$ R "usp-cli \"Device.LocalAgent.Subscription.[ReferenceList == \"Device.FdClient.WriteToFile\(\)\"].-\"" > /dev/null
|
||||
|
||||
|
||||
## test FdClient.ReadFromFile
|
||||
## add subscription
|
||||
$ R "usp-cli \"Device.LocalAgent.Subscription.+{ReferenceList='Device.FdClient.ReadFromFile()', NotifType='OperationComplete', Enable='true'}\"" > /dev/null
|
||||
@ -135,7 +130,7 @@ If test is running on a Valyrian, skip the test due to PCF-2669:
|
||||
executed_command = "Device.FdClient.ReadFromFile()",
|
||||
req_obj_path = "Device.LocalAgent.Request.*" (glob)
|
||||
}
|
||||
|
||||
|
||||
## remove subscription
|
||||
$ R "usp-cli \"Device.LocalAgent.Subscription.[ReferenceList == \"Device.FdClient.ReadFromFile\(\)\"].-\"" > /dev/null
|
||||
|
||||
@ -150,7 +145,7 @@ If test is running on a Valyrian, skip the test due to PCF-2669:
|
||||
executed_command = "Device.FdClient.TestUspConnection()",
|
||||
req_obj_path = "Device.LocalAgent.Request.*" (glob)
|
||||
}
|
||||
|
||||
|
||||
## remove subscription
|
||||
$ R "usp-cli \"Device.LocalAgent.Subscription.[ReferenceList == \"Device.FdClient.TestUspConnection\(\)\"].-\"" > /dev/null
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user