■ ■ ■ ■ ■ ■
syft/pkg/cataloger/kernel/cataloger_test.go
skipped 8 lines 9 9 "github.com/anchore/syft/syft/source" 10 10 ) 11 11 12 - func Test_JavascriptCataloger(t *testing.T) { 12 + func Test_KernelCataloger(t *testing.T) { 13 13 kernelPkg := pkg.Package{ 14 14 Name: "linux-kernel", 15 - Version: "6.2 .9 -200 .fc37.x86_64", 15 + Version: "6.0 .7 -301 .fc37.x86_64", 16 16 FoundBy: "linux-kernel-cataloger", 17 17 Locations: source.NewLocationSet( 18 18 source.NewVirtualLocation( 19 - "/lib/modules/6.2 .9 -200 .fc37.x86_64/vmlinuz", 20 - "/lib/modules/6.2 .9 -200 .fc37.x86_64/vmlinuz", 19 + "/lib/modules/6.0 .7 -301 .fc37.x86_64/vmlinuz", 20 + "/lib/modules/6.0 .7 -301 .fc37.x86_64/vmlinuz", 21 21 ), 22 22 ), 23 23 Type: pkg.LinuxKernelPkg, 24 - PURL: "pkg:generic/linux-kernel@6.2 .9 -200 .fc37.x86_64", 24 + PURL: "pkg:generic/linux-kernel@6.0 .7 -301 .fc37.x86_64", 25 25 MetadataType: pkg.LinuxKernelMetadataType, 26 26 Metadata: pkg.LinuxKernelMetadata{ 27 27 Name: "", 28 28 Architecture: "x86", 29 - Version: "6.2 .9 -200 .fc37.x86_64", 30 - ExtendedVersion: "6.2 .9 -200 .fc37.x86_64 (mockbuild@bkernel02 .iad2.fedoraproject.org) #1 SMP PREEMPT_DYNAMIC Thu Mar 30 22 :31 :57 UTC 2023 ", 29 + Version: "6.0 .7 -301 .fc37.x86_64", 30 + ExtendedVersion: "6.0 .7 -301 .fc37.x86_64 (mockbuild@bkernel01 .iad2.fedoraproject.org) #1 SMP PREEMPT_DYNAMIC Fri Nov 4 18 :35 :48 UTC 2022 ", 31 31 BuildTime: "", 32 32 Author: "", 33 33 Format: "bzImage", skipped 5 lines 39 39 } 40 40 41 41 kernelModulePkg := pkg.Package{ 42 - Name: "fsa4480 ", 42 + Name: "ttynull ", 43 43 Version: "", 44 44 FoundBy: "linux-kernel-cataloger", 45 45 Locations: source.NewLocationSet( 46 - source.NewVirtualLocation("/lib/modules/6.2 .9 -200 .fc37.x86_64/kernel/drivers/usb / typec /mux / fsa4480 .ko", 47 - "/lib/modules/6.2 .9 -200 .fc37.x86_64/kernel/drivers/usb / typec /mux / fsa4480 .ko", 46 + source.NewVirtualLocation("/lib/modules/6.0 .7 -301 .fc37.x86_64/kernel/drivers/tty /ttynull .ko", 47 + "/lib/modules/6.0 .7 -301 .fc37.x86_64/kernel/drivers/tty /ttynull .ko", 48 48 ), 49 49 ), 50 50 Licenses: []string{ 51 51 "GPL v2", 52 52 }, 53 53 Type: pkg.LinuxKernelModulePkg, 54 - PURL: "pkg:generic/fsa4480 ", 54 + PURL: "pkg:generic/ttynull ", 55 55 MetadataType: pkg.LinuxKernelModuleMetadataType, 56 56 Metadata: pkg.LinuxKernelModuleMetadata{ 57 - Name: "fsa4480 ", 57 + Name: "ttynull ", 58 58 Version: "", 59 59 SourceVersion: "", 60 60 License: "GPL v2", 61 - Path: "/lib/modules/6.2 .9 -200 .fc37.x86_64/kernel/drivers/usb / typec /mux / fsa4480 .ko", 62 - Description: "ON Semiconductor FSA4480 driver ", 63 - KernelVersion: "6.2 .9 -200 .fc37.x86_64", 64 - VersionMagic: "6.2 .9 -200 .fc37.x86_64 SMP preempt mod_unload ", 61 + Path: "/lib/modules/6.0 .7 -301 .fc37.x86_64/kernel/drivers/tty /ttynull .ko", 62 + Description: "", 63 + KernelVersion: "6.0 .7 -301 .fc37.x86_64", 64 + VersionMagic: "6.0 .7 -301 .fc37.x86_64 SMP preempt mod_unload ", 65 65 Parameters: map[string]pkg.LinuxKernelModuleParameter{}, 66 66 }, 67 67 } skipped 26 lines