Skip to content

Fix top-level ns-3 test wrapper to avoid mtp.h build failures#238

Draft
Copilot wants to merge 6 commits intomasterfrom
copilot/fix-issue-229-code
Draft

Fix top-level ns-3 test wrapper to avoid mtp.h build failures#238
Copilot wants to merge 6 commits intomasterfrom
copilot/fix-issue-229-code

Conversation

Copy link

Copilot AI commented Mar 12, 2026

The documented ./scripts/build.sh -t ns3 devices-point-to-point flow was not reliable from the repo root. In practice, the wrapper could fall into the SimAI extern ns-3 build path and trigger unrelated mtp test compilation, surfacing ns3/mtp.h errors that are not part of the devices-point-to-point suite.

  • What changed

    • Add and harden the top-level -t|--test path in scripts/build.sh
    • Reject ./scripts/build.sh -c ns3 <suite> and point users to the correct test entrypoint
    • Normalize point-to-point to the actual suite name devices-point-to-point
  • ns-3 source selection

    • Run ns-3 tests from the repository submodule source tree:
      • ns-3-alibabacloud/simulation
    • Stop using the copied SimAI extern tree for the test wrapper
    • Auto-initialize ns-3-alibabacloud if the submodule is missing locally
  • Avoid unrelated mtp failures

    • Configure only the modules needed for the point-to-point test path:
      • core,network,stats,point-to-point,test
    • Skip the broader module set that can pull in mtp and fail on ns3/mtp.h
    • Run test.py with --no-build after the targeted build step
  • Docs

    • Update the root README to document the correct top-level command and clarify that this suite runs through the ns-3 test framework, not the SimAI ns-3 compile flow

Example:

./scripts/build.sh -t ns3 devices-point-to-point

Invalid usage is now handled explicitly:

./scripts/build.sh -c ns3 devices-point-to-point
# ns3 compile mode does not accept a test suite.
# Use ./scripts/build.sh -t ns3 devices-point-to-point instead.

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copilot AI changed the title [WIP] [ISSUE-229] Fix bug related to code functionality Disambiguate point-to-point trace events and document the ns-3 test entrypoint Mar 12, 2026
…ntrypoint

Co-authored-by: tianhao909 <48342395+tianhao909@users.noreply.github.com>
@tianhao909
Copy link
Collaborator

@wtl0000的评论:
这个方案./scripts/build.sh -t ns3 devices-point-to-point,我是在simai文件夹下运行,但是这样无法运行,我运行的是./scripts/build.sh -c ns3 devices-point-to-point,但是报错找不到mtp.h,我在github和我自己的文件上都找不到这个文件,这个方案为Example:
./scripts/build.sh -t ns3 devices-point-to-point
我将build.sh进行了更新,运行了./scripts/build.sh -t ns3 devices-point-to-point,出错

image

Copilot AI and others added 2 commits March 12, 2026 14:01
Co-authored-by: tianhao909 <48342395+tianhao909@users.noreply.github.com>
Co-authored-by: tianhao909 <48342395+tianhao909@users.noreply.github.com>
Copilot AI changed the title Disambiguate point-to-point trace events and document the ns-3 test entrypoint Add top-level ns-3 test wrapper for devices-point-to-point Mar 12, 2026
@wtl0000
Copy link

wtl0000 commented Mar 13, 2026

我按照本方案的build.sh进行修改运行,但还是有
image
找不到mtp.h这个文件,这个文件在github上好像也没有

Copilot AI and others added 2 commits March 13, 2026 02:22
Co-authored-by: tianhao909 <48342395+tianhao909@users.noreply.github.com>
Co-authored-by: tianhao909 <48342395+tianhao909@users.noreply.github.com>
Copilot AI changed the title Add top-level ns-3 test wrapper for devices-point-to-point Fix top-level ns-3 test wrapper to avoid mtp.h build failures Mar 13, 2026
Copilot AI requested a review from tianhao909 March 13, 2026 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants