Skip to content

Commit

Permalink
batch: Fix GetValueBatch
Browse files Browse the repository at this point in the history
when dealing with partial deletion, more context on aquasecurity#162

Signed-off-by: Francisco Javier Honduvilla Coto <javierhonduco@gmail.com>
  • Loading branch information
javierhonduco committed Aug 3, 2022
1 parent 60eea00 commit 8b9a0e1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions selftest/map-batch/main.go
Expand Up @@ -73,6 +73,13 @@ func main() {
}
}

// Test batch get value with more elements than we have.
_, err = testerMap.GetValueBatch(unsafe.Pointer(&batchKeys[0]), prevKey, unsafe.Pointer(&nextKey), uint32(len(batchKeys))+100)
if err != nil {
fmt.Fprintf(os.Stderr, "testerMap.GetValueBatch failed: %v", err)
os.Exit(-1)
}

// Test batch lookup and delete.
deleteKeys := make([]uint32, 2)
nextKey = uint32(0)
Expand Down

0 comments on commit 8b9a0e1

Please sign in to comment.