dnf-2 and dnf-3 differs in module order [root@7ac3247f4757 /]# rpm -q dnf dnf-2.7.5-6.fc26.modularity.1.3fb9e5c.git.8056.9361b1aNone.noarch [root@7ac3247f4757 /]# dnf-2 module list --enabled ModuleA Last metadata expiration check: 0:06:58 ago on Thu Oct 26 07:50:53 2017. modularityABDE Name Stream Version Profiles ModuleA f26 1 client, default, ... ModuleA f26 2 client [i], default, ... Hint: [d]efault, [i]nstalled, [l]ocked [root@7ac3247f4757 /]# dnf-3 module list --enabled ModuleA Last metadata expiration check: 0:07:00 ago on Thu Oct 26 07:50:53 2017. modularityABDE Name Stream Version Profiles ModuleA f26 2 client [i], default, ... ModuleA f26 1 client, default, ... Hint: [d]efault, [i]nstalled, [l]ocked This is an issue for upstream test dnf-module-list-1 which matches the cmd output.
Fixed by https://github.com/rpm-software-management/dnf/pull/971
The issue is solved by dnf-3.0.1-1 that was released into rawhide.