• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

NVIDIA / gpu-operator / 29513807383

16 Jul 2026 03:58PM UTC coverage: 32.688% (+0.9%) from 31.812%
29513807383

Pull #2571

github

karthikvetrivel
Add golden render tests for GPUCluster operand manifests

Signed-off-by: Karthik Vetrivel <kvetrivel@nvidia.com>
Pull Request #2571: Add GPUCluster CRD and controller for DRA-based stack

513 of 1343 new or added lines in 31 files covered. (38.2%)

5 existing lines in 4 files now uncovered.

4663 of 14265 relevant lines covered (32.69%)

0.37 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

83.33
/internal/driverroot/hostsmi.go
1
//go:build linux
2

3
/*
4
# Copyright (c) NVIDIA CORPORATION.  All rights reserved.
5
#
6
# Licensed under the Apache License, Version 2.0 (the "License");
7
# you may not use this file except in compliance with the License.
8
# You may obtain a copy of the License at
9
#
10
#     http://www.apache.org/licenses/LICENSE-2.0
11
#
12
# Unless required by applicable law or agreed to in writing, software
13
# distributed under the License is distributed on an "AS IS" BASIS,
14
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
# See the License for the specific language governing permissions and
16
# limitations under the License.
17
*/
18

19
package driverroot
20

21
import (
22
        "fmt"
23
        "os"
24

25
        pathrs "github.com/cyphar/filepath-securejoin/pathrs-lite"
26
)
27

28
// hostNvidiaSMIPath is the expected location of nvidia-smi within the host root.
29
const hostNvidiaSMIPath = "/usr/bin/nvidia-smi"
30

31
// ResolveHostNvidiaSMI opens and stats nvidia-smi within the mounted host root.
32
func ResolveHostNvidiaSMI(hostRootCtrPath string) (os.FileInfo, error) {
1✔
33
        f, err := pathrs.OpenInRoot(hostRootCtrPath, hostNvidiaSMIPath)
1✔
34
        if err != nil {
2✔
35
                return nil, fmt.Errorf("failed to open 'nvidia-smi' on the host: %w", err)
1✔
36
        }
1✔
37
        defer f.Close()
1✔
38

1✔
39
        fileInfo, err := f.Stat()
1✔
40
        if err != nil {
1✔
NEW
41
                return nil, fmt.Errorf("failed to stat 'nvidia-smi' on the host: %w", err)
×
NEW
42
        }
×
43
        return fileInfo, nil
1✔
44
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc