Skip to content

Fixes Stub Compilation Errors and Update Documentation for Running Binaries #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,28 @@ $ make
On successful compilation, the “libtrfgen.so” library gets generated under
Trfgen/lib folder.

## Compiling the Test Controller Stub Binary

Once the necessary lib files i.e. `libtrfgen.so` and `libtfw.so` are built.
Copy the files to `/usr/lib` and run `sudo ldconfig` if necessary. This is
necessary to execute the `testCntrlr` binary which can be built as follows:

```
$ cd TestCntlrStub/build
$ make clean
$ make
```

On successful build, the binary `testCntrlr` would be available at `TestCntlrStub/bin/`

If you choose to not copy the generated `lib` files to `/usr/lib`, export the paths
into the `LD_LIBRARY_PATH` as follows by replacing the `/path/to/` with the full path
as necessary.

```
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/S1APTester/TestCntlrApp/lib/:/path/to/S1APTester/Trfgen/lib
```

# Testing with Magma
Following points should be considered when using S1APTester with
[Magma](https://github.com/facebookincubator/magma)
Expand Down
1 change: 1 addition & 0 deletions TestCntlrApp/src/tfwApp/fw_api_int.x
Original file line number Diff line number Diff line change
Expand Up @@ -1467,6 +1467,7 @@ typedef struct _PartialReset
{
U32 numOfConn;
UeS1apIdPair *ueS1apIdPairList;
U32 *ueIdLst;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sudheesh001 Is this parameter used? because fw_api_init.c; I could see this parameter is not being used.

1593 else if(msgReq->t.resetReq.rstType == NB_PARTIAL_RESET)
1594 {
1595 msgReq->t.resetReq.u.partialRst.numOfConn = data->r.partialRst.numOfConn;
1596 FW_ALLOC_MEM(
1597 fwCb, &msgReq->t.resetReq.u.partialRst.ueS1apIdPairList,
1598 sizeof(NbUeS1apIdPair) * msgReq->t.resetReq.u.partialRst.numOfConn);
1599
1600 cmMemcpy(
1601 msgReq->t.resetReq.u.partialRst.ueS1apIdPairList,
1602 data->r.partialRst.ueS1apIdPairList,
1603 sizeof(NbUeS1apIdPair) * msgReq->t.resetReq.u.partialRst.numOfConn);
1604 }
1605 else
1606 {
1607 FW_LOG_ERROR(fwCb, "Invalid reset Type");
1608 FW_LOG_EXITFN(fwCb, RFAILED);
TestCntlrApp/src/tfwApp/fw_api_int.c

Once Reset message is received at test framwork application, later posts the message to eNB application; Even while it get posted. we don't see this parameter. Below is the structure that gets populated while posted to eNB application
231 typedef struct _mnPartialReset
232 {
233 U32 numOfConn;
234 NbUeS1apIdPair *ueS1apIdPairList;
235 }NbPartialReset;
236

Copy link
Author

@sudheesh001 sudheesh001 May 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @rsarwad Thank you for the review. We do see this in the TestCntlrStub which fails to build at these lines where ueIdLst is used.

((ResetReq*)msgptr)->r.partialRst.numOfConn = numOfUes;
((ResetReq*)msgptr)->r.partialRst.ueIdLst = malloc(numOfUes);
memcpy(((ResetReq*)msgptr)->r.partialRst.ueIdLst, ueLst, numOfUes);

Given what you mentioned, it looks like the Stub might be out of date and should rather use UeS1apIdPair by doing something like:

((ResetReq*)msgptr)->r.partialRst. ueS1apIdPairList = malloc(sizeof(UeS1apIdPair) * numOfUes);
memcpy(((ResetReq*)msgptr)->r.partialRst. ueS1apIdPairList, modifiedUeLst, numOfUes);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes right

}PartialReset;

typedef struct _cause
Expand Down