Skip to content

Dup 2 Permissions Error on Lab Machines #47

@JustinMeimar

Description

@JustinMeimar

Bug Description:

  • Student found an error for which dup2 would complain when redirecting the input and output contents to the current commands stdin and stdout.

Root Cause:

  • Problem was due to use of fs::temporary_directory which started to cause name collisions in the tmp directory between students on the lab machines who use the same command step name.

  • For example, changing generator-interpreter to generator-interpreter-changed-to-no-conflict in the config below resolved problems.

{
  "testDir": "./testfiles",
  "testedExecutablePaths": {
    "kuknur": "../bin/generator"
  },
  "toolchains": {
    "interpreter": [
      {
        "stepName": "generator-interpreter-changed-to-not-conflict",
        "executablePath": "$EXE",
        "arguments": [
          "$INPUT",
          "$OUTPUT"
        ],
        "output": "generator.out"
      }
    ]
  }
}

I am going to be refactoring how temporary files are created, named and managed in the process of fixing this bug to reduce the overall complexity.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions