How to pass Native list as Job Argument?

I have the following code:

 void Start()
{
     NativeArray<int> test = new NativeArray<int>(200, Allocator.Persistent);

     int jobCount = 2;
     NativeArray<JobHandle> jobArray = new NativeArray<JobHandle>(jobCount, Allocator.Temp);
     for (int i = 0; i < jobCount; i++)
     {
         FindPathJob findPathJob = new FindPathJob {testArray= test};
         jobArray[i] = findPathJob.Schedule();

     }
  
     JobHandle.CompleteAll(jobArray);
     jobArray.Dispose();
     test.Dispose();
}

[BurstCompile]
private struct FindPathJob : IJob
{

     public NativeArray<int> testArray;
     public void Execute(){
     //do stuff, never access/read/write testArray
       }
}

For jobCount > 1 this throws an error saying

InvalidOperationException: The previously scheduled job Pathfinding:FindPathJob writes to the Unity.Collections.NativeArray1[System.Int32] FindPathJob.testArray. You are trying to schedule a new job Pathfinding:FindPathJob, which writes to the same Unity.Collections.NativeArray1[System.Int32] (via FindPathJob.testArray). To guarantee safety, you must include Pathfinding:FindPathJob as a dependency of the newly scheduled job.

And now im wondering where my error is. Essentially what i would like to do is to pass a list of pathfinding information (e.g. which tiles are blocked and so on) to this Pathfinding job. And since BurstCompiling doesnt allow reference values i have to create it beforehand, because else i cant really access my game grid.
However just passing a test native array and never even doing anyhting with it throws the above error. Is it possible without dependencies (as these would make the point of multithreading this pointless), that is to say is there a way to pass a job a threadsafe readonly argument?

This worked, however to save my output i still have to write to an array aswell wont I?

Yes you will me to write information out. You can also declare the info coming in both read and write by leaving off the attribute but you won’t be able to add to the list if you are doing parallel stuff. Lists are annoying in Jobs because you can’t change the length of the list easily so the benefit of them is not as good as regular lists in C#.

You have to maintain separate lists for each FindPathJob. We used DynamicBuffers since our A* request are represented as separate entities. You can check here. Since you’re not using ECS, you can maintain NativeLists in a managed list then use that for scheduling. Check here to see how we did parallel A* search.